Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git 저장소 접근 정보를 Secret을 통해 얻습니다 #109

Merged
merged 1 commit into from
Feb 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions templates/argo-cd/create-app-wftpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
imagePullPolicy: IfNotPresent
command:
- /bin/bash
- -c
- -cx
- |
# log into Argo CD server
./argocd login $ARGO_SERVER --plaintext --insecure --username $ARGO_USERNAME \
Expand All @@ -54,6 +54,10 @@ spec:
# check if the argocd app already exists.
./argocd app get $ARGOCD_APP_NAME
if [[ $? -ne 0 ]]; then
GIT_SVC_HTTP=${GIT_SVC_URL%://*}
GIT_SVC_BASE_URL=${GIT_SVC_URL#*//}
REPO="$GIT_SVC_HTTP://$GIT_SVC_BASE_URL/$USERNAME/$SITE_NAME-manifests"

# create new application if it doesn't exist.
./argocd app create $ARGOCD_APP_NAME --repo $REPO --revision $REVISION --path $SITE_NAME/$APP_GROUP/$PATH --dest-namespace $NAMESPACE --dest-name $TARGET_CLUSTER --project $APP_GROUP --label app=$ARGOCD_APP_LABEL --directory-recurse
fi
Expand All @@ -69,11 +73,11 @@ spec:
envFrom:
- secretRef:
name: "decapod-argocd-config"
- secretRef:
name: "git-svc-token"
env:
- name: SITE_NAME
value: "{{workflow.parameters.site_name}}"
- name: REPO
value: "{{workflow.parameters.manifest_repo_url}}"
- name: REVISION
value: "{{workflow.parameters.revision}}"
- name: APP_GROUP
Expand Down