Skip to content

Commit

Permalink
Add global.podSecurityStandards.enforced value for PSS migration. (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
whites11 authored Mar 27, 2024
1 parent 1621ab9 commit fd1d495
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Configure `gsoci.azurecr.io` as the default container image registry.

### Added

- Add global.podSecurityStandards.enforced value for PSS migration.

## [0.8.0] - 2023-07-13

### Added
Expand Down
2 changes: 2 additions & 0 deletions helm/upgrade-schedule-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 @@ -33,3 +34,4 @@ spec:
hostNetwork: false
hostIPC: false
hostPID: false
{{- end }}
2 changes: 2 additions & 0 deletions helm/upgrade-schedule-operator/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,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 @@ -104,6 +105,7 @@ roleRef:
name: {{ include "resource.psp.name" . }}
apiGroup: rbac.authorization.k8s.io
---
{{- end }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down
13 changes: 13 additions & 0 deletions helm/upgrade-schedule-operator/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"global": {
"type": "object",
"properties": {
"podSecurityStandards": {
"type": "object",
"properties": {
"enforced": {
"type": "boolean"
}
}
}
}
},
"image": {
"type": "object",
"properties": {
Expand Down
4 changes: 4 additions & 0 deletions helm/upgrade-schedule-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ securityContext:
capabilities:
drop:
- ALL

global:
podSecurityStandards:
enforced: false

0 comments on commit fd1d495

Please sign in to comment.