@@ -112,39 +112,60 @@ manifests:
112112 secret_keystone : true
113113 service_ingress_api : false
114114
115- # We don't want to enable OpenStack Helm's
116- # helm.sh/hooks because they set them as
117- # post-install,post-upgrade which in ArgoCD
118- # maps to PostSync. However the deployments
119- # and statefulsets in OpenStack Helm
120- # depend on the jobs to complete to become
121- # healthy. Which they cannot because they are in
122- # the post step and not in the main step.
123- # Turning this on results in the keys jobs
124- # editing the annotation which deletes the item
125- # and wipes our keys.
126- helm3_hook : false
127-
128115annotations :
116+ # we need to modify the annotations on OpenStack Helm
117+ # jobs because they use helm.sh/hooks: post-install,post-upgrade
118+ # which means they will get applied in the post phase which
119+ # is after the API deployment. With standard helm this works
120+ # out because it just orders how things are applied but with
121+ # ArgoCD it will wait until the sync phase is successful.
122+ # Unfortunately the API deployments need several jobs to occur
123+ # before it will go successful like creating the keystone user,
124+ # service, endpoints and syncing the DB. These jobs also have
125+ # a helm.sh/hook-weight to order them which is good but by moving
126+ # them to the sync phase the weight is now wrong with resources
127+ # they depend on like secrets and configmaps so we need to
128+ # override them to 0 because there is no way in OpenStack Helm
129+ # to set annotations on deployments and daemonssets nicely.
130+ # Other jobs might need to be moved as well. We do this by
131+ # moving them to the sync phase. Additionally since the jobs
132+ # are using fixed names and not generated names for each run
133+ # ArgoCD attempts to edit them but they have immutable fields
134+ # so we must force the replacement instead of attempting to diff them.
135+ # Lastly the hook-delete-policy controls the finalizer which
136+ # prevents the deletion of the job. In this case we're saying
137+ # the old job needs to be removed before applying the new one
138+ # which gets around the immutable case above.
129139 job :
130140 glance_db_sync :
131141 argocd.argoproj.io/hook : Sync
132142 argocd.argoproj.io/hook-delete-policy : BeforeHookCreation
143+ argocd.argoproj.io/sync-options : Force=true
144+ argocd.argoproj.io/sync-wave : " 0"
133145 glance_ks_service :
134146 argocd.argoproj.io/hook : Sync
135147 argocd.argoproj.io/hook-delete-policy : BeforeHookCreation
148+ argocd.argoproj.io/sync-options : Force=true
149+ argocd.argoproj.io/sync-wave : " 0"
136150 glance_ks_user :
137151 argocd.argoproj.io/hook : Sync
138152 argocd.argoproj.io/hook-delete-policy : BeforeHookCreation
153+ argocd.argoproj.io/sync-options : Force=true
154+ argocd.argoproj.io/sync-wave : " 0"
139155 glance_ks_endpoints :
140156 argocd.argoproj.io/hook : Sync
141157 argocd.argoproj.io/hook-delete-policy : BeforeHookCreation
158+ argocd.argoproj.io/sync-options : Force=true
159+ argocd.argoproj.io/sync-wave : " 0"
142160 glance_metadefs_load :
143161 argocd.argoproj.io/hook : Sync
144162 argocd.argoproj.io/hook-delete-policy : BeforeHookCreation
163+ argocd.argoproj.io/sync-options : Force=true
145164 glance_storage_init :
146165 argocd.argoproj.io/hook : Sync
147166 argocd.argoproj.io/hook-delete-policy : BeforeHookCreation
167+ argocd.argoproj.io/sync-options : Force=true
148168 glance_bootstrap :
149- argocd.argoproj.io/hook : Sync
169+ # relies on the services to be up so it can be post
150170 argocd.argoproj.io/hook-delete-policy : BeforeHookCreation
171+ argocd.argoproj.io/sync-options : Force=true
0 commit comments