mirror of https://github.com/rancher/ui.git
Fix GKE range name and CidrBlock conflict
This commit is contained in:
parent
714f2be4d5
commit
778fb9f095
|
|
@ -755,13 +755,21 @@ export default Component.extend(ClusterDriver, {
|
|||
if (subnetworkMatch) {
|
||||
const { secondaryIpRanges = [] } = subnetworkMatch;
|
||||
|
||||
return secondaryIpRanges.map((s) => {
|
||||
const items = secondaryIpRanges.map((s) => {
|
||||
return {
|
||||
label: `${ s.rangeName }(${ s.ipCidrRange })`,
|
||||
value: s.rangeName,
|
||||
ipCidrRange: s.ipCidrRange,
|
||||
}
|
||||
});
|
||||
|
||||
items.unshift({
|
||||
label: this.intl.t('clusterNew.googlegke.ipAllocationPolicy.noSecondaryRange'),
|
||||
value: null,
|
||||
ipCidrRange: '',
|
||||
});
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
return [];
|
||||
|
|
@ -954,6 +962,14 @@ export default Component.extend(ClusterDriver, {
|
|||
}
|
||||
}
|
||||
|
||||
if (get(config, 'ipAllocationPolicy.clusterSecondaryRangeName') && get(config, 'ipAllocationPolicy.clusterIpv4CidrBlock')) {
|
||||
set(config, 'ipAllocationPolicy.clusterIpv4CidrBlock', null);
|
||||
}
|
||||
|
||||
if (get(config, 'ipAllocationPolicy.servicesSecondaryRangeName') && get(config, 'ipAllocationPolicy.servicesIpv4CidrBlock')) {
|
||||
set(config, 'ipAllocationPolicy.servicesIpv4CidrBlock', null);
|
||||
}
|
||||
|
||||
if (!get(config, 'masterAuthorizedNetworks.enabled')) {
|
||||
delete config.masterAuthorizedNetworks.cidrBlocks
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3975,6 +3975,7 @@ clusterNew:
|
|||
cidrLabel: Service Secondary CIDR Block
|
||||
nameLabel: Services Secondary Range Name
|
||||
title: IP Allocation Policy
|
||||
noSecondaryRange: "<None>"
|
||||
ipPolicyClusterIpv4CidrBlock:
|
||||
label: Pod address range
|
||||
placeholder: e.g. 10.96.0.0/11
|
||||
|
|
|
|||
Loading…
Reference in New Issue