Skip to content

Commit

Permalink
Fix aks-console and aks-ssh commands
Browse files Browse the repository at this point in the history
  • Loading branch information
saliceti committed Dec 4, 2024
1 parent 6d72231 commit 2298efd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,14 @@ get-cluster-credentials: set-azure-account
kubelogin convert-kubeconfig -l $(if ${GITHUB_ACTIONS},spn,azurecli)

aks-console: get-cluster-credentials
$(if $(PULL_REQUEST_NUMBER), $(eval export APP_ID=review-$(PULL_REQUEST_NUMBER)) , $(eval export APP_ID=$(CONFIG_LONG)))
kubectl -n ${NAMESPACE} exec -ti --tty deployment/cpd-tsh-${APP_ID} -- /bin/sh -c "cd /app && bundle exec rails c"
$(if $(PULL_REQUEST_NUMBER), $(eval export APP_ID=review-$(PULL_REQUEST_NUMBER)) , $(eval export APP_ID=$(CONFIG)))
$(eval NAMESPACE=$(shell jq -r '.namespace' terraform/application/config/${CONFIG}.tfvars.json))
kubectl -n ${NAMESPACE} exec -ti deployment/cpd-tsh-${APP_ID} -- /bin/sh -c "cd /app && bundle exec rails c"

aks-ssh: get-cluster-credentials
$(if $(PULL_REQUEST_NUMBER), $(eval export APP_ID=review-$(PULL_REQUEST_NUMBER)) , $(eval export APP_ID=$(CONFIG_LONG)))
kubectl -n ${NAMESPACE} exec -ti --tty deployment/teaching-school-hub-finder-${APP_ID} -- /bin/sh
$(if $(PULL_REQUEST_NUMBER), $(eval export APP_ID=review-$(PULL_REQUEST_NUMBER)) , $(eval export APP_ID=$(CONFIG)))
$(eval NAMESPACE=$(shell jq -r '.namespace' terraform/application/config/${CONFIG}.tfvars.json))
kubectl -n ${NAMESPACE} exec -ti deployment/cpd-tsh-${APP_ID} -- /bin/sh

.PHONY: install-konduit
install-konduit: ## Install the konduit script, for accessing backend services
Expand Down
1 change: 0 additions & 1 deletion global_config/production.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ CONFIG_SHORT=pd
AZURE_SUBSCRIPTION=s189-teacher-services-cloud-production
AZURE_RESOURCE_PREFIX=s189p01
ENABLE_KV_DIAGNOSTICS=true
CONFIG_LONG=production
NAMESPACE=cpd-production
TERRAFORM_MODULES_TAG=stable
1 change: 0 additions & 1 deletion global_config/review.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ CONFIG_SHORT=rv
AZURE_SUBSCRIPTION=s189-teacher-services-cloud-test
AZURE_RESOURCE_PREFIX=s189t01
KV_PURGE_PROTECTION=false
CONFIG_LONG=review
NAMESPACE=cpd-review
TERRAFORM_MODULES_TAG=main

0 comments on commit 2298efd

Please sign in to comment.