-
Notifications
You must be signed in to change notification settings - Fork 24
Fix formatting of resource names #773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| {{- if .Values.pgsql.extraVolumeMounts }} | ||
| {{- toYaml .Values.pgsql.extraVolumeMounts | nindent 8 }} | ||
| {{- end }} | ||
| {{- if .Values.pgsql.extraContainers }} |
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.
shouldnt we keep this next to the other directive for if extraVolumeMounts
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.
I'd suggest no, based on the tree structure, if extraVolumeMounts only applies to the pgsql container, and we still have the pgsql-exporter container after it, in the list of containers, so any extra containers would come later in the list of containers, after pgsql-exporter
spec:
template:
spec:
initContainers:
- name: correct-data-dir-permissions
containers:
- name: pgsql
volumeMounts:
- mountPath: /data
name: disk
- ...
{{- if .Values.pgsql.extraVolumeMounts }}
{{- toYaml .Values.pgsql.extraVolumeMounts | nindent 8 }}
{{- end }}
- name: pgsql-exporter
{{- if .Values.pgsql.extraContainers }}
{{- toYaml .Values.pgsql.extraContainers | nindent 6 }}
{{- end }}
volumes:
- name: disk
persistentVolumeClaim:
claimName: pgsql
- ...
{{- if .Values.pgsql.extraVolumes }}
{{- toYaml .Values.pgsql.extraVolumes | nindent 6 }}
{{- 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.
That said, I should make this change consistently wherever we have extraContainers in pods with multiple containers, ensure the extraContainers are last in the list.
DaedalusG
left a comment
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.
Looks like this is mostly just labels then names at the top of resource definitions and other sensible standardizations lgtm
|
Hey @DaedalusG, I found that terminationGracePeriodSeconds: 120
{{- if .Values.prometheus.extraContainers }}
{{- toYaml .Values.prometheus.extraContainers | nindent 6 }}
{{- end }}
securityContext:which resulted in this error:
when I tested it with my Helm override file: prometheus:
extraContainers:
- name: test-extra-container
image: alpineSo I've fixed them, and tested with Also made some minor formatting fixes. |
b619035 to
3a1df10
Compare
Minor fixes to the ordering of attributes in the generated template, to make them more consistent, thus easier to read
Checklist
Test plan
Tested on branch marc-test-helm-fixes on my EKS test instance, works great, no errors