diff --git a/CHANGELOG.md b/CHANGELOG.md index e8bba14..8cf6e06 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. + ## [0.5.0] - 2023-07-20 ### Added diff --git a/helm/aws-vpc-operator/templates/psp.yaml b/helm/aws-vpc-operator/templates/psp.yaml index 7159cd0..b14e1e7 100644 --- a/helm/aws-vpc-operator/templates/psp.yaml +++ b/helm/aws-vpc-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-vpc-operator/values.schema.json b/helm/aws-vpc-operator/values.schema.json index d6f0936..17d5c93 100644 --- a/helm/aws-vpc-operator/values.schema.json +++ b/helm/aws-vpc-operator/values.schema.json @@ -127,6 +127,19 @@ }, "serviceType": { "type": "string" + }, + "global": { + "type": "object", + "properties": { + "podSecurityStandards": { + "type": "object", + "properties": { + "enforced": { + "type": "boolean" + } + } + } + } } } } diff --git a/helm/aws-vpc-operator/values.yaml b/helm/aws-vpc-operator/values.yaml index 63d2aa9..f90d8cc 100644 --- a/helm/aws-vpc-operator/values.yaml +++ b/helm/aws-vpc-operator/values.yaml @@ -39,3 +39,7 @@ securityContext: capabilities: drop: - ALL + +global: + podSecurityStandards: + enforced: false