From 59441d8286e6531eaec2aefc56d4107b25f8c59d Mon Sep 17 00:00:00 2001 From: Ruben Hensen Date: Wed, 26 Mar 2025 12:36:03 +0100 Subject: [PATCH] Add sync wave --- apps/templates/ghost-blog-folder.yaml | 42 +++++++++++++-------------- ghost-blog/ghost-config-es.yaml | 2 ++ ghost-blog/ghost-deployment.yaml | 2 ++ ghost-blog/ingress.yaml | 1 + ghost-blog/mysql-es.yaml | 2 ++ ghost-blog/mysql.yaml | 2 ++ ghost-blog/namespace.yaml | 11 ------- ghost-blog/pvc.yaml | 3 ++ ghost-blog/services.yaml | 3 ++ 9 files changed, 36 insertions(+), 32 deletions(-) delete mode 100644 ghost-blog/namespace.yaml diff --git a/apps/templates/ghost-blog-folder.yaml b/apps/templates/ghost-blog-folder.yaml index 2de4e9b..e953dac 100644 --- a/apps/templates/ghost-blog-folder.yaml +++ b/apps/templates/ghost-blog-folder.yaml @@ -1,21 +1,21 @@ -# apiVersion: argoproj.io/v1alpha1 -# kind: Application -# metadata: -# name: ghost-blog -# namespace: argocd -# finalizers: -# - resources-finalizer.argocd.argoproj.io -# spec: -# project: default -# source: -# repoURL: https://github.com/rubenhensen/k8scd.git -# targetRevision: HEAD -# path: ghost-blog -# destination: -# server: https://kubernetes.default.svc -# namespace: ghost-blog -# syncPolicy: -# syncOptions: -# - CreateNamespace=true -# automated: -# selfHeal: true +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: ghost-blog + namespace: argocd + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: default + source: + repoURL: https://github.com/rubenhensen/k8scd.git + targetRevision: HEAD + path: ghost-blog + destination: + server: https://kubernetes.default.svc + namespace: ghost-blog + syncPolicy: + syncOptions: + - CreateNamespace=true + automated: + selfHeal: true diff --git a/ghost-blog/ghost-config-es.yaml b/ghost-blog/ghost-config-es.yaml index 367b5f6..393ccbf 100644 --- a/ghost-blog/ghost-config-es.yaml +++ b/ghost-blog/ghost-config-es.yaml @@ -3,6 +3,8 @@ kind: ExternalSecret metadata: name: ghost-config-prod namespace: ghost-blog + annotations: + argocd.argoproj.io/sync-wave: "4" spec: refreshInterval: "15m" secretStoreRef: diff --git a/ghost-blog/ghost-deployment.yaml b/ghost-blog/ghost-deployment.yaml index e53a61b..34db30f 100644 --- a/ghost-blog/ghost-deployment.yaml +++ b/ghost-blog/ghost-deployment.yaml @@ -10,6 +10,8 @@ metadata: app.kubernetes.io/version: '5.92' app.kubernetes.io/component: ghost app.kubernetes.io/part-of: ghost-blog + annotations: + argocd.argoproj.io/sync-wave: "6" spec: replicas: 1 selector: diff --git a/ghost-blog/ingress.yaml b/ghost-blog/ingress.yaml index 3b99ca7..8ddb807 100644 --- a/ghost-blog/ingress.yaml +++ b/ghost-blog/ingress.yaml @@ -13,6 +13,7 @@ metadata: annotations: cert-manager.io/cluster-issuer: prod-cluster-issuer nginx.ingress.kubernetes.io/proxy-body-size: 1G + argocd.argoproj.io/sync-wave: "7" spec: ingressClassName: nginx tls: diff --git a/ghost-blog/mysql-es.yaml b/ghost-blog/mysql-es.yaml index 4aad1c7..5b3ac47 100644 --- a/ghost-blog/mysql-es.yaml +++ b/ghost-blog/mysql-es.yaml @@ -3,6 +3,8 @@ kind: ExternalSecret metadata: name: ghost-mysql-env namespace: ghost-blog + annotations: + argocd.argoproj.io/sync-wave: "1" spec: refreshInterval: "15m" secretStoreRef: diff --git a/ghost-blog/mysql.yaml b/ghost-blog/mysql.yaml index 195c117..7baa6e1 100644 --- a/ghost-blog/mysql.yaml +++ b/ghost-blog/mysql.yaml @@ -10,6 +10,8 @@ metadata: app.kubernetes.io/version: '5.92' app.kubernetes.io/component: database app.kubernetes.io/part-of: ghost-blog + annotations: + argocd.argoproj.io/sync-wave: "5" spec: serviceName: ghost-mysql-service replicas: 1 diff --git a/ghost-blog/namespace.yaml b/ghost-blog/namespace.yaml deleted file mode 100644 index 7d0fedc..0000000 --- a/ghost-blog/namespace.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# apiVersion: v1 -# kind: Namespace -# metadata: -# name: ghost-blog -# labels: -# app: ghost-blog -# app.kubernetes.io/name: ghost-blog -# app.kubernetes.io/instance: ghost-blog -# app.kubernetes.io/version: '5.92' -# app.kubernetes.io/component: namespace -# app.kubernetes.io/part-of: ghost-blog diff --git a/ghost-blog/pvc.yaml b/ghost-blog/pvc.yaml index a82bd4e..2045604 100644 --- a/ghost-blog/pvc.yaml +++ b/ghost-blog/pvc.yaml @@ -10,6 +10,8 @@ metadata: app.kubernetes.io/version: '5.92' app.kubernetes.io/component: storage app.kubernetes.io/part-of: ghost-blog + annotations: + argocd.argoproj.io/sync-wave: "2" spec: storageClassName: "longhorn" volumeMode: Filesystem @@ -31,6 +33,7 @@ metadata: app.kubernetes.io/version: '5.92' app.kubernetes.io/component: database-storage app.kubernetes.io/part-of: ghost-blog + argocd.argoproj.io/sync-wave: "2" spec: storageClassName: "longhorn" volumeMode: Filesystem diff --git a/ghost-blog/services.yaml b/ghost-blog/services.yaml index 43551ad..53eee3e 100644 --- a/ghost-blog/services.yaml +++ b/ghost-blog/services.yaml @@ -10,6 +10,8 @@ metadata: app.kubernetes.io/version: '5.92' app.kubernetes.io/component: service-frontend app.kubernetes.io/part-of: ghost-blog + annotations: + argocd.argoproj.io/sync-wave: "3" spec: ports: - port: 2368 @@ -33,6 +35,7 @@ metadata: app.kubernetes.io/version: '5.92' app.kubernetes.io/component: service-database app.kubernetes.io/part-of: ghost-blog + argocd.argoproj.io/sync-wave: "3" spec: ports: - port: 3306