Skip to content

Commit

Permalink
Merge pull request #1346 from banzaicloud/disable-psp
Browse files Browse the repository at this point in the history
[K8s 1.25 Support] Disable PodSecurityPolicy in prometheus operator charts
  • Loading branch information
ziyuguo716 committed Jul 13, 2023
2 parents 5c29670 + 82d72ee commit 51352f6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion prometheus-operator-standalone/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ keywords:
- operator
- prometheus
name: prometheus-operator-standalone
version: 13.4.0
version: 13.4.1
kubeVersion: ">=1.16.0-0"
sources:
- https://github.com/banzaicloud/banzai-charts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.pspEnabled }}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
Expand All @@ -10,4 +11,4 @@ rules:
verbs: ['use']
resourceNames:
- {{ template "prometheus-operator.fullname" . }}

{{- end }}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.pspEnabled }}
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
Expand All @@ -12,3 +13,4 @@ subjects:
- kind: ServiceAccount
name: {{ template "prometheus-operator.fullname" . }}
namespace: {{ .Release.Namespace }}
{{- end }}
2 changes: 2 additions & 0 deletions prometheus-operator-standalone/templates/psp.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.pspEnabled }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
Expand Down Expand Up @@ -46,3 +47,4 @@ spec:
- min: 0
max: 65535
readOnlyRootFilesystem: false
{{- end }}
2 changes: 1 addition & 1 deletion prometheus-operator-standalone/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ kubeTargetVersionOverride: ""
fullnameOverride: ""



pspEnabled: false
pspAnnotations: {}
## Specify pod annotations
## Ref: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#apparmor
Expand Down

0 comments on commit 51352f6

Please sign in to comment.