Add ArgoCD sync wave annotations for dbinit ordering

- job-dbinit.yaml: Added argocd.argoproj.io/sync-wave: -1 to run before deployment
- deployment.yaml: Added argocd.argoproj.io/sync-wave: 0 to run after dbinit
- This ensures database schema is initialized before app starts
This commit is contained in:
Vaibhav Pathak 2026-01-05 17:24:56 +05:30
parent ea0c8cdfdd
commit 7384bae7b1
3 changed files with 9 additions and 1 deletions

View File

@ -20,7 +20,7 @@ metadata:
helm.cnoe.io/available-values-files: '["values.yaml", "values-dev.yaml", "values-local.yaml"]' helm.cnoe.io/available-values-files: '["values.yaml", "values-dev.yaml", "values-local.yaml"]'
helm.cnoe.io/dependencies: '{}' helm.cnoe.io/dependencies: '{}'
# Dependency URL mapping for environment provisioning # Dependency URL mapping for environment provisioning
helm.cnoe.io/dependency-urls: '{"hades-service": {"helmParam": "hades.baseUrl", "port": 8080, "serviceDns": "hades"}}' helm.cnoe.io/dependency-urls: '{"hades-service": {"helmParam": "hades.baseUrl", "port": 8080, "serviceDns": "hades-service"}}'
tags: tags:
- configuration - configuration
- settings - settings

View File

@ -4,6 +4,9 @@ metadata:
name: {{ include "property-settings-svc-v2-chart.fullname" . }} name: {{ include "property-settings-svc-v2-chart.fullname" . }}
labels: labels:
{{- include "property-settings-svc-v2-chart.labels" . | nindent 4 }} {{- include "property-settings-svc-v2-chart.labels" . | nindent 4 }}
annotations:
# ArgoCD sync wave - run after dbinit job (wave -1)
argocd.argoproj.io/sync-wave: "0"
spec: spec:
{{- if not .Values.autoscaling.enabled }} {{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }} replicas: {{ .Values.replicaCount }}

View File

@ -7,6 +7,11 @@ metadata:
{{- include "property-settings-svc-v2-chart.labels" . | nindent 4 }} {{- include "property-settings-svc-v2-chart.labels" . | nindent 4 }}
app.kubernetes.io/component: dbinit app.kubernetes.io/component: dbinit
annotations: annotations:
# ArgoCD sync wave - run before deployment (wave 0)
argocd.argoproj.io/sync-wave: "-1"
argocd.argoproj.io/hook: Sync
argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
# Helm hooks (for non-ArgoCD deployments)
"helm.sh/hook": post-install,post-upgrade "helm.sh/hook": post-install,post-upgrade
"helm.sh/hook-weight": "-5" "helm.sh/hook-weight": "-5"
"helm.sh/hook-delete-policy": before-hook-creation "helm.sh/hook-delete-policy": before-hook-creation