@@ -112,39 +112,60 @@ manifests:
112
112
secret_keystone : true
113
113
service_ingress_api : false
114
114
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
-
128
115
annotations :
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.
129
139
job :
130
140
glance_db_sync :
131
141
argocd.argoproj.io/hook : Sync
132
142
argocd.argoproj.io/hook-delete-policy : BeforeHookCreation
143
+ argocd.argoproj.io/sync-options : Force=true
144
+ argocd.argoproj.io/sync-wave : " 0"
133
145
glance_ks_service :
134
146
argocd.argoproj.io/hook : Sync
135
147
argocd.argoproj.io/hook-delete-policy : BeforeHookCreation
148
+ argocd.argoproj.io/sync-options : Force=true
149
+ argocd.argoproj.io/sync-wave : " 0"
136
150
glance_ks_user :
137
151
argocd.argoproj.io/hook : Sync
138
152
argocd.argoproj.io/hook-delete-policy : BeforeHookCreation
153
+ argocd.argoproj.io/sync-options : Force=true
154
+ argocd.argoproj.io/sync-wave : " 0"
139
155
glance_ks_endpoints :
140
156
argocd.argoproj.io/hook : Sync
141
157
argocd.argoproj.io/hook-delete-policy : BeforeHookCreation
158
+ argocd.argoproj.io/sync-options : Force=true
159
+ argocd.argoproj.io/sync-wave : " 0"
142
160
glance_metadefs_load :
143
161
argocd.argoproj.io/hook : Sync
144
162
argocd.argoproj.io/hook-delete-policy : BeforeHookCreation
163
+ argocd.argoproj.io/sync-options : Force=true
145
164
glance_storage_init :
146
165
argocd.argoproj.io/hook : Sync
147
166
argocd.argoproj.io/hook-delete-policy : BeforeHookCreation
167
+ argocd.argoproj.io/sync-options : Force=true
148
168
glance_bootstrap :
149
- argocd.argoproj.io/hook : Sync
169
+ # relies on the services to be up so it can be post
150
170
argocd.argoproj.io/hook-delete-policy : BeforeHookCreation
171
+ argocd.argoproj.io/sync-options : Force=true
0 commit comments