-
Notifications
You must be signed in to change notification settings - Fork 336
feat(platform): support containerd as runtime (#1390) #1470
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(platform): support containerd as runtime (#1390) #1470
Conversation
test/e2e/manifests/tke-platform-controller/tke-platform-controller.yaml
Outdated
Show resolved
Hide resolved
| return err | ||
| } | ||
| option := &image.Option{Version: c.Spec.Version, RegistryDomain: p.config.Registry.Domain} | ||
| err = image.PullKubernetesImages(c, machineSSH, option) |
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.
should not prepull all k8s images
| done | ||
| } | ||
|
|
||
| function download::critools() { |
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 this func
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.
Remove it.
| download::docker | ||
| download::containerd | ||
| download::nerdctl | ||
| download::critools |
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 this func
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.
Remove it.
| env = append(env, fmt.Sprintf("DOCKER_VERSIONS=%s", strings.Join(spec.DockerVersions, " "))) | ||
| env = append(env, fmt.Sprintf("CONTAINERD_VERSIONS=%s", strings.Join(spec.ContainerdVersions, " "))) | ||
| env = append(env, fmt.Sprintf("CRITOOLS_VERSIONS=%s", strings.Join(spec.CriToolsVersions, " "))) | ||
| env = append(env, fmt.Sprintf("NERDCTL_VERSIONS=%s", strings.Join(spec.NerdctlVersions, " "))) |
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 this
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.
Remove it.
huxiaoliang
left a comment
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.
need address comments
| return err | ||
| } | ||
| cmdString := fmt.Sprintf("docker pull %s", images.Get().TKEGateway.FullName()) | ||
| cmdString := fmt.Sprintf("nerdctl --insecure-registry --namespace k8s.io pull %s", images.Get().TKEGateway.FullName()) |
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 --insecre
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.
Need pull without certs.
| return err | ||
| } | ||
| } else { | ||
| cmd = fmt.Sprintf("nerdctl --insecure-registry --namespace k8s.io pull %s", 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.
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.
Add containerd proxy case.
| - name: kubelet-volume | ||
| mountPath: /app/provider/baremetal/conf/kubelet/ | ||
| - name: kubeadm-volume | ||
| - name: kubeadm-config-volume |
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 use this kubead pathc
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.
Todo on next PR.
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 kubeadm-volume
| ) | ||
|
|
||
| func Install(s ssh.Interface, version string) error { | ||
| func Install(s ssh.Interface, version string, option *Option) 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.
version in option
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.
Remove the version into option.
| volumeMounts: | ||
| - mountPath: /app/provider/baremetal | ||
| name: provider-volume | ||
| - mountPath: /app/provider/baremetal/conf/containerd |
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 need new path
| - name: containerd-volume | ||
| emptyDir: {} | ||
| - name: kubeadm-config-volume | ||
| emptyDir: {} |
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.
delete cm path
| @@ -0,0 +1,4 @@ | |||
| runtime-endpoint: unix:///run/containerd/containerd.sock | |||
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.
we need this yaml?
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.
Remove it.
| if err != nil { | ||
| return errors.Wrap(err, machine.IP) | ||
| } | ||
| } |
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.
we need try contained works well with gpu
| items = append(items, components.Pause.FullName()) | ||
|
|
||
| return items | ||
| } |
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.
consolidate ListKubernetesImageFullNamesWithVersion and ListKubernetesNodeImageFullNamesWithVersion
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.
consolidate done.
huxiaoliang
left a comment
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.
don't merge, the comments doesn't get fully addressed
Conflicts: api/platform/v1/generated.pb.go
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.: