Rancher UI - YAML reordered


I noticed a case today where editing a deployment definition in the UI changed the order of the environment variables. This wouldn’t be a problem except there are interdependent variables which are no longer available.

Is there any way around this?


Which version are you using, and is the UI the older Cluster Manager or newer Cluster Explorer? I had a quick look with the latest version of Explorer and Deployment Environment Variables do seem to respect their original order.

In terms of a workaround the order can be updated by editing the YAML directly.

It is v2.5.6 from Cluster Manager. I didn’t think to try Cluster Explorer. I’ll try it tomorrow and provide feedback. But based on your check it sounds like it’ll be fine.

Thanks for the reply!

The API used in Manager exposes the environment as a map, which has no real order (and is explicitly randomized in go sometimes) and was more or less a design mistake.

Explorer uses the underlying array that k8s actually stores so it preserves the order. In2.6 this will be the only Ui for managing tapered in clusters.

For now, if you edit a workload that needs a version order with Manager again it will be re-ordered/broken, so exercise caution.