diff --git a/k8s/argocd/apps/00-substrate.yaml b/k8s/argocd/apps/00-substrate.yaml index 50d742f..e5a20cd 100644 --- a/k8s/argocd/apps/00-substrate.yaml +++ b/k8s/argocd/apps/00-substrate.yaml @@ -88,17 +88,19 @@ spec: source: repoURL: git@github.com:Riotpiaole/riotpiao.homelab.com.git targetRevision: main + # A real kustomization.yaml (resources: the 3 issuer/CA files) renders these + # deterministically. The previous directory.include with bare filenames + # rendered EMPTY — ArgoCD's include glob never matched — so this app silently + # tracked 0 resources; its ConfigMaps/Issuers only existed from bootstrap + # kubectl apply, and an automated prune wiped them. path: k8s/bootstrap/cert-manager - directory: - include: "letsencrypt-issuer.yaml,homelab-ca-issuer.yaml,homelab-ca-configmap.yaml" destination: server: https://kubernetes.default.svc namespace: cert-manager syncPolicy: - # automated sync intentionally disabled: ArgoCD directory.include renders - # this app's resources as EMPTY (root cause under investigation), so an - # automated prune wipes the ClusterIssuers + homelab-ca ConfigMaps. Keep - # manual until the render is fixed, then restore prune/selfHeal. + automated: + prune: true + selfHeal: true syncOptions: - CreateNamespace=true --- diff --git a/k8s/bootstrap/cert-manager/kustomization.yaml b/k8s/bootstrap/cert-manager/kustomization.yaml new file mode 100644 index 0000000..8368ceb --- /dev/null +++ b/k8s/bootstrap/cert-manager/kustomization.yaml @@ -0,0 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +# Issuers + CA trust-bundle ConfigMaps for the cert-manager-issuers Application. +# Each resource sets its own metadata.namespace (the ConfigMaps target iam/cicd/ +# monitoring/sqs; ClusterIssuers are cluster-scoped) — so NO namespace transformer +# here (that would rewrite them all into one namespace). cert-manager itself is a +# separate Helm Application; cert-manager-values.yaml here is only its $values ref. +resources: + - letsencrypt-issuer.yaml + - homelab-ca-issuer.yaml + - homelab-ca-configmap.yaml