mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #50050 from nicksardo/gce-fix-strs
Automatic merge from submit-queue (batch tested with PRs 49916, 50050) GCE: Fix bug by correctly cast port to string Code is incorrectly casting a port to a string, causing the diff-expression to always return true. **What this PR does / why we need it**: Fixes #50049 **Special notes for your reviewer**: /assign @MrHohn **Release note**: ```release-note NONE ```
This commit is contained in:
commit
7bc1c67685
@ -789,7 +789,7 @@ func (gce *GCECloud) ensureHttpHealthCheckFirewall(serviceName, ipAddress, regio
|
||||
if fw.Description != desc ||
|
||||
len(fw.Allowed) != 1 ||
|
||||
fw.Allowed[0].IPProtocol != string(ports[0].Protocol) ||
|
||||
!equalStringSets(fw.Allowed[0].Ports, []string{string(ports[0].Port)}) ||
|
||||
!equalStringSets(fw.Allowed[0].Ports, []string{strconv.Itoa(int(ports[0].Port))}) ||
|
||||
!equalStringSets(fw.SourceRanges, sourceRanges.StringSlice()) {
|
||||
glog.Warningf("Firewall %v exists but parameters have drifted - updating...", fwName)
|
||||
if err := gce.updateFirewall(fwName, region, desc, sourceRanges, ports, hosts); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user