Skip to content

Commit

Permalink
Merge pull request #1711 from spencerhance/redirects-fix
Browse files Browse the repository at this point in the history
Fix HttpsRedirects Lifecycle
  • Loading branch information
k8s-ci-robot authored May 10, 2022
2 parents 37a3586 + 56273f5 commit 55ed944
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion pkg/loadbalancers/target_proxies.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ func (l *L7) checkProxy() (err error) {
// TODO(shance): move to translator
var umName string
if flags.F.EnableFrontendConfig {
// TODO(shance): check for empty name?
if l.redirectUm != nil && l.runtimeInfo.FrontendConfig.Spec.RedirectToHttps != nil && l.runtimeInfo.FrontendConfig.Spec.RedirectToHttps.Enabled {
umName = l.redirectUm.Name
} else {
Expand Down
5 changes: 4 additions & 1 deletion pkg/loadbalancers/url_maps.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,10 @@ func (l *L7) ensureRedirectURLMap() error {
return nil
} else {
if err := composite.DeleteUrlMap(l.cloud, key, l.Versions().UrlMap); err != nil {
return err
// Do not block LB sync if this fails
klog.Errorf("DeleteUrlMap(%s) = %v", key, err)
// Signal to the rest of the controller that the UrlMap still exists
l.redirectUm = &composite.UrlMap{Name: key.Name}
}
}
return nil
Expand Down

0 comments on commit 55ed944

Please sign in to comment.