Skip to content

Commit

Permalink
chore: enforce restricted PSS
Browse files Browse the repository at this point in the history
Signed-off-by: SdgJlbl <[email protected]>
  • Loading branch information
SdgJlbl committed Jun 24, 2024
1 parent f267d4f commit 4c3a906
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 13 deletions.
7 changes: 6 additions & 1 deletion charts/substra-frontend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# Changelog

<!-- towncrier release notes start -->
## [1.2.0] - 2024-06-21
## [1.2.1] - 2024-06-24

### Added

- Security Context at the pod and container level to ensure that the chart can run according to the restricted level of the Pod Security Standard

## [1.2.0] - 2024-06-21

### Added

Expand Down
2 changes: 1 addition & 1 deletion charts/substra-frontend/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ type: application
maintainers:
- name: Substra Team
email: [email protected]
version: 1.2.0
version: 1.2.1
appVersion: 0.51.0 # should be same as in package.json
kubeVersion: '>= 1.19.0-0'
12 changes: 10 additions & 2 deletions charts/substra-frontend/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ spec:
initContainers:
- name: template-html
image: "{{ trimSuffix "/" .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
command:
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
capabilities:
drop:
- ALL
command:
- sh
args:
- -c
Expand Down Expand Up @@ -75,7 +83,7 @@ spec:
- name: nginx-cache
emptyDir: {}
- name: nginx-run
emptyDir: {}
emptyDir: {}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
26 changes: 17 additions & 9 deletions charts/substra-frontend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,24 @@ serviceAccount:

podAnnotations: {}

podSecurityContext: {}
# fsGroup: 2000
podSecurityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
fsGroup: 1000
runAsUser: 1000
runAsGroup: 1000

securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000

service:
type: ClusterIP
Expand Down

0 comments on commit 4c3a906

Please sign in to comment.