Skip to content

Commit

Permalink
- Add global.podSecurityStandards.enforced value for PSS migration. (
Browse files Browse the repository at this point in the history
  • Loading branch information
whites11 committed Apr 17, 2024
1 parent 5f40708 commit b16b940
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Add team label in resources.
- Add `global.podSecurityStandards.enforced` value for PSS migration.

## [5.10.0] - 2023-10-17

Expand Down
2 changes: 2 additions & 0 deletions helm/cluster-operator/templates/psp.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.global.podSecurityStandards.enforced }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
Expand Down Expand Up @@ -31,3 +32,4 @@ spec:
hostNetwork: false
hostIPC: false
hostPID: false
{{- end }}
2 changes: 2 additions & 0 deletions helm/cluster-operator/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ roleRef:
name: {{ include "resource.default.name" . }}
apiGroup: rbac.authorization.k8s.io
---
{{- if not .Values.global.podSecurityStandards.enforced }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down Expand Up @@ -184,3 +185,4 @@ roleRef:
kind: ClusterRole
name: {{ include "resource.psp.name" . }}
apiGroup: rbac.authorization.k8s.io
{{- end }}
13 changes: 13 additions & 0 deletions helm/cluster-operator/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,19 @@
}
}
}
},
"global": {
"type": "object",
"properties": {
"podSecurityStandards": {
"type": "object",
"properties": {
"enforced": {
"type": "boolean"
}
}
}
}
}
}
}
4 changes: 4 additions & 0 deletions helm/cluster-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,7 @@ securityContext:
capabilities:
drop:
- ALL

global:
podSecurityStandards:
enforced: false

0 comments on commit b16b940

Please sign in to comment.