Skip to content

Commit 2865014

Browse files
committed
refactor(argocd): migrate Crossplane management to ApplicationSet with sync waves
Replaces single Application with an ApplicationSet to manage resources by sync wave. Removes outdated kustomization.yaml and legacy Argo CD sync annotations from provider manifests.
1 parent 31562c2 commit 2865014

File tree

4 files changed

+43
-45
lines changed

4 files changed

+43
-45
lines changed

argocd/crossplane-system.yaml

Lines changed: 43 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,48 @@
11
apiVersion: argoproj.io/v1alpha1
2-
kind: Application
2+
kind: ApplicationSet
33
metadata:
44
name: crossplane-system
55
namespace: argocd-system
66
spec:
7-
project: default
8-
source:
9-
repoURL: "git@github.com:wnqueiroz/platform-engineering-backstack.git"
10-
targetRevision: feature-argocd # TODO: change to main
11-
path: crossplane
12-
kustomize: {}
13-
destination:
14-
server: https://kubernetes.default.svc
15-
namespace: crossplane-system
16-
syncPolicy:
17-
automated:
18-
prune: true
19-
selfHeal: true
20-
syncOptions:
21-
- SyncWaveOrder=true
22-
retry:
23-
limit: 5
24-
backoff:
25-
duration: 5s
26-
factor: 2
27-
maxDuration: 1m
28-
ignoreDifferences:
29-
- group: "hooli.tech"
30-
kind: "XQueueClaim"
31-
jsonPointers:
32-
- "/metadata"
33-
- group: "hooli.tech"
34-
kind: "XQueue"
35-
jsonPointers:
36-
- "/metadata"
7+
generators:
8+
- list:
9+
elements:
10+
- name: providers
11+
path: crossplane/providers
12+
wave: "0"
13+
- name: providers-config
14+
path: crossplane/providers-config
15+
wave: "1"
16+
- name: functions
17+
path: crossplane/functions
18+
wave: "2"
19+
- name: compositions
20+
path: crossplane/compositions/aws
21+
wave: "3"
22+
- name: xrds
23+
path: crossplane/xrds
24+
wave: "4"
25+
- name: claims
26+
path: crossplane/claims
27+
wave: "5"
28+
29+
template:
30+
metadata:
31+
name: crossplane-{{name}}
32+
annotations:
33+
argocd.argoproj.io/sync-wave: "{{wave}}"
34+
spec:
35+
project: default
36+
source:
37+
repoURL: git@github.com:wnqueiroz/platform-engineering-backstack.git
38+
targetRevision: feature-argocd # TODO: change to main
39+
path: "{{path}}"
40+
directory:
41+
recurse: true
42+
destination:
43+
server: https://kubernetes.default.svc
44+
namespace: crossplane-system
45+
syncPolicy:
46+
automated:
47+
prune: true
48+
selfHeal: true

crossplane/kustomization.yaml

Lines changed: 0 additions & 10 deletions
This file was deleted.

crossplane/providers-config/localstack-provider-config.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ kind: ProviderConfig
55
metadata:
66
name: default
77
namespace: crossplane-system
8-
annotations:
9-
argocd.argoproj.io/sync-wave: "-1"
108
spec:
119
endpoint:
1210
url:

crossplane/providers/aws/sqs.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,5 @@ kind: Provider
33
metadata:
44
name: provider-aws-sqs
55
namespace: crossplane-system
6-
annotations:
7-
argocd.argoproj.io/sync-wave: "-2"
86
spec:
97
package: xpkg.upbound.io/upbound/provider-aws-sqs:v1.21.1

0 commit comments

Comments
 (0)