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

feat: validation enforcing vnet guid is set for overlay cni clusters #675

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

Bryce-Soghigian
Copy link
Collaborator

@Bryce-Soghigian Bryce-Soghigian commented Feb 5, 2025

Description
After we roll out the v0.7.2 release, we can remove the fallback to the vnet client. This pr also introduces stricter validation to vnet guid to make it clear its required.
How was this change tested?

  • make test

Does this change impact docs?

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

Release Note


@Bryce-Soghigian Bryce-Soghigian marked this pull request as ready for review February 7, 2025 08:55
@@ -235,28 +223,3 @@ func getCABundle(restConfig *rest.Config) (*string, error) {
}
return ptr.String(base64.StdEncoding.EncodeToString(transportConfig.TLS.CAData)), nil
}

func getVnetGUID(cfg *auth.Config, subnetID string) (string, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we document our options anywhere?

Helm chart?
Website?
Go struct?

All of the above?

We should document what this is and how users should set it somewhere. I am also not 100% sure what the experience should be for selfhosted Karpenter. It might be OK to support getting the VNETGUID automatically if the user doesn't set it, but allowing them to set it to avoid the need to assign vnet/read permissions to standalone.

Obviously in the NAP case, VNET Guid will always be supplied.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have a great set of documented requirements here.

CC: @wdarko1 fyi

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer that we make it a fully managed field. VNET GUID unlike bootstrap token for example is rather static and only needed once and easy enough to resolve in our configure_values.sh script.

There are other fields that may require special treatment for self hosted like bootstrap token, but I don't think vnet guid needs to be one of them.

I would prefer to rid ourselves of that dependency.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The options should be reflected in the chart values files - and documented at least there. Right now the list of values needs an update.

For self-hosted, the configure-values.sh serves as a bridge for generating configuration appropriate for a given cluster; the values template it is targeting is currently passing the options via environment variables, bypassing even chart values that exist. Ideally values serve as the chart "contract" - and the script/template should be updated to target values instead of environment variables.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah as far as OSS is concerned, parameters should flow from Helm values to the pod somehow. Everything needs to be configurable via values.yaml (for the chart) and we should at least put documentation into values.yaml that describes each option and what it does.

If that's not what we're doing now, should we either fix it here or create a workitem tracking it? I see that our values.yaml already does some of this. Another example is ASO

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what we're doing now is just using the broad values.yaml env overrides, which yeah is fine but ideally we'd use specific parameters with specific documentation (IMO).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I filed #705

@@ -235,28 +223,3 @@ func getCABundle(restConfig *rest.Config) (*string, error) {
}
return ptr.String(base64.StdEncoding.EncodeToString(transportConfig.TLS.CAData)), nil
}

func getVnetGUID(cfg *auth.Config, subnetID string) (string, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I filed #705

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.

3 participants