Commit c446a1e1 authored by QianChenglong's avatar QianChenglong
Browse files

fix: provider config when use thirdparty registry

parent 8f92a293
No related merge requests found
Showing with 10 additions and 9 deletions
+10 -9
......@@ -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)
}
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment