Skip to content

Commit

Permalink
fix: provider config when use thirdparty registry
Browse files Browse the repository at this point in the history
  • Loading branch information
QianChenglong committed Feb 14, 2020
1 parent 8f92a29 commit c446a1e
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions cmd/tke-installer/app/installer/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -889,11 +889,14 @@ func (t *TKE) completeProviderConfigForRegistry() error {
return err
}
c.Registry.Prefix = t.Para.Config.Registry.Prefix()
ip, err := util.GetExternalIP()
if err != nil {
return pkgerrors.Wrap(err, "get external ip error")

if t.Para.Config.Registry.TKERegistry != nil {
ip, err := util.GetExternalIP()
if err != nil {
return pkgerrors.Wrap(err, "get external ip error")
}
c.Registry.IP = ip
}
c.Registry.IP = ip

return c.Save(pluginConfigFile)
}
Expand Down Expand Up @@ -1106,11 +1109,9 @@ func (t *TKE) prepareFrontProxyCertificates() error {
}

func (t *TKE) createGlobalCluster() error {
if t.Para.Config.Registry.TKERegistry != nil {
err := t.completeProviderConfigForRegistry()
if err != nil {
return err
}
err := t.completeProviderConfigForRegistry()
if err != nil {
return err
}

// do again like platform controller
Expand Down

0 comments on commit c446a1e

Please sign in to comment.