Skip to content

Commit

Permalink
fix: propagate kubelet identity into node identities (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
tallaxes authored Apr 28, 2024
1 parent 1207f4c commit fc0b527
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hack/deploy/configure-values.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ if [[ ! -v VNET_SUBNET_ID ]]; then
VNET_SUBNET_ID=$(jq -r ".subnets[0].id" <<< "$VNET_JSON")
fi

NODE_IDENTITIES=$(jq -r ".identityProfile.kubeletidentity.resourceId" <<< "$AKS_JSON")

KARPENTER_USER_ASSIGNED_CLIENT_ID=$(az identity show --resource-group "${AZURE_RESOURCE_GROUP}" --name "${AZURE_KARPENTER_USER_ASSIGNED_IDENTITY_NAME}" --query 'clientId' -otsv)

export CLUSTER_NAME AZURE_LOCATION AZURE_RESOURCE_GROUP_MC KARPENTER_SERVICE_ACCOUNT_NAME \
CLUSTER_ENDPOINT BOOTSTRAP_TOKEN SSH_PUBLIC_KEY VNET_SUBNET_ID KARPENTER_USER_ASSIGNED_CLIENT_ID
CLUSTER_ENDPOINT BOOTSTRAP_TOKEN SSH_PUBLIC_KEY VNET_SUBNET_ID KARPENTER_USER_ASSIGNED_CLIENT_ID NODE_IDENTITIES

# get karpenter-values-template.yaml, if not already present (e.g. outside of repo context)
if [ ! -f karpenter-values-template.yaml ]; then
Expand Down
2 changes: 2 additions & 0 deletions karpenter-values-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ controller:
value: ""
- name: VNET_SUBNET_ID
value: ${VNET_SUBNET_ID}
- name: NODE_IDENTITIES
value: ${NODE_IDENTITIES}

# Azure client settings
- name: ARM_SUBSCRIPTION_ID
Expand Down

0 comments on commit fc0b527

Please sign in to comment.