Skip to content

Commit

Permalink
chore: create resource group before creating workload identity for lo…
Browse files Browse the repository at this point in the history
…cal dev (#131)

* Create resource group before creating workload identity

* check if rg exists

* booyah chatgpt is gr8

* -o none to supress output
  • Loading branch information
rakechill authored Feb 1, 2024
1 parent ad44063 commit bd700b6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile-az.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ az-login: ## Login into Azure
az account set --subscription $(AZURE_SUBSCRIPTION_ID)

az-mkrg: ## Create resource group
az group create --name $(AZURE_RESOURCE_GROUP) --location $(AZURE_LOCATION) -o none
if ! az group exists --name $(AZURE_RESOURCE_GROUP) -o none; then \
az group create --name $(AZURE_RESOURCE_GROUP) --location $(AZURE_LOCATION) -o none; \
fi

az-mkacr: az-mkrg ## Create test ACR
az acr create --name $(AZURE_ACR_NAME) --resource-group $(AZURE_RESOURCE_GROUP) --sku Basic --admin-enabled -o none
Expand All @@ -41,7 +43,7 @@ az-mkaks-cilium: az-mkacr ## Create test AKS cluster (with --network-dataplane c
az aks get-credentials --name $(AZURE_CLUSTER_NAME) --resource-group $(AZURE_RESOURCE_GROUP) --overwrite-existing
skaffold config set default-repo $(AZURE_ACR_NAME).azurecr.io/karpenter

az-create-workload-msi:
az-create-workload-msi: az-mkrg
# create the workload MSI that is the backing for the karpenter pod auth
az identity create --name "${AZURE_KARPENTER_USER_ASSIGNED_IDENTITY_NAME}" --resource-group "${AZURE_RESOURCE_GROUP}" --location "${AZURE_LOCATION}"

Expand Down

0 comments on commit bd700b6

Please sign in to comment.