Per user decision, removed authentik, kyverno, metallb-system, external-secrets, proxmox-csi, nfs-csi, vpa, sealed-secrets, infra-maintenance from the policy-level exclude list, and added keel.sh/enrolled=true to aiostreams (alive — 1/1 Running, despite being earlier flagged as scaled-to-0) and woodpecker. Net cluster coverage: 197/227 workloads on safe-force (86%), up from 170/227 (74%). All 197 are paired with match-tag=true (digest-only). Remaining 7 namespaces in Kyverno exclude list (irreducible): - keel (self-update) - calico-system + tigera-operator (operator-managed Installation CR) - cnpg-system + dbaas (state-coupled) - nvidia (chart-pinned at 570.195.03 per code-8vr0 until NVIDIA ships ubuntu26.04 driver images) - kube-system (k8s built-ins) Files: - stacks/kyverno/modules/kyverno/keel-annotations.tf — exclude list trimmed from 16 → 7 - stacks/authentik, kyverno, proxmox-csi, nfs-csi, vpa, sealed-secrets, servarr/aiostreams, metallb (creates ns "metallb-system"), woodpecker — added keel.sh/enrolled=true label on kubernetes_namespace resource - infra-maintenance was in the policy exclude but the namespace doesn't actually exist in the cluster; the removal is a no-op there Applied via kubectl patch on the live ClusterPolicy + kubectl label on namespaces because the kubernetes provider v3.1.0 panics on Kyverno ClusterPolicy refresh — TF source has the desired state for next clean apply on a fixed provider. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
50 lines
1.4 KiB
HCL
50 lines
1.4 KiB
HCL
variable "tier" { type = string }
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Namespace
|
|
# -----------------------------------------------------------------------------
|
|
resource "kubernetes_namespace" "sealed_secrets" {
|
|
metadata {
|
|
name = "sealed-secrets"
|
|
labels = {
|
|
tier = var.tier
|
|
"keel.sh/enrolled" = "true"
|
|
}
|
|
}
|
|
lifecycle {
|
|
# KYVERNO_LIFECYCLE_V1: goldilocks-vpa-auto-mode ClusterPolicy stamps this label on every namespace
|
|
ignore_changes = [metadata[0].labels["goldilocks.fairwinds.com/vpa-update-mode"]]
|
|
}
|
|
}
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Sealed Secrets — encrypts secrets for safe git storage
|
|
# https://github.com/bitnami-labs/sealed-secrets
|
|
# -----------------------------------------------------------------------------
|
|
resource "helm_release" "sealed_secrets" {
|
|
namespace = kubernetes_namespace.sealed_secrets.metadata[0].name
|
|
create_namespace = false
|
|
name = "sealed-secrets"
|
|
atomic = true
|
|
timeout = 300
|
|
|
|
repository = "https://bitnami-labs.github.io/sealed-secrets"
|
|
chart = "sealed-secrets"
|
|
version = "2.18.3"
|
|
|
|
values = [yamlencode({
|
|
crds = {
|
|
create = true
|
|
}
|
|
|
|
resources = {
|
|
requests = {
|
|
cpu = "50m"
|
|
memory = "192Mi"
|
|
}
|
|
limits = {
|
|
memory = "192Mi"
|
|
}
|
|
}
|
|
})]
|
|
}
|