-
Notifications
You must be signed in to change notification settings - Fork 30
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
Enable AKS to use Outbound type of userDefinedRouting #163
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
apiVersion: aks.cattle.io/v1 | ||
kind: AKSClusterConfig | ||
metadata: | ||
name: my-cluster | ||
spec: | ||
resourceLocation: "germanywestcentral" | ||
resourceGroup: "my-group" | ||
clusterName: "my-cluster" | ||
baseUrl: "https://management.azure.com/" | ||
authBaseUrl: "https://login.microsoftonline.com" | ||
azureCredentialSecret: "REPLACE_WITH_K8S_SECRETS_NAME" | ||
privateCluster: false, | ||
linuxAdminUsername: "rancher-user", | ||
loadBalancerSku: "" | ||
sshPublicKey: "REPLACE_WITH_SSH_PUBLIC_KEY", | ||
kubernetesVersion: "1.19.9" | ||
nodePools: | ||
- name: "masters" | ||
count: 1 | ||
vmSize: "Standard_DS2_v2" | ||
osDiskSizeGB: 128 | ||
osDiskType: "Managed" | ||
maxPods: 110 | ||
mode: "System" | ||
osType: "Linux" | ||
- name: "workers" | ||
orchestratorVersion: "1.19.9" | ||
count: 6 | ||
vmSize: "Standard_DS2_v2" | ||
osDiskSizeGB: 128 | ||
osDiskType: "Managed" | ||
maxPods: 110 | ||
mode: "User" | ||
osType: "Linux" | ||
enableAutoScaling: true | ||
minCount: 1 | ||
maxCount: 6 | ||
availabilityZones: [ "1", "2", "3" ] | ||
outboundType: "userDefinedRouting" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,6 +64,15 @@ func createManagedCluster(ctx context.Context, cred *Credentials, workplacesClie | |
|
||
networkProfile := &containerservice.NetworkProfile{} | ||
|
||
switch to.String(spec.OutboundType) { | ||
case string(containerservice.LoadBalancer): | ||
networkProfile.OutboundType = containerservice.LoadBalancer | ||
case string(containerservice.UserDefinedRouting): | ||
networkProfile.OutboundType = containerservice.UserDefinedRouting | ||
case "": | ||
networkProfile.OutboundType = containerservice.LoadBalancer | ||
} | ||
|
||
switch to.String(spec.NetworkPolicy) { | ||
case string(containerservice.NetworkPolicyAzure): | ||
networkProfile.NetworkPolicy = containerservice.NetworkPolicyAzure | ||
|
@@ -97,7 +106,7 @@ func createManagedCluster(ctx context.Context, cred *Credentials, workplacesClie | |
logrus.Warnf("loadBalancerSKU 'basic' is not supported") | ||
networkProfile.LoadBalancerSku = containerservice.Basic | ||
case "": | ||
networkProfile.LoadBalancerSku = containerservice.Standard | ||
networkProfile.LoadBalancerSku = "" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No major comment, but curious why we need to remove this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @furkatgofurov7 , There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure about that, but I am going to test it |
||
} | ||
|
||
virtualNetworkResourceGroup := spec.ResourceGroup | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is missing dnsPrefix: "example-string"