From 25d906212375dcca40bdf0315ec781f7fac46621 Mon Sep 17 00:00:00 2001 From: Jugwan Eom Date: Thu, 13 Jun 2024 08:53:41 +0000 Subject: [PATCH 1/2] use tks harbor registry for redis --- argocd-install/template-values-override.yaml | 2 +- argocd-install/values-override.yaml | 2 +- generate_yamls.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/argocd-install/template-values-override.yaml b/argocd-install/template-values-override.yaml index de56870..ccefada 100644 --- a/argocd-install/template-values-override.yaml +++ b/argocd-install/template-values-override.yaml @@ -65,7 +65,7 @@ dex: enabled: true redis: image: - repository: ${DOCKER_IMAGE_REPO}/library/redis + repository: ${DOCKER_IMAGE_REPO}/tks/redis controller: metrics: enabled: true diff --git a/argocd-install/values-override.yaml b/argocd-install/values-override.yaml index bda7365..d7f5bcb 100644 --- a/argocd-install/values-override.yaml +++ b/argocd-install/values-override.yaml @@ -65,7 +65,7 @@ dex: enabled: true redis: image: - repository: docker.io/library/redis + repository: harbor.taco-cat.xyz/tks/redis controller: metrics: enabled: true diff --git a/generate_yamls.sh b/generate_yamls.sh index 1a7572b..38ab3c7 100755 --- a/generate_yamls.sh +++ b/generate_yamls.sh @@ -6,7 +6,7 @@ DECAPOD_SITE_NAME="decapod-reference" DECAPOD_BOOTSTRAP_GIT_REPO_URL="https://github.com/openinfradev/decapod-bootstrap.git" DECAPOD_MANIFESTS_GIT_REPO_URL="https://github.com/openinfradev/decapod-manifests.git" -DOCKER_IMAGE_REPO="docker.io" +DOCKER_IMAGE_REPO="harbor.taco-cat.xyz" QUAY_IMAGE_REPO="quay.io" GITHUB_IMAGE_REPO="ghcr.io" From 8dbcc93651971b015303a2ada898cdbd10a55b5d Mon Sep 17 00:00:00 2001 From: Jugwan Eom Date: Thu, 13 Jun 2024 08:54:07 +0000 Subject: [PATCH 2/2] fix indents and styles --- argocd-install/template-values-override.yaml | 6 +- argocd-install/values-override.yaml | 6 +- generate_yamls.sh | 71 +++++++++++--------- 3 files changed, 49 insertions(+), 34 deletions(-) diff --git a/argocd-install/template-values-override.yaml b/argocd-install/template-values-override.yaml index ccefada..1ffd450 100644 --- a/argocd-install/template-values-override.yaml +++ b/argocd-install/template-values-override.yaml @@ -48,11 +48,13 @@ server: health_status.status = "Healthy" health_status.message = "Prometheus is deployed" return health_status - resource.customizations.ignoreDifferences.admissionregistration.k8s.io_MutatingWebhookConfiguration: | + resource.customizations.ignoreDifferences.admissionregistration.k8s.io_MutatingWebhookConfiguration: + | jqPathExpressions: - '.webhooks[]?.clientConfig.caBundle' - '.webhooks[]?.failurePolicy' - resource.customizations.ignoreDifferences.admissionregistration.k8s.io_ValidatingWebhookConfiguration: | + resource.customizations.ignoreDifferences.admissionregistration.k8s.io_ValidatingWebhookConfiguration: + | jqPathExpressions: - '.webhooks[]?.clientConfig.caBundle' - '.webhooks[]?.failurePolicy' diff --git a/argocd-install/values-override.yaml b/argocd-install/values-override.yaml index d7f5bcb..8a4f801 100644 --- a/argocd-install/values-override.yaml +++ b/argocd-install/values-override.yaml @@ -48,11 +48,13 @@ server: health_status.status = "Healthy" health_status.message = "Prometheus is deployed" return health_status - resource.customizations.ignoreDifferences.admissionregistration.k8s.io_MutatingWebhookConfiguration: | + resource.customizations.ignoreDifferences.admissionregistration.k8s.io_MutatingWebhookConfiguration: + | jqPathExpressions: - '.webhooks[]?.clientConfig.caBundle' - '.webhooks[]?.failurePolicy' - resource.customizations.ignoreDifferences.admissionregistration.k8s.io_ValidatingWebhookConfiguration: | + resource.customizations.ignoreDifferences.admissionregistration.k8s.io_ValidatingWebhookConfiguration: + | jqPathExpressions: - '.webhooks[]?.clientConfig.caBundle' - '.webhooks[]?.failurePolicy' diff --git a/generate_yamls.sh b/generate_yamls.sh index 38ab3c7..11599d3 100755 --- a/generate_yamls.sh +++ b/generate_yamls.sh @@ -13,8 +13,8 @@ GITHUB_IMAGE_REPO="ghcr.io" GIT_REVISION="main" function usage { - echo -e "\nUsage: $0 [--site SITE_NAME] [--bootstrap-git BOOTSTRAP_GIT_URL ] [--manifests-git MANIFESTS_GIT_URL] [--git-rev GIT_REVISION] [--registry REGISTRY_URL]" - exit 1 + echo -e "\nUsage: $0 [--site SITE_NAME] [--bootstrap-git BOOTSTRAP_GIT_URL ] [--manifests-git MANIFESTS_GIT_URL] [--git-rev GIT_REVISION] [--registry REGISTRY_URL]" + exit 1 } # We use "$@" instead of $* to preserve argument-boundary information @@ -22,24 +22,39 @@ ARGS=$(getopt -o 's:b:m:g:r:h' --long 'site:,bootstrap-git:,manifests-git:,git-r eval "set -- $ARGS" while true; do - case $1 in - (-h|--help) - usage; shift 2;; - (-s|--site) - DECAPOD_SITE_NAME=$2; shift 2;; - (-b|--bootstrap-git) - DECAPOD_BOOTSTRAP_GIT_REPO_URL=$2; shift 2;; - (-m|--manifests-git) - DECAPOD_MANIFESTS_GIT_REPO_URL=$2; shift 2;; - (-g|--git-rev) - GIT_REVISION=$2; shift 2;; - (-r|--registry) - DOCKER_IMAGE_REPO=$2 - QUAY_IMAGE_REPO=$2 - GITHUB_IMAGE_REPO=$2; shift 2;; - (--) shift; break;; - (*) exit 1;; # error - esac + case $1 in + -h | --help) + usage + shift 2 + ;; + -s | --site) + DECAPOD_SITE_NAME=$2 + shift 2 + ;; + -b | --bootstrap-git) + DECAPOD_BOOTSTRAP_GIT_REPO_URL=$2 + shift 2 + ;; + -m | --manifests-git) + DECAPOD_MANIFESTS_GIT_REPO_URL=$2 + shift 2 + ;; + -g | --git-rev) + GIT_REVISION=$2 + shift 2 + ;; + -r | --registry) + DOCKER_IMAGE_REPO=$2 + QUAY_IMAGE_REPO=$2 + GITHUB_IMAGE_REPO=$2 + shift 2 + ;; + --) + shift + break + ;; + *) exit 1 ;; # error + esac done export DECAPOD_SITE_NAME @@ -57,25 +72,21 @@ echo " Manifests Git: "$DECAPOD_MANIFESTS_GIT_REPO_URL echo " Git Revision: "$GIT_REVISION DIRS="argocd-install argocd-apps-install decapod-apps-templates" -for dir in $DIRS -do - if [[ -z $(ls | grep ${dir}) ]] - then +for dir in $DIRS; do + if [[ -z $(ls | grep ${dir}) ]]; then echo "execute $0 in decapod-bootstrap directory" exit 1 fi done -for dir in $DIRS -do +for dir in $DIRS; do if [[ $dir == *"templates" ]]; then dest_dir=${dir%-templates} - else + else dest_dir=$dir fi - for tpl in $(find ${dir} -name template-* -printf "%f\n") - do - cat $dir/${tpl} | envsubst > ${dest_dir}/${tpl:9} + for tpl in $(find ${dir} -name template-* -printf "%f\n"); do + cat $dir/${tpl} | envsubst >${dest_dir}/${tpl:9} done done