Skip to content

Commit f39fbef

Browse files
committed
Fix Makefile to preserve ArgoCD annotation after manifest regeneration
The make manifests target regenerates RBAC role.yaml using controller-gen, which strips manually-added annotations. This adds a post-processing step using awk to re-add the ArgoCD sync-wave annotation that was added in PR jumpstarter-dev#207 to ensure proper deployment ordering.
1 parent 27bd46d commit f39fbef

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

controller/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust
6666
output:crd:artifacts:config=deploy/helm/jumpstarter/crds/ \
6767
output:rbac:artifacts:config=deploy/helm/jumpstarter/charts/jumpstarter-controller/templates/rbac/
6868

69+
# Add ArgoCD sync-wave annotation to RBAC role for proper deployment ordering (PR #207)
70+
@awk '/^ name: jumpstarter-manager-role$$/{print; print " annotations:"; print " argocd.argoproj.io/sync-wave: \"-1\""; next}1' \
71+
deploy/helm/jumpstarter/charts/jumpstarter-controller/templates/rbac/role.yaml > \
72+
deploy/helm/jumpstarter/charts/jumpstarter-controller/templates/rbac/role.yaml.tmp && \
73+
mv deploy/helm/jumpstarter/charts/jumpstarter-controller/templates/rbac/role.yaml.tmp \
74+
deploy/helm/jumpstarter/charts/jumpstarter-controller/templates/rbac/role.yaml
75+
6976
cp deploy/helm/jumpstarter/crds/* deploy/operator/config/crd/bases/
7077
cp deploy/helm/jumpstarter/crds/* deploy/helm/jumpstarter/charts/jumpstarter-controller/templates/crds/
7178

0 commit comments

Comments
 (0)