-
Notifications
You must be signed in to change notification settings - Fork 402
feat(helm): add in ability to inject init containers in to deployment from values #615
Conversation
fac4b23
to
aabe0a6
Compare
|
||
deploymentInitContainers: {} | ||
|
||
emptyDirVolumes: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do more generic and add extraVolumeMounts
and extraVolumes
instead ? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the PR to reflect your suggestion. Thanks for the review 👍
this is while we wait for PR external-secrets/kubernetes-external-secrets#615 to merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think we can keep it even more "standard". At least I think this pattern is pretty common in charts. I could be wrong a bit out of the loop 😄
{{- with .Values.extraVolumeMounts }} | ||
{{- range $key, $value := . }} | ||
- name: {{ $key }} | ||
mountPath: {{ $value.mountPath }} | ||
readOnly: {{ $value.readOnly }} | ||
{{- end }} | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think we could simplify this
{{- with .Values.extraVolumeMounts }} | |
{{- range $key, $value := . }} | |
- name: {{ $key }} | |
mountPath: {{ $value.mountPath }} | |
readOnly: {{ $value.readOnly }} | |
{{- end }} | |
{{- end }} | |
{{- if .Values.extraVolumeMounts }} | |
{{ toYaml .Values.extraVolumes | nindent 12 }} | |
{{- end }} |
{{- with .Values.extraVolumes }} | ||
{{- range $key, $value := . }} | ||
- name: {{ $key }} | ||
{{- toYaml $value | nindent 8 }} | ||
{{- end }} | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think we could simplify this
{{- with .Values.extraVolumes }} | |
{{- range $key, $value := . }} | |
- name: {{ $key }} | |
{{- toYaml $value | nindent 8 }} | |
{{- end }} | |
{{- end }} | |
{{- if .Values.extraVolumes }} | |
{{ toYaml .Values.extraVolumes | nindent 8 }} | |
{{- end }} |
#extraVolumes: | ||
# namedVolume: | ||
# emptyDir: {} | ||
# | ||
#extraVolumeMounts: | ||
# namedVolume: | ||
# mountPath: /usr/path | ||
# readOnly: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#extraVolumes: | |
# namedVolume: | |
# emptyDir: {} | |
# | |
#extraVolumeMounts: | |
# namedVolume: | |
# mountPath: /usr/path | |
# readOnly: false | |
extraVolumes: [] | |
# - name: namedVolume | |
# emptyDir: {} | |
# | |
extraVolumeMounts: [] | |
# - name: namedVolume | |
# mountPath: /usr/path | |
# readOnly: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good - more likely me out of the loop ;) Updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 merging assuming e2e tests doesnt magically fail
Hold off. spotted one problem |
…values chore: added in jetbrains ignore files x
Resolved. Was outputting volumes yaml in volumeMounts block :) |
No description provided.