-
Notifications
You must be signed in to change notification settings - Fork 62
kubecfg show does not always return stable output #123
Comments
I think this was fixed in #178, since that change uses "dependency" order and then falls back to alphabetical order (alpha sort on namespace/name/kind), which should be stable for any given input. Previously that alpha fallback wasn't there, so objects with equal "dependency tier" would be reported in indeterminate order. |
This just hurt bitnami-labs/sealed-secrets#99 #178 never fixed this for The downside of a dependency sort on |
Hi, Was there any news about this ? Our problem is that after a show we commit the yaml generated into a git repo, but is impossible to check the git diff since the order of resources is "always different" at every kubecfg show Is it possible to even jsut get a flag to do alphabetical order on show ? |
@primeroz hrm, I thought I had improved this. Which version are you using? |
I am using 0.9.1 I will try and get a proof of concept example and post it here |
Example: I have a jsonnet to generate some basic resources for a namespace , i run it 3 times in a row and got 3 different ordering
|
@anguslees FYI i just tried with latest and the problem is still there |
I finally realized that by wrapping all my resources in a "kube.List" the output is now ordered and consistent between runs. Also kubecfg is only exposing the resources inside the list unwrapping them from the list so that makes it even better For anyone else reading this, check this example |
Addressing vmware-archive#123.
This is really a blocker for my gitops setup. I wonder if the proposed fix makes sense. |
My PR wouldn't work for the general case because of breaking the dependency order. But I'm feeding that file to Argo CD, which seems smart enough to sync things with reasonable order. |
I have noticed that with more complex kubecfg configuration, it does not return stable output (i.e. same output for exactly same input), which is what jsonnet does.
Unfortunately I can't provide a snippet that allows reproducing the issue at this time.
The text was updated successfully, but these errors were encountered: