diff --git a/CHANGELOG.md b/CHANGELOG.md index 43c2f49..9bab984 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Add `global.podSecurityStandards.enforced` value for PSS migration. + ### Changed - Update `golang.org/x/net` package. diff --git a/Makefile.custom.mk b/Makefile.custom.mk index 5858138..83198d1 100644 --- a/Makefile.custom.mk +++ b/Makefile.custom.mk @@ -99,6 +99,7 @@ deploy: manifests render ensure-deploy-envs ## Deploy controller to the K8s clus --set aws.accessKeyID=$(AWS_ACCESS_KEY_ID) \ --set aws.secretAccessKey=$(AWS_SECRET_ACCESS_KEY) \ --set aws.region=$(AWS_REGION) \ + --set global.podSecurityStandards.enforced=true \ --wait \ aws-network-topology-operator helm/rendered/aws-network-topology-operator diff --git a/helm/aws-network-topology-operator/templates/psp.yaml b/helm/aws-network-topology-operator/templates/psp.yaml index f66d34a..dcd152a 100644 --- a/helm/aws-network-topology-operator/templates/psp.yaml +++ b/helm/aws-network-topology-operator/templates/psp.yaml @@ -1,4 +1,4 @@ -{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }} +{{- if not .Values.global.podSecurityStandards.enforced }} apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: diff --git a/helm/aws-network-topology-operator/values.schema.json b/helm/aws-network-topology-operator/values.schema.json index a2b6274..f0a76ff 100644 --- a/helm/aws-network-topology-operator/values.schema.json +++ b/helm/aws-network-topology-operator/values.schema.json @@ -132,6 +132,19 @@ "type": "string" } } + }, + "global": { + "type": "object", + "properties": { + "podSecurityStandards": { + "type": "object", + "properties": { + "enforced": { + "type": "boolean" + } + } + } + } } } } diff --git a/helm/aws-network-topology-operator/values.yaml b/helm/aws-network-topology-operator/values.yaml index 54eb2b7..0f541f9 100644 --- a/helm/aws-network-topology-operator/values.yaml +++ b/helm/aws-network-topology-operator/values.yaml @@ -42,3 +42,7 @@ securityContext: capabilities: drop: - ALL + +global: + podSecurityStandards: + enforced: false