Add `extraContainers`, `extraEnvVars`, `extraVolumes` & `extraVolumeMounts`
This commit is contained in:
		
							parent
							
								
									a64e0dc323
								
							
						
					
					
						commit
						91f762dde9
					
				|  | @ -90,3 +90,16 @@ Selector labels | ||||||
| app: {{ template "nfs-subdir-external-provisioner.name" . }} | app: {{ template "nfs-subdir-external-provisioner.name" . }} | ||||||
| release: {{ .Release.Name }} | release: {{ .Release.Name }} | ||||||
| {{- end }} | {{- end }} | ||||||
|  | 
 | ||||||
|  | {{/* | ||||||
|  | Renders a value that contains template. | ||||||
|  | Usage: | ||||||
|  | {{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }} | ||||||
|  | */}} | ||||||
|  | {{- define "common.tplvalues.render" -}} | ||||||
|  |     {{- if typeIs "string" .value }} | ||||||
|  |         {{- tpl .value .context }} | ||||||
|  |     {{- else }} | ||||||
|  |         {{- tpl (.value | toYaml) .context }} | ||||||
|  |     {{- end }} | ||||||
|  | {{- end -}} | ||||||
|  | @ -50,6 +50,9 @@ spec: | ||||||
|           volumeMounts: |           volumeMounts: | ||||||
|             - name: {{ .Values.nfs.volumeName }} |             - name: {{ .Values.nfs.volumeName }} | ||||||
|               mountPath: /persistentvolumes |               mountPath: /persistentvolumes | ||||||
|  |           {{- if .Values.extraVolumeMounts }} | ||||||
|  |           {{- include "common.tplvalues.render" (dict "value" .Values.extraVolumeMounts "context" $) | nindent 12 }} | ||||||
|  |           {{- end }} | ||||||
|           env: |           env: | ||||||
|             - name: PROVISIONER_NAME |             - name: PROVISIONER_NAME | ||||||
|               value: {{ template "nfs-subdir-external-provisioner.provisionerName" . }} |               value: {{ template "nfs-subdir-external-provisioner.provisionerName" . }} | ||||||
|  | @ -61,10 +64,16 @@ spec: | ||||||
|             - name: ENABLE_LEADER_ELECTION |             - name: ENABLE_LEADER_ELECTION | ||||||
|               value: "false" |               value: "false" | ||||||
|             {{- end }} |             {{- end }} | ||||||
|  |           {{- if .Values.extraEnvVars }} | ||||||
|  |           {{- include "common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }} | ||||||
|  |           {{- end }} | ||||||
|           {{- with .Values.resources }} |           {{- with .Values.resources }} | ||||||
|           resources: |           resources: | ||||||
| {{ toYaml . | indent 12 }} | {{ toYaml . | indent 12 }} | ||||||
|           {{- end }} |           {{- end }} | ||||||
|  |       {{- if .Values.extraContainers }} | ||||||
|  |       {{- include "common.tplvalues.render" (dict "value" .Values.extraContainers "context" $) | nindent 8 }} | ||||||
|  |       {{- end }} | ||||||
|       volumes: |       volumes: | ||||||
|         - name: {{ .Values.nfs.volumeName }} |         - name: {{ .Values.nfs.volumeName }} | ||||||
| {{- if .Values.buildMode }} | {{- if .Values.buildMode }} | ||||||
|  | @ -77,6 +86,9 @@ spec: | ||||||
|             server: {{ .Values.nfs.server }} |             server: {{ .Values.nfs.server }} | ||||||
|             path: {{ .Values.nfs.path }} |             path: {{ .Values.nfs.path }} | ||||||
| {{- end }} | {{- end }} | ||||||
|  |       {{- if .Values.extraVolumes }} | ||||||
|  |       {{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }} | ||||||
|  |       {{- end }} | ||||||
|       {{- if and (.Values.tolerations) (semverCompare "^1.6-0" .Capabilities.KubeVersion.GitVersion) }} |       {{- if and (.Values.tolerations) (semverCompare "^1.6-0" .Capabilities.KubeVersion.GitVersion) }} | ||||||
|       tolerations: |       tolerations: | ||||||
| {{ toYaml .Values.tolerations | indent 6 }} | {{ toYaml .Values.tolerations | indent 6 }} | ||||||
|  |  | ||||||
|  | @ -66,6 +66,18 @@ rbac: | ||||||
|   # Specifies whether RBAC resources should be created |   # Specifies whether RBAC resources should be created | ||||||
|   create: true |   create: true | ||||||
| 
 | 
 | ||||||
|  | # Additional sidecars | ||||||
|  | extraContainers: {} | ||||||
|  | 
 | ||||||
|  | # Additional env vars | ||||||
|  | extraEnvVars: {} | ||||||
|  | 
 | ||||||
|  | # Additional volumes | ||||||
|  | extraVolumes: {} | ||||||
|  | 
 | ||||||
|  | # Additional volume mounts | ||||||
|  | extraVolumeMounts: {} | ||||||
|  | 
 | ||||||
| # If true, create & use Pod Security Policy resources | # If true, create & use Pod Security Policy resources | ||||||
| # https://kubernetes.io/docs/concepts/policy/pod-security-policy/ | # https://kubernetes.io/docs/concepts/policy/pod-security-policy/ | ||||||
| podSecurityPolicy: | podSecurityPolicy: | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue