File tree Expand file tree Collapse file tree 4 files changed +72
-8
lines changed Expand file tree Collapse file tree 4 files changed +72
-8
lines changed Original file line number Diff line number Diff line change
1
+ # @see https://docs.crossplane.io/latest/guides/crossplane-with-argo-cd
2
+ apiVersion : v1
3
+ kind : ConfigMap
4
+ metadata :
5
+ name : argocd-cm
6
+ namespace : argocd-system
7
+ data :
8
+ application.resourceTrackingMethod : annotation
9
+ resource.customizations : |
10
+ "*.upbound.io/*":
11
+ health.lua: |
12
+ health_status = {
13
+ status = "Progressing",
14
+ message = "Provisioning ..."
15
+ }
16
+
17
+ local function contains (table, val)
18
+ for i, v in ipairs(table) do
19
+ if v == val then
20
+ return true
21
+ end
22
+ end
23
+ return false
24
+ end
25
+
26
+ local has_no_status = {
27
+ "ProviderConfig",
28
+ "ProviderConfigUsage"
29
+ }
30
+
31
+ if obj.status == nil or next(obj.status) == nil and contains(has_no_status, obj.kind) then
32
+ health_status.status = "Healthy"
33
+ health_status.message = "Resource is up-to-date."
34
+ return health_status
35
+ end
36
+
37
+ if obj.status == nil or next(obj.status) == nil or obj.status.conditions == nil then
38
+ if obj.kind == "ProviderConfig" and obj.status.users ~= nil then
39
+ health_status.status = "Healthy"
40
+ health_status.message = "Resource is in use."
41
+ return health_status
42
+ end
43
+ return health_status
44
+ end
45
+ resource.exclusions : |
46
+ - apiGroups:
47
+ - "*"
48
+ kinds:
49
+ - ProviderConfigUsage
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ if [[ "$(kubectl config current-context)" != "kind-platform" ]]; then
11
11
fi
12
12
13
13
NS=argocd-system
14
- BASE_DIR=./argocd
14
+ BASE_DIR=" $( dirname " $0 " ) "
15
15
MANIFESTS_DIR=" $BASE_DIR /manifests"
16
16
PORT=8080
17
17
ARGO_PWD_NEW=" 12345678"
@@ -32,6 +32,10 @@ kubectl wait --for=condition=available --timeout=120s deployment/argocd-server -
32
32
exit 1
33
33
}
34
34
35
+ kubectl patch configmap argocd-cm -n $NS --patch-file $MANIFESTS_DIR /argocd-cm-patch.yaml
36
+ kubectl rollout restart deployment argocd-server -n $NS
37
+ kubectl rollout status deployment argocd-server -n $NS
38
+
35
39
# Start port-forward only if not already active
36
40
if ! lsof -i TCP:$PORT > /dev/null 2>&1 ; then
37
41
if kubectl get svc/argocd-server -n " $NS " > /dev/null 2>&1 ; then
81
85
82
86
# Apply Argo CD applications or configs
83
87
echo " Applying Argo CD manifests..."
84
- kubectl apply -f " $BASE_DIR /crossplane-claims.yaml"
88
+ kubectl apply -f " ./argocd /crossplane-claims.yaml"
85
89
86
90
echo " ✅ Argo CD setup completed successfully!"
Original file line number Diff line number Diff line change 28
28
echo " ✅ Namespace $NS already exists."
29
29
fi
30
30
31
- echo " Building Backstage image $IMAGE ..."
32
- cd ./backstage
33
- docker rmi -f $IMAGE
34
- yarn build:all
35
- yarn build-image --tag " $IMAGE " --no-cache
31
+ echo " Checking if Backstage image '$IMAGE ' already exists..."
32
+ if ! docker image inspect " $IMAGE " > /dev/null 2>&1 ; then
33
+ echo " 🔨 Building Backstage image $IMAGE ..."
34
+ cd ./backstage
35
+ yarn build:all
36
+ yarn build-image --tag " $IMAGE " --no-cache
37
+ cd ..
38
+ else
39
+ echo " ✅ Docker image $IMAGE already exists. Skipping build."
40
+ fi
41
+
36
42
kind load docker-image " $IMAGE " --name " $CLUSTER_NAME "
37
- cd ..
38
43
39
44
# Apply manifests to the cluster (idempotent)
40
45
echo " Applying manifests from $MANIFESTS_DIR ..."
Original file line number Diff line number Diff line change 18
18
automated :
19
19
prune : true
20
20
selfHeal : true
21
+ # ignoreDifferences:
22
+ # - group: platform.hooli.tech
23
+ # kind: XQueue
24
+ # jsonPointers:
25
+ # - /spec
26
+ # - /status
You can’t perform that action at this time.
0 commit comments