From 39f41a92f614070e1f3379c50e0bafc4764c3010 Mon Sep 17 00:00:00 2001 From: samaea <32162601+samaea@users.noreply.github.com> Date: Fri, 17 Nov 2023 06:39:57 +0000 Subject: [PATCH] PodCIDR patch for Overlay. (#633) --- bicep/main.bicep | 2 +- helper/src/components/deployTab.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bicep/main.bicep b/bicep/main.bicep index 69ba4758c..dfb223fc0 100644 --- a/bicep/main.bicep +++ b/bicep/main.bicep @@ -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 diff --git a/helper/src/components/deployTab.js b/helper/src/components/deployTab.js index d08a2654c..681d3da2c 100644 --- a/helper/src/components/deployTab.js +++ b/helper/src/components/deployTab.js @@ -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 }),