From 8cbce001b10a1a8d1a63f14cda23d6a63f067906 Mon Sep 17 00:00:00 2001 From: Magnus Longva Date: Thu, 24 Aug 2023 11:01:47 +0200 Subject: [PATCH] adding new secret radix-sp-buildah-azure --- scripts/config-and-secrets/bootstrap-acr.sh | 9 +++++++++ scripts/install_base_components.sh | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/config-and-secrets/bootstrap-acr.sh b/scripts/config-and-secrets/bootstrap-acr.sh index 174cdc855..ac8b8c5db 100755 --- a/scripts/config-and-secrets/bootstrap-acr.sh +++ b/scripts/config-and-secrets/bootstrap-acr.sh @@ -95,8 +95,17 @@ az keyvault secret download \ --name "${AZ_SYSTEM_USER_CONTAINER_REGISTRY_CICD}" \ --file sp_credentials.json +# create secret for authenticating to ACR via az cli kubectl create secret generic radix-sp-acr-azure --from-file=sp_credentials.json --dry-run=client -o yaml | kubectl apply -f - +# create secret for authenticating to ACR via buildah client (same value as other ACR secret) +username="$(jq .id sp_credentials.json --raw-output)" +password="$(jq .password sp_credentials.json --raw-output)" +kubectl create secret generic radix-sp-buildah-azure \ + --from-literal=username=$username \ + --from-literal=password=$password \ + --dry-run=client -o yaml | kubectl apply -f - + kubectl create secret docker-registry radix-docker \ --docker-server="$AZ_RESOURCE_CONTAINER_REGISTRY.azurecr.io" \ --docker-username="$(jq -r '.id' sp_credentials.json)" \ diff --git a/scripts/install_base_components.sh b/scripts/install_base_components.sh index 5c61c0e37..b230fce82 100755 --- a/scripts/install_base_components.sh +++ b/scripts/install_base_components.sh @@ -277,7 +277,7 @@ kubectl label ns default purpose=radix-base-ns --overwrite ####################################################################################### # Create radix platform shared configs and secrets -# Create 3 secrets for Radix platform radix-sp-acr-azure, radix-docker and radix-snyk-service-account +# Create 4 secrets for Radix platform: radix-sp-acr-azure, radix-sp-buildah-azure and radix-docker and radix-snyk-service-account echo "" echo "Start on radix platform shared configs and secrets..."