From 84f84abc0eea31a60cd33e06d1f3e013ed101afc Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Thu, 2 Apr 2026 20:34:37 +0800 Subject: [PATCH] refactor(gitops): rename database stack dependency --- .../clusters/pre/accounts-pre-kustomization.yaml | 3 +++ .../clusters/pre/console-pre-kustomization.yaml | 3 +++ .../prod/accounts-prod-kustomization.yaml | 2 +- .../prod/console-prod-kustomization.yaml | 2 +- infra/clusters/prod/database-kustomization.yaml | 16 ++++++++++++++++ infra/clusters/prod/kustomization.yaml | 2 +- infra/clusters/prod/pre-kustomization.yaml | 1 - 7 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 infra/clusters/prod/database-kustomization.yaml diff --git a/infra/clusters/pre/accounts-pre-kustomization.yaml b/infra/clusters/pre/accounts-pre-kustomization.yaml index aad2ac9..5d3485d 100644 --- a/infra/clusters/pre/accounts-pre-kustomization.yaml +++ b/infra/clusters/pre/accounts-pre-kustomization.yaml @@ -11,3 +11,6 @@ spec: kind: GitRepository name: platform-config path: ./apps/core/accounts/pre + dependsOn: + - name: platform-k3s + - name: database-stack diff --git a/infra/clusters/pre/console-pre-kustomization.yaml b/infra/clusters/pre/console-pre-kustomization.yaml index 59e3987..1b989be 100644 --- a/infra/clusters/pre/console-pre-kustomization.yaml +++ b/infra/clusters/pre/console-pre-kustomization.yaml @@ -11,3 +11,6 @@ spec: kind: GitRepository name: platform-config path: ./apps/core/console/pre + dependsOn: + - name: platform-k3s + - name: accounts-pre diff --git a/infra/clusters/prod/accounts-prod-kustomization.yaml b/infra/clusters/prod/accounts-prod-kustomization.yaml index d33b303..7681b65 100644 --- a/infra/clusters/prod/accounts-prod-kustomization.yaml +++ b/infra/clusters/prod/accounts-prod-kustomization.yaml @@ -13,4 +13,4 @@ spec: path: ./apps/core/accounts/prod dependsOn: - name: platform-k3s - - name: infrastructure-stack + - name: database-stack diff --git a/infra/clusters/prod/console-prod-kustomization.yaml b/infra/clusters/prod/console-prod-kustomization.yaml index b040f15..606b4a3 100644 --- a/infra/clusters/prod/console-prod-kustomization.yaml +++ b/infra/clusters/prod/console-prod-kustomization.yaml @@ -13,4 +13,4 @@ spec: path: ./apps/core/console/prod dependsOn: - name: platform-k3s - - name: infrastructure-stack + - name: accounts-prod diff --git a/infra/clusters/prod/database-kustomization.yaml b/infra/clusters/prod/database-kustomization.yaml new file mode 100644 index 0000000..64db328 --- /dev/null +++ b/infra/clusters/prod/database-kustomization.yaml @@ -0,0 +1,16 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: database-stack + namespace: flux-system +spec: + interval: 5m0s + prune: true + wait: true + timeout: 10m0s + sourceRef: + kind: GitRepository + name: platform-config + path: ./databases/postgresql + dependsOn: + - name: platform-k3s diff --git a/infra/clusters/prod/kustomization.yaml b/infra/clusters/prod/kustomization.yaml index 1a6d3ba..7b1b325 100644 --- a/infra/clusters/prod/kustomization.yaml +++ b/infra/clusters/prod/kustomization.yaml @@ -3,7 +3,7 @@ kind: Kustomization resources: - namespaces.yaml - platform-kustomization.yaml - - infrastructure-kustomization.yaml + - database-kustomization.yaml - observability-kustomization.yaml - console-prod-kustomization.yaml - accounts-prod-kustomization.yaml diff --git a/infra/clusters/prod/pre-kustomization.yaml b/infra/clusters/prod/pre-kustomization.yaml index f43f178..b198c12 100644 --- a/infra/clusters/prod/pre-kustomization.yaml +++ b/infra/clusters/prod/pre-kustomization.yaml @@ -13,4 +13,3 @@ spec: path: ./infra/clusters/pre dependsOn: - name: platform-k3s - - name: infrastructure-stack