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

Improve NetworkProfile configuration #29

Merged
merged 1 commit into from
Jun 17, 2021
Merged

Conversation

mjura
Copy link
Contributor

@mjura mjura commented Jun 11, 2021

No description provided.

Copy link
Contributor

@cmurphy cmurphy left a comment

Choose a reason for hiding this comment

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

I'm not clear what this is fixing, is there an issue that goes with this?

} else {
// Network Policy Azure can be used only with Network Plugin Azure CNI
if containerservice.NetworkPolicy(to.String(spec.NetworkPolicy)) == containerservice.NetworkPolicyAzure {
networkProfile.NetworkPolicy = containerservice.NetworkPolicyCalico
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it's good practice to silently change a configured value behind the user's back like this. It should either be validated and an error returned to let the user correct it, or even just pass the invalid config to AKS and bubble up the error from there.

Copy link

@pennyscissors pennyscissors Jun 11, 2021

Choose a reason for hiding this comment

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

@cmurphy This is fixing an issue with AKSv2 provisioning where the network configuration is not being set properly so the cluster gets deployed with no network policy enabled and the kubenet network plugin regardless of the options you select in the UI.

As for silently changing a configured value, I agree that it should be validated and rejected with an error or bubble up AKS' error since the UI has logic to make sure you can't select the Azure network policy without the Azure CNI already.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comments included, thank you

controller/aks-cluster-config-handler.go Outdated Show resolved Hide resolved
controller/aks-cluster-config-handler.go Outdated Show resolved Hide resolved
thedadams
thedadams previously approved these changes Jun 16, 2021
controller/aks-cluster-config-handler.go Outdated Show resolved Hide resolved
rmweir
rmweir previously approved these changes Jun 16, 2021
Copy link
Contributor

@rmweir rmweir left a comment

Choose a reason for hiding this comment

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

LGTM

@mjura mjura merged commit 8e0452d into rancher:master Jun 17, 2021
@mjura mjura deleted the master-plugin branch July 23, 2024 06:51
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.

5 participants