Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
Disable psp switch
Browse files Browse the repository at this point in the history
Signed-off-by: QuentinBisson <[email protected]>
  • Loading branch information
QuentinBisson committed Oct 2, 2023
1 parent 02f9338 commit b6fee76
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Possibility to configure used ClusterIssuer name for Ingresses.

### Changed

- Add condition for PSP installation in helm chart.

## [1.20.0] - 2023-07-04

### Changed
Expand Down
8 changes: 8 additions & 0 deletions helm/promxy-app/templates/kyverno-policy-exception.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ spec:
ruleNames:
- privilege-escalation
- autogen-privilege-escalation
- policyName: require-run-as-nonroot
ruleNames:
- run-as-non-root
- autogen-run-as-non-root
- policyName: restrict-seccomp-strict
ruleNames:
- autogen-check-seccomp-strict
- check-seccomp-strict
match:
any:
- resources:
Expand Down
4 changes: 4 additions & 0 deletions helm/promxy-app/templates/psp.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{- if not .Values.global.podSecurityStandards.enforced }}
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
Expand Down Expand Up @@ -31,3 +33,5 @@ spec:
hostNetwork: false
hostIPC: false
hostPID: false
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions helm/promxy-app/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ roleRef:
name: {{ include "resource.default.name" . }}
apiGroup: rbac.authorization.k8s.io
---
{{- if not .Values.global.podSecurityStandards.enforced }}
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand Down Expand Up @@ -61,3 +63,5 @@ roleRef:
kind: ClusterRole
name: {{ include "resource.psp.name" . }}
apiGroup: rbac.authorization.k8s.io
{{- end }}
{{- end }}
13 changes: 13 additions & 0 deletions helm/promxy-app/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"
}
}
}
}
},
"ingress": {
"type": "object",
"properties": {
Expand Down
4 changes: 4 additions & 0 deletions helm/promxy-app/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ kyvernoPolicyExceptions:
enabled: true
namespace: giantswarm

global:
podSecurityStandards:
enforced: false

monitoring:
prometheus:
host: ""
Expand Down

0 comments on commit b6fee76

Please sign in to comment.