Skip to content

Commit

Permalink
Merge pull request #1008 from nilo19/fix/cherry-pick-1004-1.23
Browse files Browse the repository at this point in the history
fix: do not update tags on load balancer, security group and route ta…
  • Loading branch information
k8s-ci-robot committed Jan 18, 2022
2 parents fda9c59 + 5c19113 commit ebd663e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/provider/azure_loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3170,7 +3170,7 @@ func unbindServiceFromPIP(pip *network.PublicIPAddress, service *v1.Service, ser

// ensureLoadBalancerTagged ensures every load balancer in the resource group is tagged as configured
func (az *Cloud) ensureLoadBalancerTagged(lb *network.LoadBalancer) bool {
if az.Tags == "" {
if az.Tags == "" && (az.TagsMap == nil || len(az.TagsMap) == 0) {
return false
}
tags := parseTags(az.Tags, az.TagsMap)
Expand All @@ -3186,7 +3186,7 @@ func (az *Cloud) ensureLoadBalancerTagged(lb *network.LoadBalancer) bool {

// ensureSecurityGroupTagged ensures the security group is tagged as configured
func (az *Cloud) ensureSecurityGroupTagged(sg *network.SecurityGroup) bool {
if az.Tags == "" {
if az.Tags == "" && (az.TagsMap == nil || len(az.TagsMap) == 0) {
return false
}
tags := parseTags(az.Tags, az.TagsMap)
Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/azure_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ func cidrtoRfc1035(cidr string) string {

// ensureRouteTableTagged ensures the route table is tagged as configured
func (az *Cloud) ensureRouteTableTagged(rt *network.RouteTable) (map[string]*string, bool) {
if az.Tags == "" {
if az.Tags == "" && (az.TagsMap == nil || len(az.TagsMap) == 0) {
return nil, false
}
tags := parseTags(az.Tags, az.TagsMap)
Expand Down

0 comments on commit ebd663e

Please sign in to comment.