diff --git a/deploy/chart/local-path-provisioner/templates/deployment.yaml b/deploy/chart/local-path-provisioner/templates/deployment.yaml index 1e0117435fd33d80c1605eed9a3aa4109f1f0784..e07b1647cab7f416828cefa172848a7f30c14092 100644 --- a/deploy/chart/local-path-provisioner/templates/deployment.yaml +++ b/deploy/chart/local-path-provisioner/templates/deployment.yaml @@ -13,6 +13,10 @@ spec: app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} labels: app.kubernetes.io/name: {{ include "local-path-provisioner.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} @@ -22,8 +26,12 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ template "local-path-provisioner.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} {{- if .Values.privateRegistry.registryUrl }} image: "{{ .Values.privateRegistry.registryUrl }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}" {{- else }} diff --git a/deploy/chart/local-path-provisioner/values.yaml b/deploy/chart/local-path-provisioner/values.yaml index 61b6fe82b0662abd0c0e79ecc3331efc5b961b6d..96550935f5ac2e089ecb6b71e9d12a8f6eda19ca 100644 --- a/deploy/chart/local-path-provisioner/values.yaml +++ b/deploy/chart/local-path-provisioner/values.yaml @@ -69,6 +69,21 @@ nodePathMap: # If `sharedFileSystemPath` is used, then `nodePathMap` must be set to `[]`. # sharedFileSystemPath: "" +podAnnotations: {} + +podSecurityContext: {} + # runAsNonRoot: true + +securityContext: {} + # allowPrivilegeEscalation: false + # seccompProfile: + # type: RuntimeDefault + # capabilities: + # drop: ["ALL"] + # runAsUser: 65534 + # runAsGroup: 65534 + # readOnlyRootFilesystem: true + resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little