Skip to content

Commit

Permalink
Apply trivy recommended hardening
Browse files Browse the repository at this point in the history
Signed-off-by: Pat Riehecky <[email protected]>
  • Loading branch information
jcpunk committed Jul 18, 2023
1 parent 4d42c70 commit ba8b940
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions deploy/chart/local-path-provisioner/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ spec:
env:
- name: POD_NAMESPACE
value: {{ .Release.Namespace }}
{{- with .Values.containerSecurityContext }}
securityContext: {{ toYaml .| nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
Expand Down
5 changes: 5 additions & 0 deletions deploy/chart/local-path-provisioner/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

podSecurityContext: {}
containerSecurityContext:
seccompProfile:
type: RuntimeDefault

## For creating the StorageClass automatically:
storageClass:
create: true
Expand Down
3 changes: 3 additions & 0 deletions deploy/local-path-storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
securityContext:
seccompProfile:
type: RuntimeDefault
volumes:
- name: config-volume
configMap:
Expand Down
3 changes: 3 additions & 0 deletions deploy/provisioner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
securityContext:
seccompProfile:
type: RuntimeDefault
volumes:
- name: config-volume
configMap:
Expand Down

0 comments on commit ba8b940

Please sign in to comment.