mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #59423 from jingax10/upgrade_aliases_branch
Automatic merge from submit-queue (batch tested with PRs 59394, 58769, 59423, 59363, 59245). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Only populate alias range for nic0 when invoking instance.UpdateNetworkInterface. **What this PR does / why we need it**: Without the fix, GCP will emit errors, e.g., googleapi: Error 400: Invalid value for field 'resource.accessConfigs': ''. Updating this field is not supported., invalid **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # N/A **Special notes for your reviewer**: **Release note**: ```release-note "NONE" ```
This commit is contained in:
commit
891b3d10c4
@ -391,7 +391,9 @@ func (gce *GCECloud) AddAliasToInstance(nodeName types.NodeName, alias *net.IPNe
|
||||
nodeName, instance.NetworkInterfaces)
|
||||
}
|
||||
|
||||
iface := instance.NetworkInterfaces[0]
|
||||
iface := &computebeta.NetworkInterface{}
|
||||
iface.Name = instance.NetworkInterfaces[0].Name
|
||||
iface.Fingerprint = instance.NetworkInterfaces[0].Fingerprint
|
||||
iface.AliasIpRanges = append(iface.AliasIpRanges, &computebeta.AliasIpRange{
|
||||
IpCidrRange: alias.String(),
|
||||
SubnetworkRangeName: gce.secondaryRangeName,
|
||||
|
Loading…
Reference in New Issue
Block a user