Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding subnet-id retrieval from Cluster. #551

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CorrenSoft
Copy link
Contributor

Fixes #

Description
In scenarios where the VNET is not managed for AKS (meaning it is not present in the node resource group), this script will not correctly populate that value. It is possible to assign that value using environment variables, but that behavior is a little obfuscated and can be confusing at first.

This PR updates the SUBNET_ID logic to also look for the information in the agent profiles, in the following order:

  1. Check if the variable already has a value (from Environment).
  2. If empty, Check for the value on agentProfiles, using the already loaded AKS_JSON variable.
  3. If null, search for the aks-managed subnet in the Nodes Resource Group.

How was this change tested?

  • Execute the command and check for the value in karpenter-values.yaml
    chmod +x ./configure-values.sh && ./configure-values.sh ${CLUSTER_NAME} ${RG} karpenter-sa karpentermsi

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

Release Note

NONE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant