File tree Expand file tree Collapse file tree 4 files changed +13
-6
lines changed Expand file tree Collapse file tree 4 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -363,7 +363,7 @@ create-workload-cluster: $(ENVSUBST) $(KUBECTL) ## Create a workload cluster.
363363 fi
364364
365365 # Wait for the kubeconfig to become available.
366- timeout --foreground 300 bash -c "while ! $(KUBECTL) get secrets | grep $(CLUSTER_NAME)-kubeconfig; do sleep 1; done"
366+ timeout --foreground 1800 bash -c "while ! $(KUBECTL) get secrets | grep $(CLUSTER_NAME)-kubeconfig; do sleep 1; done"
367367 # Get kubeconfig and store it locally.
368368 $(KUBECTL) get secrets $(CLUSTER_NAME)-kubeconfig -o json | jq -r .data.value | base64 --decode > ./kubeconfig
369369 $(KUBECTL) wait --for=condition=Ready --timeout=10m cluster "$(CLUSTER_NAME)"
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ export CLUSTER_TEMPLATE="${CLUSTER_TEMPLATE:-cluster-template.yaml}"
6262export AZURE_CLUSTER_IDENTITY_SECRET_NAME=" cluster-identity-secret"
6363export CLUSTER_IDENTITY_NAME=${CLUSTER_IDENTITY_NAME:= " cluster-identity" }
6464export AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE=" default"
65+ export ASO_CREDENTIAL_SECRET_NAME=${ASO_CREDENTIAL_SECRET_NAME:= " aso-credentials" }
6566
6667# Generate SSH key.
6768capz::util::generate_ssh_key
Original file line number Diff line number Diff line change @@ -200,8 +200,6 @@ wait_for_pods() {
200200}
201201
202202install_addons () {
203- # export the target cluster KUBECONFIG if not already set
204- export KUBECONFIG=" ${KUBECONFIG:- ${PWD} / kubeconfig} "
205203 until copy_kubeadm_config_map; do
206204 sleep 5
207205 done
@@ -250,8 +248,16 @@ export ARTIFACTS="${ARTIFACTS:-${PWD}/_artifacts}"
250248# create cluster
251249create_cluster
252250
253- # install CNI and CCM
254- install_addons
251+ # export the target cluster KUBECONFIG if not already set
252+ export KUBECONFIG=" ${KUBECONFIG:- ${PWD} / kubeconfig} "
253+
254+ if [[ ! " ${CLUSTER_TEMPLATE} " =~ " aks" ]]; then
255+ # install CNI and CCM
256+ install_addons
257+ fi
258+
259+ " ${KUBECTL} " --kubeconfig " ${REPO_ROOT} /${KIND_CLUSTER_NAME} .kubeconfig" wait --for=condition=Ready --timeout=10m -l " cluster.x-k8s.io/cluster-name=${CLUSTER_NAME} " machinedeployments,machinepools
260+
255261echo " Cluster ${CLUSTER_NAME} created and fully operational"
256262
257263if [[ " ${# } " -gt 0 ]]; then
Original file line number Diff line number Diff line change 147147 AZURE_IDENTITY_ID=$( az identity show -n " ${USER_IDENTITY} " -g " ${AZWI_RESOURCE_GROUP} " --query clientId -o tsv)
148148 AZURE_IDENTITY_ID_PRINCIPAL_ID=$( az identity show -n " ${USER_IDENTITY} " -g " ${AZWI_RESOURCE_GROUP} " --query principalId -o tsv)
149149 echo " ${AZURE_IDENTITY_ID} " > " ${AZURE_IDENTITY_ID_FILEPATH} "
150- until az role assignment create --assignee-object-id " ${AZURE_IDENTITY_ID_PRINCIPAL_ID} " --role " Contributor " --scope " /subscriptions/${AZURE_SUBSCRIPTION_ID} " --assignee-principal-type ServicePrincipal --output none --only-show-errors; do
150+ until az role assignment create --assignee-object-id " ${AZURE_IDENTITY_ID_PRINCIPAL_ID} " --role " Owner " --scope " /subscriptions/${AZURE_SUBSCRIPTION_ID} " --assignee-principal-type ServicePrincipal --output none --only-show-errors; do
151151 sleep 5
152152 done
153153 az identity federated-credential create -n " capz-federated-identity" \
You can’t perform that action at this time.
0 commit comments