Skip to content

Commit

Permalink
PSP Toggle and PSS compliant (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuladhar authored Sep 28, 2023
1 parent 7ede2e7 commit be171d0
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed
- Update deployment to be PSS compliant and PSP toggle.

## [0.2.1] - 2023-09-21

### Added
Expand Down
5 changes: 5 additions & 0 deletions helm/teleport-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ spec:
args:
- "--namespace={{ include "resource.default.namespace" . }}"
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
capabilities:
drop:
- ALL
{{- with .Values.securityContext }}
{{- . | toYaml | nindent 10 }}
{{- end }}
Expand Down
2 changes: 2 additions & 0 deletions helm/teleport-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:
volumes:
- 'projected'
- 'secret'
{{- end }}
13 changes: 13 additions & 0 deletions helm/teleport-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/teleport-operator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
global:
podSecurityStandards:
enforced: false

image:
name: "giantswarm/teleport-operator"
registry:
Expand Down

0 comments on commit be171d0

Please sign in to comment.