Skip to content

Commit

Permalink
Add PSP toggle (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
erkanerol authored Jan 22, 2024
1 parent 2aac5e0 commit 5bf36e5
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Configure `gsoci.azurecr.io` as the default container image registry.
- Add toggle for PSPs.

## [0.1.0] - 2023-07-21

Expand Down
2 changes: 1 addition & 1 deletion helm/azure-private-endpoint-operator/templates/psp.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
{{- if not .Values.global.podSecurityStandards.enforced }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
Expand Down
2 changes: 1 addition & 1 deletion helm/azure-private-endpoint-operator/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ roleRef:
name: {{ include "resource.default.name" . }}
apiGroup: rbac.authorization.k8s.io
---
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
{{- if not .Values.global.podSecurityStandards.enforced }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down
13 changes: 13 additions & 0 deletions helm/azure-private-endpoint-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/azure-private-endpoint-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ securityContext:
managementCluster:
name: PLACEHOLDER
namespace: org-giantswarm

global:
podSecurityStandards:
enforced: false

0 comments on commit 5bf36e5

Please sign in to comment.