diff --git a/manifests/install/namespace.yaml b/manifests/install/namespace.yaml index c00a4321ea..c2b5961db8 100644 --- a/manifests/install/namespace.yaml +++ b/manifests/install/namespace.yaml @@ -2,3 +2,6 @@ apiVersion: v1 kind: Namespace metadata: name: flux-system + labels: + pod-security.kubernetes.io/warn: restricted + pod-security.kubernetes.io/warn-version: latest diff --git a/pkg/manifestgen/install/templates.go b/pkg/manifestgen/install/templates.go index 8cdce3193d..ac47cf27aa 100644 --- a/pkg/manifestgen/install/templates.go +++ b/pkg/manifestgen/install/templates.go @@ -165,6 +165,9 @@ apiVersion: v1 kind: Namespace metadata: name: {{.Namespace}} + labels: + pod-security.kubernetes.io/warn: restricted + pod-security.kubernetes.io/warn-version: latest ` func execTemplate(obj interface{}, tmpl, filename string) error {