Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not update tags on load balancer, security group and route ta… #1006

Merged
merged 1 commit into from
Jan 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/provider/azure_loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3221,7 +3221,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 @@ -3237,7 +3237,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 @@ -539,7 +539,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