Conversation
| {{- if .Values.pgsql.extraVolumeMounts }} | ||
| {{- toYaml .Values.pgsql.extraVolumeMounts | nindent 8 }} | ||
| {{- end }} | ||
| {{- if .Values.pgsql.extraContainers }} |
There was a problem hiding this comment.
shouldnt we keep this next to the other directive for if extraVolumeMounts
There was a problem hiding this comment.
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.
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.
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
| {{ toYaml .Values.nodeExporter.extraArgs | indent 10 }} | ||
| {{- end }} | ||
| {{- if .Values.nodeExporter.extraArgs }} | ||
| {{ toYaml .Values.nodeExporter.extraArgs }} |
There was a problem hiding this comment.
I think we may want to keep the | indent 10 here?
3a1df10 to
248a9fd
Compare
Minor fixes to the ordering of attributes in the generated template, to make them more consistent, thus easier to read ### Checklist - [x] Follow the [manual testing process](https://github.com/sourcegraph/deploy-sourcegraph-helm/blob/main/TEST.md) - [ ] Update [changelog](https://github.com/sourcegraph/deploy-sourcegraph-helm/blob/main/charts/sourcegraph/CHANGELOG.md) - [ ] Update [Kubernetes update doc](https://docs.sourcegraph.com/admin/updates/kubernetes) ### Test plan Tested on branch [marc-test-helm-fixes](https://github.com/sourcegraph/deploy-sourcegraph-helm/tree/marc-test-helm-fixes) on my EKS test instance, works great, no errors <br> Backport 604350a from #773 Co-authored-by: Marc <7050295+marcleblanc2@users.noreply.github.com>
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