Move namespaces out of terraform

This commit is contained in:
Ian Keane 2026-08-18 13:46:49 -04:00
parent 865831f1de
commit 6cecb90baf
7 changed files with 66 additions and 20 deletions

View file

@ -1,19 +1,5 @@
provider "kubernetes" {
host = "https://${aws_eip.controlplane.public_ip}:6443"
cluster_ca_certificate = base64decode(talos_cluster_kubeconfig.this.kubernetes_client_configuration.ca_certificate)
client_certificate = base64decode(talos_cluster_kubeconfig.this.kubernetes_client_configuration.client_certificate)
client_key = base64decode(talos_cluster_kubeconfig.this.kubernetes_client_configuration.client_key)
}
resource "kubernetes_namespace" "ingress_nginx" {
metadata {
name = "ingress-nginx"
labels = {
"pod-security.kubernetes.io/enforce" = "privileged"
"pod-security.kubernetes.io/audit" = "privileged"
"pod-security.kubernetes.io/warn" = "privileged"
}
}
depends_on = [talos_cluster_kubeconfig.this]
}
# Namespaces that need privileged PodSecurity are managed as Helm charts
# in charts/<name>/templates/namespace.yaml so ArgoCD creates them with
# the correct labels before deploying workloads into them.
#
# This file is intentionally empty.