Skip to content

Commit

Permalink
Added error message when App GW and CNI Overlay are selected
Browse files Browse the repository at this point in the history
  • Loading branch information
pjlewisuk authored Nov 16, 2023
1 parent 76da013 commit 3d99373
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions helper/src/components/addonsTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ export default function ({ tabValues, updateFn, featureFlag, invalidArray,showPr
<Label required={true}>
Ingress Controllers: Securely expose your applications via Layer 7 HTTP(S) proxies
</Label>
{hasError(invalidArray, 'ingressControllers') &&
<MessageBar messageBarType={MessageBarType.error}>{getError(invalidArray, 'ingressControllers')}</MessageBar>
}
{cluster.osType==='Windows' && addons.ingress !== 'none' &&
<MessageBar styles={{ root: { marginTop: '20px', marginLeft: '50px', width: '700px' } }} messageBarType={MessageBarType.warning}>
Please Note: If you're using Windows Nodes not all Ingress Controllers will support this OS, please check the Ingress Controller documentation and change the OS or Ingress Controller as required.
Expand Down
3 changes: 3 additions & 0 deletions helper/src/components/networkTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ export default function NetworkTab ({ defaults, tabValues, updateFn, invalidArra

<Stack.Item>
<Label>CNI Features</Label>
{hasError(invalidArray, 'cniFeatures') &&
<MessageBar messageBarType={MessageBarType.error}>{getError(invalidArray, 'cniFeatures')}</MessageBar>
}
<Stack horizontal tokens={{ childrenGap: 15 }} >
<Stack.Item>
<MessageBar messageBarType={MessageBarType.info}>Dynamic IP allocation separates node IP's and Pod IP's by subnet allowing dynamic allocation of Pod IPs <a target="_new" href="https://learn.microsoft.com/en-us/azure/aks/configure-azure-cni#dynamic-allocation-of-ips-and-enhanced-subnet-support">docs</a> </MessageBar>
Expand Down
2 changes: 2 additions & 0 deletions helper/src/components/portalnav.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ export default function PortalNav({ config }) {
invalidFn('net', 'vnetAddressPrefix', !isCidrValid(net.vnetAddressPrefix), invalidCidrMessage)
invalidFn('net', 'vnetAksSubnetAddressPrefix', !isCidrValid(net.vnetAksSubnetAddressPrefix), invalidCidrMessage)
invalidFn('net', 'networkPlugin', net.networkPlugin === "kubenet" && cluster.osType === "Windows" , "Windows nodepools do not support kubenet networking")
invalidFn('net', 'cniFeatures', addons.ingress === "appgw" && net.networkPluginMode === true, "CNI Overlay does not support the Azure Application Gateway ingress controller. Please select an alternative ingress controller on the Addon Details tab")
invalidFn('addons', 'ingressControllers', addons.ingress === "appgw" && net.networkPluginMode === true, "CNI Overlay does not support the Azure Application Gateway ingress controller. Please select an alternative ingress controller to continue")
invalidFn('addons', 'networkPolicy', (!net.ebpfDataplane && addons.networkPolicy === "cilium") || (net.ebpfDataplane && (addons.networkPolicy === "calico" || addons.networkPolicy === "azure")), net.ebpfDataplane ? "Cilium epbf backplane is incompatible with Azure NPM and Calico" : "Cilium network policy requires the CNI Cilium epbf to be enabled")
invalidFn('deploy', 'apiips', cluster.apisecurity === 'whitelist' && deploy.apiips.length < 7, 'Enter an IP/CIDR, or select \'Public IP with no IP restrictions\' in the \'Cluster API Server Security\' section of the \'Cluster Details\' tab')
invalidFn('deploy', 'clusterName', !deploy.clusterName || deploy.clusterName.match(/^[a-z0-9][_\-a-z0-9]+[a-z0-9]$/i) === null || deploy.clusterName.length > 19, 'Enter valid cluster name')
Expand Down

0 comments on commit 3d99373

Please sign in to comment.