-
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
Endless deploy loop on using before hooks which generate yaml value files #7183
Comments
@Forestsoft-de as per the docs, can you set Please let me know if it works |
Hey @tejal29 no its still the same problem. endless loop of deployments. BR |
This is caused by skaffold registers project dependencies to monitor to watch file changes before the actual first dev loop. The hook defined here modifies project dependencies when it runs and skaffold detect the change then redeploy the project and before redeploying, the hook runs again, this causes endless loop. The workaround here is to remove hooks stanza from skaffold config and run it manually. We can perhaps to add some kind of before hooks stanza which define actions to be run before the whole config parsing, but this needs further discussion. |
I'm experiencing the exact same problem. I'd really like to see this fixed because creating a value file gives you a lot of freedom in your Helm deployment. |
I'm experiencing the same issue. My skaffold pre-build hooks copy a config file into the manifests:
kustomize:
paths:
- deployment/dev
hooks:
before:
- host:
command: ["sh", "-c", "cp otel/collector-config.yaml deployment/dev/collector-config.yaml"]
os: [darwin, linux]
- host:
command: ["powershell", "-Command", "copy otel/collector-config.yaml deployment/dev/collector-config.yaml"]
os: [windows] This results in One possible solution would be to keep hashes of the project dependency files, and only trigger a redeploy if the hash is different; i.e. running |
I use a I fixed this in my E.g. I went from
to
And I switched to using |
My requirement is to generate the helm configuration based on certain Environment variables right before the helm deplyoment task starts.
Expected behavior
Skaffold should deploy only once and skipped paths should respected
Actual behavior
Regarding to the logs skaffold ignores my folder there a helm values file is autogenerated before the helm command is invoked
Skaffold recognize a change in the generated values file and try to redeploy the changes. The result is an endless loop of helm deployments.
Information
Steps to reproduce the behavior
skaffold dev
...
DEBU[0061] Skipping excluded path: build/skaffold
...
INFO[0062] files modified: [./build/skaffold/skaffold-helm-values.yaml] subtask=-1 task=DevLoop
...
The text was updated successfully, but these errors were encountered: