istio-ecosystem / sail-operator

The Sail Operator is able to install and manage the lifecycle of the Istio control plane in an Kubernetes & OpenShift cluster.
Apache License 2.0
42 stars 29 forks source link

`helm rollback` to current revision when nothing has changed #429

Open dgn opened 1 month ago

dgn commented 1 month ago

We will currently bump the revision number every time we reconcile a resource because we always perform an upgrade. That shouldn't be necessary in most cases. In order to restore the indended state of a helm chart, it is enough to rollback to the current revision.

luksa commented 1 month ago

I tried this at some point, but ran into some issues. Can't remember what they were. If we can't get rollback to work, we need to modify the code so that it renders the resources and then we compare them with the current state of those same resources and perform updates only when there's a difference.

dgn commented 1 month ago

I tried this at some point, but ran into some issues. Can't remember what they were. If we can't get rollback to work, we need to modify the code so that it renders the resources and then we compare them with the current state of those same resources and perform updates only when there's a difference.

I thought about that, but wasn't sure comparing all the resources to desired state would be better than current behavior - we're blasting the API server with Get()s at that point. Rolling back to current revision worked in my limited local tests but maybe there's a catch, I do remember us looking at this previously.

luksa commented 1 month ago

No, gets are handled locally (they go to the local cache), not the API server.