Open slayer opened 4 years ago
As workaround I removed Namespace
definition and run
echo "apiVersion: v1\nkind: Namespace\nmetadata:\n name: review-app1" | kubectl apply -f -
before argocd deploy
But that looks ugly
I have this same problem, currently I am creating the namespace manually beforehand but it really needs to be a feature in ArgoCD. There is discussion here: https://github.com/argoproj/argo-cd/issues/1809
You can create the namespace the way you want to by adding a preinstall hook annotation to the namespace template, however when the application is synced, the namespace gets auto-deleted. I haven't found a way around this yet. Maybe I'll just create a helm chart that just creates the namespaces and sync that before syncing the application.
Ok, if you don't use preinstall hooks at all, it works with at least ArgoCD version 1.8. Then the namespace is created prior to everything else. But, preinstall hooks won't work then.
argocd version
.Describe the bug
I have few apps (helm charts) combined by one helm chart. Some of child charts have helm hooks for db init/migrations In top level chart I created ns template:
My problem that child helm hooks executed before namespace creation:
even with "-100" sync wave priority
I tried add to ns definition
It works well only for first deployment, all next fails with:
To Reproduce
Add child helm charts with hooks like:
Expected behavior
Namespace should be created before helm hooks
Version