From ec7b86d25104064ab766a2ecf33e1bb7377c750f Mon Sep 17 00:00:00 2001 From: Robert Choi Date: Wed, 27 Sep 2023 16:29:38 +0900 Subject: [PATCH 1/2] install admin-tools using workflow --- 05_z2_install_admin_tools.sh | 16 ++++++++++++++++ 05_z2_install_nginx_ingress.sh | 18 ------------------ conf.sh.example | 2 ++ 3 files changed, 18 insertions(+), 18 deletions(-) create mode 100755 05_z2_install_admin_tools.sh delete mode 100755 05_z2_install_nginx_ingress.sh diff --git a/05_z2_install_admin_tools.sh b/05_z2_install_admin_tools.sh new file mode 100755 index 0000000..0c60577 --- /dev/null +++ b/05_z2_install_admin_tools.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -e + +source lib/common.sh + +export KUBECONFIG=~/.kube/config + +##TODO: add workflow-template for tks-admin-tools + + +log_info "Calling workflow to install admin-tools(keycloak, harbor, etc)..." + +argo submit --from wftmpl/tks-install-admin-tools -n argo -p install_nginx=$INSTALL_NGINX_INGRESS -p manifest_repo_url="${GIT_SVC_BASE_URL}/${GIT_SVC_USERNAME}/${CLUSTER_NAME}-manifests" -p site_name=${CLUSTER_NAME} --watch + +log_info "...Done" diff --git a/05_z2_install_nginx_ingress.sh b/05_z2_install_nginx_ingress.sh deleted file mode 100755 index 20a687b..0000000 --- a/05_z2_install_nginx_ingress.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -e - -source lib/common.sh - -export KUBECONFIG=output/kubeconfig_$CLUSTER_NAME - -log_info "Installing NGINX Ingress..." -helm upgrade --install ingress-nginx ingress-nginx \ - --repo https://kubernetes.github.io/ingress-nginx \ - --namespace ingress-nginx --create-namespace - -sleep 10 - -gum spin --spinner dot --title "Wait for all pods ready in ingress-nginx namespace..." -- util/wait_for_all_pods_in_ns.sh ingress-nginx - -log_info "... done" diff --git a/conf.sh.example b/conf.sh.example index d288e76..f59b891 100644 --- a/conf.sh.example +++ b/conf.sh.example @@ -2,6 +2,7 @@ TKS_RELEASE=main BOOTSTRAP_CLUSTER_SERVER_IP="192.168.0.1" DOWNLOAD_IMAGES=false +INSTALL_NGINX_INGRESS=false # "aws" or "byoh" TKS_ADMIN_CLUSTER_INFRA_PROVIDER="byoh" @@ -31,3 +32,4 @@ DATABASE_PASSWORD=secretPassword # Gitea GITEA_ADMIN_USER=tks-admin GITEA_ADMIN_PASSWORD=secretPassword + From 63eccaf82a8aea8e0d72c19918764b801e8fd4d8 Mon Sep 17 00:00:00 2001 From: Robert Choi Date: Thu, 12 Oct 2023 11:33:21 +0900 Subject: [PATCH 2/2] trivial: don't create tks-proto cm --- 05_install_decapod.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/05_install_decapod.sh b/05_install_decapod.sh index fe695f9..1c62ef1 100755 --- a/05_install_decapod.sh +++ b/05_install_decapod.sh @@ -257,10 +257,6 @@ for dir in $(ls -l $ASSET_DIR/tks-flow/ |grep "^d" | grep -v dockerfiles |awk '{ kubectl apply -R -f $ASSET_DIR/tks-flow/$dir -n argo done -log_info "Creating configmap from tks-proto..." -kubectl create cm tks-proto -n argo --from-file=$ASSET_DIR/tks-proto/tks_pb_python -o yaml --dry-run=client | kubectl apply -f - -log_info "... done" - log_info "Creating aws secret..." if [[ " ${CAPI_INFRA_PROVIDERS[*]} " =~ " aws " ]]; then argo submit --from wftmpl/tks-create-aws-conf-secret -n argo -p aws_access_key_id=$AWS_ACCESS_KEY_ID -p aws_secret_access_key=$AWS_SECRET_ACCESS_KEY -p aws_account_id=$AWS_ACCOUNT_ID -p aws_user=$AWS_USER --watch