Skip to content

Commit

Permalink
PodCIDR patch for Overlay. (#633)
Browse files Browse the repository at this point in the history
  • Loading branch information
samaea authored Nov 17, 2023
1 parent 71fe11f commit 39f41a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bicep/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,7 @@ var aksProperties = union({
#disable-next-line BCP036 //Disabling validation of this parameter to cope with empty string to indicate no Network Policy required.
networkPolicy: networkPolicy
networkPluginMode: networkPlugin=='azure' ? networkPluginMode : ''
podCidr: networkPlugin=='kubenet' || cniDynamicIpAllocation ? podCidr : json('null')
podCidr: networkPlugin=='kubenet' || networkPluginMode=='Overlay' || cniDynamicIpAllocation ? podCidr : json('null')
serviceCidr: serviceCidr
dnsServiceIP: dnsServiceIP
dockerBridgeCidr: dockerBridgeCidr
Expand Down
2 changes: 1 addition & 1 deletion helper/src/components/deployTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ export default function DeployTab({ defaults, updateFn, tabValues, invalidArray,
...(net.networkPlugin !== defaults.net.networkPlugin && {networkPlugin: net.networkPlugin}),
...(net.networkPlugin === 'azure' && {
...(net.networkPluginMode && {networkPluginMode: 'Overlay'}),
...(net.vnet_opt === "custom" && (net.networkPluginMode || net.cniDynamicIpAllocation) && defaults.net.podCidr !== net.podCidr && { podCidr: net.podCidr }),
}),
...(net.vnet_opt === "custom" && net.networkPlugin === 'kubenet' && defaults.net.podCidr !== net.podCidr && { podCidr: net.podCidr }),
...((net.vnet_opt === "custom" || net.vnet_opt === "byo") && defaults.net.cniDynamicIpAllocation !== net.cniDynamicIpAllocation && { cniDynamicIpAllocation: true }),
...(net.vnet_opt === "custom" && net.cniDynamicIpAllocation && defaults.net.podCidr !== net.podCidr && { podCidr: net.podCidr }),
...(cluster.availabilityZones === "yes" && { availabilityZones: ['1', '2', '3'] }),
...(cluster.apisecurity === "whitelist" && deploy.clusterIPWhitelist && apiips_array.length > 0 && { authorizedIPRanges: apiips_array }),
...(defaults.net.maxPods !== net.maxPods && { maxPods: net.maxPods }),
Expand Down

0 comments on commit 39f41a9

Please sign in to comment.