Closed rhuss closed 7 years ago
Future proofing :) In latest Kubernetes, it's properly part of spec, previous (and current OpenShift) requires annotations. Both do not conflict though luckily.
Thanks ! Good to know that init containers come to spec. I always hated this json-in-yaml thing. At some point we should remove the annotation thing (when it lands in OpenShift, which probably will take a bit).
@jimmidyson General question : Is it generally so that unknown spec keys are ignored instead of raising an error ? so a bit like HTML ..
Yeah I think so, although in this case it's not actually an unknown spec key, just one that has lower priority than the annotation key, depending on what version of kube is being used. The spec field has been there for a while, just unused in controllers, etc.
Snippet from the DC:
Isn't it sufficient to add only one kind of init container (either as annotation or as within the spec) ? // @jimmidyson