-
Notifications
You must be signed in to change notification settings - Fork 327
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
feat(installer): support containerd installation #1404
feat(installer): support containerd installation #1404
Conversation
pkg/util/docker/docker.go
Outdated
} | ||
return nil | ||
} | ||
|
||
// PushImage pushes an image. | ||
func (d *Docker) PushImage(image string) error { | ||
cmdString := fmt.Sprintf("docker push %s", image) | ||
cmdString := fmt.Sprintf("ctr images push %s -u admin:admin -k", image) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not use admin:admin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to use password and username.
if err != nil { | ||
return err | ||
} | ||
localHosts.File = "/etc/hosts" | ||
localHosts.File = "/app/hosts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change /etc/hosts to /app/hosts?
@@ -1284,33 +1283,6 @@ func (t *TKE) setupLocalRegistry(ctx context.Context) error { | |||
return nil | |||
} | |||
|
|||
func (t *TKE) startLocalRegistry() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where the images should be pushed to before tke-registry is installed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tke-registry create by nerdctl because nerdctl can not create containers inside container.
@@ -2529,40 +2500,23 @@ func (t *TKE) pushImages(ctx context.Context) error { | |||
} | |||
|
|||
// only push image | |||
err = t.docker.PushImage(image) | |||
err = t.docker.PushImage(image, t.Para.Config.Registry.TKERegistry.Username, string(t.Para.Config.Registry.TKERegistry.Password)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we need docker for pushing images?
@@ -76,7 +76,7 @@ var components = Components{ | |||
InfluxDB: containerregistry.Image{Name: "influxdb", Tag: "1.7.9"}, | |||
Thanos: containerregistry.Image{Name: "thanos", Tag: "v0.15.0"}, | |||
|
|||
ProviderRes: containerregistry.Image{Name: "provider-res", Tag: "v1.20.4-2"}, | |||
ProviderRes: containerregistry.Image{Name: "provider-res", Tag: "v1.20.4-3"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no one use v1.20.4-2, please reuse this version.
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: