Skip to content

Commit

Permalink
backport PSS helm flag
Browse files Browse the repository at this point in the history
  • Loading branch information
whites11 committed Apr 22, 2024
1 parent 5453531 commit 42e5606
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .nancy-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ CVE-2023-3978

# golang/google.golang.org/grpc@v1.52.0
CVE-2023-32731 until=2023-08-30

CVE-2024-24786
CVE-2023-39325
CVE-2023-48795
CVE-2023-47108
CVE-2023-47090
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

## [5.8.0-patch1] - 2023-09-26

### Added
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 42e5606

Please sign in to comment.