Repository navigation
Spartakus - static container name - #168
Conversation
|
Can a kubernetes member verify that this patch is reasonable to test? If so, please reply with "@k8s-bot ok to test" on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands will still work. Regular contributors should join the org to skip this step. If you have questions or suggestions related to this bot's behavior, please file an issue against the kubernetes/test-infra repository. |
|
@k8s-bot ok to test |
|
Let me take that back ;) can we make that the default, or when defined is the name?? |
chrislovecnm
left a comment
There was a problem hiding this comment.
Can we get spartakus, or the template name?
|
I've created a However, I don't really like this default. As I explained in the PR, there is value in having consistent container names between deployments, and I think that should be the out-of-the box behavior. I'm going to propose it as a best practice. Does templating the container name yield any particular benefit? |
|
I prefer consistent container names. It helps in live as well as after-the-fact debugging. |
+1, I thinks this makes sense |
| containers: | ||
| - name: {{ template "fullname" . }} | ||
| image: "{{ .Values.image }}" | ||
| - name: {{ if .Values.containerName }}"{{ .Values.containerName }}"{{ else }}{{ template "fullname" . }}{{ end }} |
There was a problem hiding this comment.
suggestion: add a helper function in templates/_helpers.tpl
|
Based on feedback, I've reverted to a static container name (default Of course, now I'm wondering if the This way, resources are still named using |
| containers: | ||
| - name: {{ template "fullname" . }} | ||
| image: "{{ .Values.image }}" | ||
| - name: {{ default "spartakus" .Values.containerName | quote }} |
There was a problem hiding this comment.
You could use .Chart.Name? or {{ template "name" . }} which already uses .Values.nameOverride for overriding.
|
@mgoodness this is really great feedback. Given that all charts are currently using the current |
|
Jenkins Charts e2e failed for commit 862f5c8. Full PR test history. The magic incantation to run this job again is |
|
@k8s-bot e2e test this |
|
thanks @mgoodness, all looks good to me. Ok to merge? |
|
@prydonius please do! I'll take my bigger ideas over to the best-practices issue |
|
Thanks a lot @mgoodness! |
My company aggregates container logs by container name, with each stream named after the pod itself. Naming both the pod & the container dynamically based on the release name breaks that pattern between different deployments.