You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Helm is currently sorting hooks by weight and then by name. This is nice, however, for hooks with equal weight I would expect that the same sorting by kind is done before executing the hooks with equal weight.
Consider e.g. the following example. A hook should run a job, but the job requires a certain service account to do that. So create a template with the service account and the jobs annotated as helm hook with some weight. Then it would make sense to sort the hooks by kind, like done for normal resources, to make sure that the service account is created before the job.
I think this would resource handling make more consistent, if it is done the same way for hooks and non-hooks.
To workaround this, one can manage the order by carefully choosing weights. For the example above that would mean that the service account must get a smaller weight than the job.
I am not sure if it is considered a feature or a bug, but I can provide a pull request to fix this, if the proposed solution is accepted.
Output of helm version: version.BuildInfo{Version:"v3.0.2", GitCommit:"19e47ee3283ae98139d98460de796c1be1e3975f", GitTreeState:"clean", GoVersion:"go1.13.5"}
Activity
fix(helm): sort hooks by kind for equal weight
fix(helm): sort hooks by kind for equal weight
Feat/oci dependencies (#1)
fix(helm): sort hooks by kind for equal weight