-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remote helm charts should be upgraded by default #4431
Comments
@yolkov thanks for the issue, and sorry we made your life harder with this change. this is a bit tough because for however, for using
if this is true, then the main question here for me becomes:
the first option is less confusing, but requires cc @dahovey if you have any opinions on this :) and cc @dgageot if you have any thoughts |
Hi @yolkov, I definitely agree with your @nkubala I don't have any hard opinions on this. I didn't use skaffold for CI/CD, so unfortunately, didn't work thru these scenarios. I guess I lean toward your second option. If Since I only used part of the power of
|
Yes, helm creates new releases every time, but this is only a change to the metadata (which is stored in helm's configmap). If the helm chart version does not change and the values do not change, the kubernetes entities created by the chart(deployment,statefullsets, services, ingress, configmap, etc) will not deploy again and will not be changed. |
For example:
run: in another console run:
then change skaffold-example.yaml skaffold run this commands:
Skaffold start re-deploy and for every release run helm upgrade ... , but all pods do not restart. If we change the Values of the chart, the embedded chart logic will be executed and most likely the pod of this chart will restart. You can install helm-diff plugin https://github.com/databus23/helm-diff and see what changes will occur during deployment: stop skaffold, then if you remove the value "usePassword=false" and restart skaffold again, then we will have changes every time we deploy it
According to the logic of the redis chart, without the value "usePassword=false", the pod will be deployed every time. For example, with the current mysql chart values. Each deployment also has changes:
But by the embedded mysql chart logic, these changes will not make the pod to restart. As I mentioned before, you do not need to interfere with the built-in logic of the chart, you need to use them correctly or fork the chart to suit your needs. |
I ran into this when trying to upgrade a remote chart using skaffold. I updated the |
@nkubala any update? |
Another user perspective here: My team provides (company internal) charts with opinionated defaults for a given language framework. Developers who don't want to take on the maintenance overhead of maintaining their chart(s) can reference our remote charts from skaffold.yaml instead. Upgrading from skaffold 1.9.1 to 1.16.0 caused a breaking change as services deployed via skaffold (using remote charts) were no longer updating. As noted by others, adding The change in default behavior for existing skaffold.yaml files was surprising given the care and discipline used to maintain skaffold.yaml schema versions. Our CI/CD systems lock the skaffold version used but I suspect this has been a source of frustration for several of our developers who installed skaffold using homebrew or linux package managers that track the latest version. It was certainly frustrating for me to track down once I upgraded to a newer version of skaffold. If the current default behavior is going to remain, would it be reasonable to expect that |
@yolkov Currently
skaffold fix updating to true , might break other use cases like dev . Its always a tough decsion to provide sane defaults for all use cases.
Closing this due to inactivity and no further action needed. |
/reopen This is not convenient, to prescribe a senseless option in all our services, in all environments for each release we need to add |
@tejal29 |
We use Skaffold, not only for local development, but also for CI/CD.
After this issue Skaffold changed the behavior for remote Charts without the configuration option "upgradeOnChange: true" it will not deploy anything even if you change only values, and the Chart itself remains the same version.
Expected behavior
Otherwise it breaks backward compatibility. For CI/CD we use Skaffold with remote Helm Charts only for dozens of services in production. Skaffold updating with this change force us to update all these product and infrastructure services.
These changes are hard to test, because the problem occurs only when you change either a Chart version or values. I make changes to values of the Chart and expect them to apply, but I still need to enable some options.
I don't understand the purpose of this option. For example, I have several services that depend on a single remote chart. I need to update the chart and deploy all dependent services from this chart. With the current option, I will have to do the following:
Changing values should always start deployment and execute the intended Chart logic, regardless of whether option "upgradeOnChange" is enabled or not. We make changes of Chart values advisedly and there is no need to confirm this with an additional option.
If you decide to keep this option, please add ENV for it.
Helm supports version control https://helm.sh/docs/chart_best_practices/conventions/#version-numbers, https://helm.sh/docs/topics/charts/#charts-and-versioning (similar to python with requirements.txt, ruby with gemfile, php with composer.json, go modules with go. mod, etc). Correspondingly, if you don't change the version of the Chart, the Helm will do only what is inherent in the logic of the Chart.
If there is no special logic for changes each time you deploy these changes, then Helm no deploy anything. Not need to intervene in the logic of the Charts, if it doesn't approach you then fork and modify Chart as you require or go to use another chart. Skaffold should not interfere in the logic of the Charts, except setting values that it is doing well. As a result, the fundamental error was made in this issue, they did not fix the Chart versions, and so the Chart version was updated when deployed, and Helm did what it was supposed to do. This is just the wrong use of the Helm.
You may need to add a check. if "remote: true", the Chart version field should be mandatory.
Actual behavior
For remote Charts, and for local ones, too, if values change, the Chart must deployed and perform the logic laid down in the Chart(change configmaps, redeploy deployments, statefulsets, change ingress resources, etc.), but now Charts not deployed.
Information
P.S. Please do not break backward compatibility if possible. For companies that use Skaffold in production for CI/CD for dozens, hundreds of services, broken backward compatibility leads to a lot of work, either blocking the transition to the new version, or incidents in production.
(sorry for not good English)
The text was updated successfully, but these errors were encountered: