Skip to content

Commit

Permalink
policy: add a decapod app for policies
Browse files Browse the repository at this point in the history
  • Loading branch information
sungil committed Oct 4, 2023
1 parent 6b1fdce commit 2282c84
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions templates/argo-cd/create-app-wftpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,33 @@ spec:
- {name: namespace, value: "{{item.namespace}}"}
- {name: target_cluster, value: "{{item.target_cluster}}"}
withParam: "{{inputs.parameters.list}}"

- name: argocd-sync-wait
inputs:
parameters:
- name: cluster_id
- name: appname
container:
name: argocd-sync-wait
image: harbor.taco-cat.xyz/tks/argocd-cli:v2.2.5
command:
- /bin/bash
- '-c'
- |
# log into Argo CD server
./argocd login $ARGO_SERVER --plaintext --insecure --username $ARGO_USERNAME \
--password $ARGO_PASSWORD
app_name={{inputs.parameters.cluster_id}}-{{inputs.parameters.appname}}
# sync app
echo "sync app $app_name"
./argocd app sync $app_name
# wait for sync
./argocd app wait $app_name --sync
envFrom:
- secretRef:
name: "decapod-argocd-config"
activeDeadlineSeconds: 900

0 comments on commit 2282c84

Please sign in to comment.