Skip to content

Commit

Permalink
fix(installer): industry code bug (#1900)
Browse files Browse the repository at this point in the history
* fix(installer): move nginx&webhookCertGen to base components

* fix(installer): local registry need source ip
  • Loading branch information
wl-chen authored Apr 30, 2022
1 parent 59f5bb2 commit 4c13117
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
26 changes: 14 additions & 12 deletions cmd/tke-installer/app/installer/images/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ type BaseComponents struct {
ProviderRes containerregistry.Image
TKEGateway containerregistry.Image

NginxIngress containerregistry.Image
KebeWebhookCertgen containerregistry.Image

NFSProvisioner containerregistry.Image

CsiNodeDriverRegistrar containerregistry.Image
Expand All @@ -48,12 +51,10 @@ type BaseComponents struct {
}

type ExComponents struct {
Registry containerregistry.Image
Busybox containerregistry.Image
InfluxDB containerregistry.Image
Thanos containerregistry.Image
NginxIngress containerregistry.Image
KebeWebhookCertgen containerregistry.Image
Registry containerregistry.Image
Busybox containerregistry.Image
InfluxDB containerregistry.Image
Thanos containerregistry.Image

TKEBusinessAPI containerregistry.Image
TKEBusinessController containerregistry.Image
Expand Down Expand Up @@ -89,12 +90,10 @@ func (c Components) Get(name string) *containerregistry.Image {
var Version = version.Get().GitVersion

var exComponents = ExComponents{
Registry: containerregistry.Image{Name: "registry", Tag: "2.7.1"},
Busybox: containerregistry.Image{Name: "busybox", Tag: "1.31.1"},
InfluxDB: containerregistry.Image{Name: "influxdb", Tag: "1.7.9"},
Thanos: containerregistry.Image{Name: "thanos", Tag: "v0.15.0"},
NginxIngress: containerregistry.Image{Name: "ingress-nginx-controller", Tag: "v1.1.3"},
KebeWebhookCertgen: containerregistry.Image{Name: "kube-webhook-certgen", Tag: "v1.1.1"},
Registry: containerregistry.Image{Name: "registry", Tag: "2.7.1"},
Busybox: containerregistry.Image{Name: "busybox", Tag: "1.31.1"},
InfluxDB: containerregistry.Image{Name: "influxdb", Tag: "1.7.9"},
Thanos: containerregistry.Image{Name: "thanos", Tag: "v0.15.0"},

TKEBusinessAPI: containerregistry.Image{Name: "tke-business-api", Tag: Version},
TKEBusinessController: containerregistry.Image{Name: "tke-business-controller", Tag: Version},
Expand All @@ -121,6 +120,9 @@ var baseComponents = BaseComponents{
ProviderRes: containerregistry.Image{Name: "provider-res", Tag: "v1.21.4-3"},
TKEGateway: containerregistry.Image{Name: "tke-gateway", Tag: Version},

NginxIngress: containerregistry.Image{Name: "ingress-nginx-controller", Tag: "v1.1.3"},
KebeWebhookCertgen: containerregistry.Image{Name: "kube-webhook-certgen", Tag: "v1.1.1"},

NFSProvisioner: containerregistry.Image{Name: "nfs-subdir-external-provisioner", Tag: "v4.0.2"},

CsiNodeDriverRegistrar: containerregistry.Image{Name: "csi-node-driver-registrar", Tag: "v2.4.0"},
Expand Down
3 changes: 0 additions & 3 deletions cmd/tke-installer/app/installer/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -921,9 +921,6 @@ func (t *TKE) completeProviderConfigForRegistry() error {

if t.Para.Config.Registry.TKERegistry != nil {
ip, err := utilnet.GetSourceIP(t.Para.Cluster.Spec.Machines[0].IP)
if t.Para.Config.HA != nil && len(t.Para.Config.HA.VIP()) > 0 {
ip = t.Para.Config.HA.VIP()
}
if err != nil {
return errors.Wrap(err, "get ip for registry error")
}
Expand Down

0 comments on commit 4c13117

Please sign in to comment.