In last week's charts office hours we agreed the sidecar containers template pattern being worked on in #3983 is a good, reproducible pattern for all relevant chart templates. Adding this issue to discuss which chart templates are relevant, and track rolling out this feature across them.
Couldn't make it to the call. Do we want to proactively update charts? In any case, I think this could be a good addition to our best practices. We may have to extend this pattern with e. g. sidecarVolumes or sidecarSecrets, though. Was this discussed?
@unguiculus It wasn't discussed, but I was thinking something similar. Perhaps we could also rename this to extraContainers, extraVolumes, extraSecrets (similar to how we add extraVars to existing containers on some charts). This way, we're not accidentally recommending any one of the 3 main sidecar patterns, just making charts more flexible - without adding loads of verbose detail logic - for those who want to use it for outlying use cases?
Another example: #3983
@unguiculus Ah, thanks, this is the example I was looking for initially 馃槃 I'll update the description.
Just came across this one: #4059
With extraSecrets comes extraConfigMaps. And their actual names should be prefixed by the release name to ensure unicity (but this makes them somewhat hidden).
On Today's call, @prydonius suggested we look at https://kubernetes.io/docs/tasks/inject-data-application/podpreset/. It's in alpha right now, so we can't use it yet in stable charts, but it's something we may want to plan on using because it's more robust, and it will keep charts cleaner.
@depohmel suggested recommending an umbrella chart with this would be a good pattern.
Note this will need to be tested out
@scottrigby @prydonius
I got this one when trying to use containers: in PodPreset :(
error: error validating "pod-preset.yaml": error validating data: found invalid field containers for v1alpha1.PodPresetSpec;
also here is the api proto https://github.com/kubernetes/api/blob/master/settings/v1alpha1/generated.proto
@depohmel Bummer, PodPreset still sounds like an elegant solution for this use case.
So far I see two options for supporting sidecars in charts now:
Though still open to other ideas.
Thanks @scottrigby, agreed and both options sound good to me. Might be a good idea to bring up kubernetes/kubernetes#43874 to see if people are interested in it, and if so try to push it through.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
This issue is being automatically closed due to inactivity.