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.
363
363
fi
364
364
365
365
# 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"
367
367
# Get kubeconfig and store it locally.
368
368
$(KUBECTL) get secrets $(CLUSTER_NAME)-kubeconfig -o json | jq -r .data.value | base64 --decode > ./kubeconfig
369
369
$(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}"
62
62
export AZURE_CLUSTER_IDENTITY_SECRET_NAME=" cluster-identity-secret"
63
63
export CLUSTER_IDENTITY_NAME=${CLUSTER_IDENTITY_NAME:= " cluster-identity" }
64
64
export AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE=" default"
65
+ export ASO_CREDENTIAL_SECRET_NAME=${ASO_CREDENTIAL_SECRET_NAME:= " aso-credentials" }
65
66
66
67
# Generate SSH key.
67
68
capz::util::generate_ssh_key
Original file line number Diff line number Diff line change @@ -200,8 +200,6 @@ wait_for_pods() {
200
200
}
201
201
202
202
install_addons () {
203
- # export the target cluster KUBECONFIG if not already set
204
- export KUBECONFIG=" ${KUBECONFIG:- ${PWD} / kubeconfig} "
205
203
until copy_kubeadm_config_map; do
206
204
sleep 5
207
205
done
@@ -250,8 +248,16 @@ export ARTIFACTS="${ARTIFACTS:-${PWD}/_artifacts}"
250
248
# create cluster
251
249
create_cluster
252
250
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
+
255
261
echo " Cluster ${CLUSTER_NAME} created and fully operational"
256
262
257
263
if [[ " ${# } " -gt 0 ]]; then
Original file line number Diff line number Diff line change 147
147
AZURE_IDENTITY_ID=$( az identity show -n " ${USER_IDENTITY} " -g " ${AZWI_RESOURCE_GROUP} " --query clientId -o tsv)
148
148
AZURE_IDENTITY_ID_PRINCIPAL_ID=$( az identity show -n " ${USER_IDENTITY} " -g " ${AZWI_RESOURCE_GROUP} " --query principalId -o tsv)
149
149
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
151
151
sleep 5
152
152
done
153
153
az identity federated-credential create -n " capz-federated-identity" \
You can’t perform that action at this time.
0 commit comments