diff --git a/argocd-install/template-values-override.yaml b/argocd-install/template-values-override.yaml index c9ece46..2f2e256 100644 --- a/argocd-install/template-values-override.yaml +++ b/argocd-install/template-values-override.yaml @@ -1,3 +1,6 @@ +global: + image: + repository: ${QUAY_IMAGE_REPO}/argoproj/argocd server: service: type: NodePort @@ -63,7 +66,14 @@ server: warn: false metrics: enabled: true -dex.metrics.enabled: true +dex: + image: + repository: ${GITHUB_IMAGE_REPO}/dexidp/dex + metrics: + enabled: true +redis: + image: + repository: ${DOCKER_IMAGE_REPO}/library/redis controller.metrics.enabled: true repoServer.metrics.enabled: true redis-ha.haproxy.metrics.enabled: false diff --git a/argocd-install/values-override.yaml b/argocd-install/values-override.yaml index ba595a3..7eb68c3 100644 --- a/argocd-install/values-override.yaml +++ b/argocd-install/values-override.yaml @@ -1,3 +1,6 @@ +global: + image: + repository: quay.io/argoproj/argocd server: service: type: NodePort @@ -63,7 +66,14 @@ server: warn: false metrics: enabled: true -dex.metrics.enabled: true +dex: + image: + repository: ghcr.io/dexidp/dex + metrics: + enabled: true +redis: + image: + repository: docker.io/library/redis controller.metrics.enabled: true repoServer.metrics.enabled: true redis-ha.haproxy.metrics.enabled: false diff --git a/decapod-apps/template-argo-workflows.yaml b/decapod-apps-templates/template-argo-workflows.yaml similarity index 100% rename from decapod-apps/template-argo-workflows.yaml rename to decapod-apps-templates/template-argo-workflows.yaml diff --git a/decapod-apps/template-db-secret-argo.yaml b/decapod-apps-templates/template-db-secret-argo.yaml similarity index 100% rename from decapod-apps/template-db-secret-argo.yaml rename to decapod-apps-templates/template-db-secret-argo.yaml diff --git a/decapod-apps/template-db-secret-decapod-db.yaml b/decapod-apps-templates/template-db-secret-decapod-db.yaml similarity index 100% rename from decapod-apps/template-db-secret-decapod-db.yaml rename to decapod-apps-templates/template-db-secret-decapod-db.yaml diff --git a/decapod-apps/template-postgresql.yaml b/decapod-apps-templates/template-postgresql.yaml similarity index 100% rename from decapod-apps/template-postgresql.yaml rename to decapod-apps-templates/template-postgresql.yaml diff --git a/genereate_yamls.sh b/genereate_yamls.sh index ed8fe24..1203cb4 100755 --- a/genereate_yamls.sh +++ b/genereate_yamls.sh @@ -6,13 +6,17 @@ DECAPOD_SITE_NAME="hanu-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" +QUAY_IMAGE_REPO="quay.io" +GITHUB_IMAGE_REPO="ghcr.io" + function usage { - echo -e "\nUsage: $0 [--site SITE_NAME] [--bootstrap-git BOOTSTRAP_GIT_URL ] [--manifests-git MANIFESTS_GIT_URL]" + echo -e "\nUsage: $0 [--site SITE_NAME] [--bootstrap-git BOOTSTRAP_GIT_URL ] [--manifests-git MANIFESTS_GIT_URL] [--registry REGISTRY_URL]" exit 1 } # We use "$@" instead of $* to preserve argument-boundary information -ARGS=$(getopt -o 's:b:m:h' --long 'site:,bootstrap-git:,manifests-git:,help' -- "$@") || usage +ARGS=$(getopt -o 's:b:m:r:h' --long 'site:,bootstrap-git:,manifests-git:,registry:,help' -- "$@") || usage eval "set -- $ARGS" while true; do @@ -25,6 +29,10 @@ while true; do DECAPOD_BOOTSTRAP_GIT_REPO_URL=$2; shift 2;; (-m|--manifests-git) DECAPOD_MANIFESTS_GIT_REPO_URL=$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 @@ -33,13 +41,16 @@ done export DECAPOD_SITE_NAME export DECAPOD_BOOTSTRAP_GIT_REPO_URL export DECAPOD_MANIFESTS_GIT_REPO_URL +export DOCKER_IMAGE_REPO +export QUAY_IMAGE_REPO +export GITHUB_IMAGE_REPO echo "=== Create YAML files using the following Decapod configuration. For help, use the '-h' option" echo " Site: "$DECAPOD_SITE_NAME echo " Bootstrap Git: "$DECAPOD_BOOTSTRAP_GIT_REPO_URL echo " Manifests Git: "$DECAPOD_MANIFESTS_GIT_REPO_URL -DIRS="argocd-install decapod-apps" +DIRS="argocd-install decapod-apps-templates" for dir in $DIRS do if [[ -z $(ls | grep ${dir}) ]] @@ -51,8 +62,14 @@ done for dir in $DIRS do + if [[ $dir == *"templates" ]]; then + dest_dir=${dir%-templates} + else + dest_dir=$dir + fi + for tpl in $(find ${dir} -name template-* -printf "%f\n") do - cat $dir/${tpl} | envsubst > ${dir}/${tpl:9} + cat $dir/${tpl} | envsubst > ${dest_dir}/${tpl:9} done done