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

Do not use dockerhub #19

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
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
8 changes: 5 additions & 3 deletions argocd-install/template-values-override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -65,7 +67,7 @@ dex:
enabled: true
redis:
image:
repository: ${DOCKER_IMAGE_REPO}/library/redis
repository: ${DOCKER_IMAGE_REPO}/tks/redis
controller:
metrics:
enabled: true
Expand Down
8 changes: 5 additions & 3 deletions argocd-install/values-override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -65,7 +67,7 @@ dex:
enabled: true
redis:
image:
repository: docker.io/library/redis
repository: harbor.taco-cat.xyz/tks/redis
controller:
metrics:
enabled: true
Expand Down
73 changes: 42 additions & 31 deletions generate_yamls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,55 @@ 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"

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
ARGS=$(getopt -o 's:b:m:g:r:h' --long 'site:,bootstrap-git:,manifests-git:,git-rev:,registry:,help' -- "$@") || usage
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
Expand All @@ -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