From: garciadeblas Date: Wed, 21 Aug 2024 11:07:57 +0000 (+0200) Subject: Fix token names in gitea provisioning X-Git-Tag: release-v16.0-start~4 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F24%2F14524%2F5;p=osm%2Fdevops.git Fix token names in gitea provisioning Change-Id: I27e3fbc8de428ab6a88058980f481ebcb117b4b5 Signed-off-by: garciadeblas --- diff --git a/installers/install_cluster_addons.sh b/installers/install_cluster_addons.sh index b5464189..8f42c7f1 100755 --- a/installers/install_cluster_addons.sh +++ b/installers/install_cluster_addons.sh @@ -99,7 +99,6 @@ function install_helm_nginx() { echo "Installing nginx" NGINX_VERSION="4.10.0" ANNOTATIONS='--set controller.service.annotations."service\.beta\.kubernetes\.io/azure-load-balancer-health-probe-request-path"=/healthz' - ANNOTATIONS=${ANNOTATIONS:-""} helm upgrade --install ingress-nginx ingress-nginx \ --repo https://kubernetes.github.io/ingress-nginx --version ${NGINX_VERSION} \ --namespace ingress-nginx --create-namespace ${ANNOTATIONS} diff --git a/installers/mgmt-cluster/00-base-config.rc b/installers/mgmt-cluster/00-base-config.rc index 56cc28bd..de0d4db8 100644 --- a/installers/mgmt-cluster/00-base-config.rc +++ b/installers/mgmt-cluster/00-base-config.rc @@ -31,6 +31,14 @@ export REMOVE_LOCAL_DIR_BEFORE_CLONING=${REMOVE_LOCAL_DIR_BEFORE_CLONING:-"true" # Gitea's default values file export GITEA_CHART_VALUES_FILE=values-standalone-ingress-ssh2222.yaml +# Gitea's admin user +export GITEA_ADMINISTRATOR_USERNAME=${GITEA_ADMINISTRATOR_USERNAME:-osm-admin} +export GITEA_ADMINISTRATOR_TOKEN_NAME=${GITEA_ADMINISTRATOR_TOKEN_NAME:-admin-token} + +# Gitea's regular user +export GITEA_STD_USERNAME=${GITEA_STD_USERNAME:-osm-developer} +export GITEA_STD_TOKEN_NAME=${GITEA_STD_TOKEN_NAME:-developer-token} + # Base name for age keys for management cluster export AGE_KEY_NAME_MGMT=${AGE_KEY_NAME_MGMT:-age.mgmt} diff --git a/installers/mgmt-cluster/01-provision-aux-svc.sh b/installers/mgmt-cluster/01-provision-aux-svc.sh index c444fe99..4f00732f 100755 --- a/installers/mgmt-cluster/01-provision-aux-svc.sh +++ b/installers/mgmt-cluster/01-provision-aux-svc.sh @@ -16,7 +16,7 @@ # limitations under the License. ####################################################################################### -set -e -o pipefail +set -ex -o pipefail # Warning!!!: Remember to select the desired kubeconfig profile before launching this script @@ -34,7 +34,6 @@ m "#####################################################################\n" "${C ## Uncomment for AKS: NGINX_VERSION="4.10.0" ANNOTATIONS='--set controller.service.annotations."service\.beta\.kubernetes\.io/azure-load-balancer-health-probe-request-path"=/healthz' -ANNOTATIONS=${ANNOTATIONS:-""} helm upgrade --install ingress-nginx ingress-nginx \ --repo https://kubernetes.github.io/ingress-nginx --version ${NGINX_VERSION} \ --namespace ingress-nginx --create-namespace ${ANNOTATIONS} diff --git a/installers/mgmt-cluster/gitea/90-provision-gitea-for-osm.sh b/installers/mgmt-cluster/gitea/90-provision-gitea-for-osm.sh index f2ada07b..5931e900 100755 --- a/installers/mgmt-cluster/gitea/90-provision-gitea-for-osm.sh +++ b/installers/mgmt-cluster/gitea/90-provision-gitea-for-osm.sh @@ -16,7 +16,7 @@ # limitations under the License. ####################################################################################### -set -e -o pipefail +set -ex -o pipefail export HERE=$(dirname "$(readlink --canonicalize "$BASH_SOURCE")") source "${HERE}/library/functions.sh" diff --git a/installers/mgmt-cluster/gitea/ALL-IN-ONE-Gitea-install.sh b/installers/mgmt-cluster/gitea/ALL-IN-ONE-Gitea-install.sh index b6bbffd8..7bcd78c7 100755 --- a/installers/mgmt-cluster/gitea/ALL-IN-ONE-Gitea-install.sh +++ b/installers/mgmt-cluster/gitea/ALL-IN-ONE-Gitea-install.sh @@ -16,7 +16,7 @@ # limitations under the License. ####################################################################################### -set -e -o pipefail +set -ex -o pipefail export HERE=$(dirname "$(readlink --canonicalize "$BASH_SOURCE")") source "${HERE}/library/functions.sh" diff --git a/installers/mgmt-cluster/gitea/admin/api.sh b/installers/mgmt-cluster/gitea/admin/api.sh index de5b3457..753e6b23 100755 --- a/installers/mgmt-cluster/gitea/admin/api.sh +++ b/installers/mgmt-cluster/gitea/admin/api.sh @@ -16,7 +16,7 @@ # limitations under the License. ####################################################################################### -set -e +set -ex # Wrapper function for raw calls to Gitea API diff --git a/installers/mgmt-cluster/gitea/admin/create-user-repository.sh b/installers/mgmt-cluster/gitea/admin/create-user-repository.sh index 686c1a94..edaa3585 100755 --- a/installers/mgmt-cluster/gitea/admin/create-user-repository.sh +++ b/installers/mgmt-cluster/gitea/admin/create-user-repository.sh @@ -16,7 +16,7 @@ # limitations under the License. ####################################################################################### -set -e +set -ex HERE=$(dirname "$(readlink --canonicalize "$BASH_SOURCE")") . "$HERE/../library/functions.sh" diff --git a/installers/mgmt-cluster/gitea/admin/create-user.sh b/installers/mgmt-cluster/gitea/admin/create-user.sh index 68124278..6208d26b 100755 --- a/installers/mgmt-cluster/gitea/admin/create-user.sh +++ b/installers/mgmt-cluster/gitea/admin/create-user.sh @@ -16,7 +16,7 @@ # limitations under the License. ####################################################################################### -set -e +set -ex HERE=$(dirname "$(readlink --canonicalize "$BASH_SOURCE")") source "${HERE}/../library/functions.sh" diff --git a/installers/mgmt-cluster/gitea/values-standalone-ingress-ssh2222.yaml b/installers/mgmt-cluster/gitea/values-standalone-ingress-ssh2222.yaml index bf1296a1..dfb460f3 100644 --- a/installers/mgmt-cluster/gitea/values-standalone-ingress-ssh2222.yaml +++ b/installers/mgmt-cluster/gitea/values-standalone-ingress-ssh2222.yaml @@ -161,7 +161,7 @@ ingress: # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" hosts: - - host: git.miejemplo.com + - host: git.myexample.com paths: - path: / pathType: Prefix @@ -349,8 +349,8 @@ gitea: # RUN_MODE: dev # server: - DOMAIN: git.miejemplo.com - ROOT_URL: http://git.miejemplo.com + DOMAIN: git.myexample.com + ROOT_URL: http://git.myexample.com # SSH_PORT: 22 # # security: diff --git a/installers/mgmt-cluster/gitea/values-standalone-ingress.yaml b/installers/mgmt-cluster/gitea/values-standalone-ingress.yaml index 4c4bb314..f5509083 100644 --- a/installers/mgmt-cluster/gitea/values-standalone-ingress.yaml +++ b/installers/mgmt-cluster/gitea/values-standalone-ingress.yaml @@ -161,7 +161,7 @@ ingress: # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" hosts: - - host: git.miejemplo.com + - host: git.myexample.com paths: - path: / pathType: Prefix @@ -349,8 +349,8 @@ gitea: # RUN_MODE: dev # server: - DOMAIN: git.miejemplo.com - ROOT_URL: http://git.miejemplo.com + DOMAIN: git.myexample.com + ROOT_URL: http://git.myexample.com # SSH_PORT: 22 # # security: diff --git a/installers/mgmt-cluster/gitea/values-standalone.yaml b/installers/mgmt-cluster/gitea/values-standalone.yaml index 867fc05e..c6e07a7d 100644 --- a/installers/mgmt-cluster/gitea/values-standalone.yaml +++ b/installers/mgmt-cluster/gitea/values-standalone.yaml @@ -349,8 +349,8 @@ gitea: # RUN_MODE: dev # server: - DOMAIN: git.miejemplo.com - ROOT_URL: http://git.miejemplo.com + DOMAIN: git.myexample.com + ROOT_URL: http://git.myexample.com # SSH_PORT: 22 # # security: