Skip to content

Commit 176a208

Browse files
committed
refactor: reorg resources to improve argocd sync speed
Signed-off-by: Bowen Sun <[email protected]>
1 parent 615acbf commit 176a208

File tree

11 files changed

+26
-6
lines changed

11 files changed

+26
-6
lines changed

packages/argo-cd/manifests/kustomization.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ resources:
77
- hub-cluster-secret.yaml
88
- appproject-cnoe.yaml
99
- appproject-demo.yaml
10-
- auth-token.yaml

packages/argo-workflows/manifests/external-secrets.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ kind: ExternalSecret
33
metadata:
44
annotations:
55
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
6+
argocd.argoproj.io/hook: PreSync
7+
argocd.argoproj.io/hook-delete-policy: HookFailed
68
name: keycloak-oidc
79
namespace: argo
810
spec:

packages/argo-workflows/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ server:
2626
- groups
2727
rbac:
2828
enabled: true
29+
volumes:
30+
- name: secret-dependency
31+
secret:
32+
secretName: keycloak-oidc
33+
volumeMounts: # explicit declaring dependency on external secret
34+
- name: secret-dependency
35+
mountPath: /do-not-use
2936
extraArgs:
3037
- --auth-mode=client
3138
- --auth-mode=sso # Required for sso configuration

packages/argo-cd/manifests/auth-token.yaml renamed to packages/backstage/manifests/argocd-auth-token.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ kind: Job
33
metadata:
44
name: auth-token
55
namespace: argocd
6-
annotations:
7-
argocd.argoproj.io/hook: PostSync
86
spec:
97
template:
108
metadata:

packages/backstage/manifests/external-secrets.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ kind: ExternalSecret
33
metadata:
44
annotations:
55
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
6+
argocd.argoproj.io/hook: PreSync
7+
argocd.argoproj.io/hook-delete-policy: HookFailed
68
name: keycloak-oidc
79
namespace: backstage
810
spec:
@@ -135,6 +137,8 @@ kind: ExternalSecret
135137
metadata:
136138
annotations:
137139
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
140+
argocd.argoproj.io/hook: PreSync
141+
argocd.argoproj.io/hook-delete-policy: HookFailed
138142
name: integrations
139143
namespace: backstage
140144
spec:

packages/backstage/manifests/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ kind: Kustomization
55
resources:
66
- external-secrets.yaml
77
- k8s-config-secret.yaml
8+
- argocd-auth-token.yaml

packages/bootstrap/bootstrap-addons.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ external-secrets:
222222
secretKey: config.json
223223
remoteRef:
224224
remoteKey: config
225+
additionalResources:
226+
- manifestPath: ../bootstrap/manifests/external-secrets
227+
type: manifests
225228

226229
crossplane:
227230
enabled: true

packages/bootstrap/manifests/argocd/kustomization.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
44

55
resources:
6-
- cnoe-local.yaml
7-
- cnoe-cluster.yaml
86
- appproject.yaml

packages/bootstrap/manifests/argocd/cnoe-cluster.yaml renamed to packages/bootstrap/manifests/external-secrets/cnoe-cluster.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ kind: ClusterSecretStore
33
metadata:
44
annotations:
55
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
6-
argocd.argoproj.io/sync-wave: "1"
76
name: cnoe-kubeconfig
87
spec:
98
provider:
@@ -27,6 +26,7 @@ metadata:
2726
annotations:
2827
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
2928
name: cnoe-kubeconfig
29+
namespace: argocd
3030
spec:
3131
refreshInterval: 1m
3232
secretStoreRef:

packages/bootstrap/manifests/argocd/cnoe-local.yaml renamed to packages/bootstrap/manifests/external-secrets/cnoe-local.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ metadata:
44
annotations:
55
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
66
name: cnoe-local
7+
namespace: argocd
78
spec:
89
refreshInterval: 1m
910
secretStoreRef:

0 commit comments

Comments
 (0)