-
Notifications
You must be signed in to change notification settings - Fork 172
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
post-install hooks do not get ran until all chart resources are ready/healthy #766
Comments
That's a clever workaround (and fairly new 😂). I actually think we should just expose this as an option in the zarf.yaml for when it's needed. Thoughts @defenseunicorns/zarf? |
It would be a relatively simple change in |
what line are you referring to? |
If you're referring to our use of |
Shouldn't the use of
|
Not according to the linked issue above. And that's all we are doing is setting wait: true, this is helm internal behavior. |
This should be investigated further, I created/deployed this package: (helm chart created to try and reproduce the issue)
Zarf properly waits for both the deployment pod to be ready AND the completion of the post-install hook job.
|
output when running with a post-install job (before it finishes):
|
We could add another mechanism to Zarf to wait for the chart between components in Zarf-land instead of helm itself without breaking everything no? |
No I don't think so, it's a really non-trivial problem. I spent weeks debugging/analyzing various deployment paradigms and helm's was the most stable for ensuring reconciliation/completion prior to moving on. Helm hooks are gross and what you use when you don't have smarter orchestration such as flux/argo/fleet/knative or some operator framework. Changing this would be a very significant change to Zarf that I am not comfortable for what is an edge case we haven't seen before. I do support exposing this control to the user though as that seems to easily meet the needs here without changing behavior for every system. Keep in mind even raw manifests/kustomizations are actually turned into helm charts for apply. Separately, I also see value in more advanced wait logic independent of Helm for things that say are controlled by flux & friends. Something like a wait condition in a component to wait for some arbitrary K8s resource to exist or be ready before proceeding. e.g. "wait for deployment xx to be healthy" or "wait for crd xx to exist". However, I see that as an advanced feature that is separate from this particular concern. |
Going to try to implement another field into the zarf.yaml to conditionalize the wait flag to helm |
## Description Add field to zarf.yaml to support not waiting for charts and manifests. Fixes #766 ## Type of change <!-- Please delete options that are not relevant --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) ## Checklist before merging <!-- Please delete options that are not relevant --> - [x] Tests have been added/updated as necessary (add the `needs-tests` label) - [x] Documentation has been updated as necessary (add the `needs-docs` label) - [ ] (Optional) Changes have been linted locally with [golangci-lint](https://github.com/golangci/golangci-lint). (NOTE: We haven't turned on lint checks in the pipeline yet so linting may be hard if it shows a lot of lint errors in places that weren't touched by changes. Thus, linting is optional right now.) Co-authored-by: Megamind <[email protected]> Co-authored-by: Wayne Starr <[email protected]>
## Description Add field to zarf.yaml to support not waiting for charts and manifests. Fixes #766 ## Type of change <!-- Please delete options that are not relevant --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) ## Checklist before merging <!-- Please delete options that are not relevant --> - [x] Tests have been added/updated as necessary (add the `needs-tests` label) - [x] Documentation has been updated as necessary (add the `needs-docs` label) - [ ] (Optional) Changes have been linted locally with [golangci-lint](https://github.com/golangci/golangci-lint). (NOTE: We haven't turned on lint checks in the pipeline yet so linting may be hard if it shows a lot of lint errors in places that weren't touched by changes. Thus, linting is optional right now.) Co-authored-by: Megamind <[email protected]> Co-authored-by: Wayne Starr <[email protected]>
Environment
Device and OS: All
App version: 0.21.3
Kubernetes distro being used: k3d/k3s
Other:
Steps to reproduce
Expected result
Post-install hook resources are created once all other resources have been created, pod that depends on post-install resource becomes healthy.
Actual Result
Post-install hook never runs so the zarf package never succeeds.
Severity/Priority
Medium - Blocking but has a workaround.
Additional Context
This can be worked around by adding a dataInjection since zarf doesn't wait for resources to be ready before running post-install hook resources.
The text was updated successfully, but these errors were encountered: