-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
keadm beta config images: support remote runtime #3700
Conversation
"Container runtime type, default is docker") | ||
|
||
cmd.Flags().StringVar(&cfg.RemoteRuntimeEndpoint, cmdcommon.RemoteRuntimeEndpoint, cfg.RemoteRuntimeEndpoint, | ||
"KubeEdge Edge Node RemoteRuntimeEndpoint string") |
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.
s/KubeEdge Edge Node RemoteRuntimeEndpoint string/remoteRuntimeEndpoint is the endpoint of remote runtime service in edge node/g
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.
fixed to The endpoint of remote runtime service in edge node
"Container runtime type, default is docker") | ||
|
||
cmd.Flags().StringVar(&cfg.RemoteRuntimeEndpoint, cmdcommon.RemoteRuntimeEndpoint, cfg.RemoteRuntimeEndpoint, | ||
"KubeEdge Edge Node RemoteRuntimeEndpoint string") |
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.
s/KubeEdge Edge Node RemoteRuntimeEndpoint string/remoteRuntimeEndpoint is the endpoint of remote runtime service in edge node/g
} | ||
} | ||
|
||
return nil |
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.
if image not exist, we should return err
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.
line 275: this status == nil || status.Id == ""
block represent the image not exist
line 281 represent the image exist or pull image successfully.
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.
got it
func (runtime *DockerRuntime) PullImage(image string) error { | ||
cli, err := dockerclient.NewClientWithOpts(dockerclient.FromEnv) | ||
if err != nil { | ||
return fmt.Errorf("init docker dockerclient failed: %v", err) |
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.
s/init docker dockerclient failed/init docker client failed/g
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.
yes
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.
fixed
if err != nil { | ||
return fmt.Errorf("init docker client failed: %v", err) | ||
} | ||
|
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.
I think we should call docker NegotiateAPIVersion
to solve docker client and server API version mismatch problem. I have encountered this problem ever
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.
fixed, PTAL again
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.
lgtm
@wackxu: adding LGTM is restricted to approvers and reviewers in OWNERS files. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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.
Looks good. And can we reuse the options and func from beta join? So it's no need to maintain two parts of image pulling thing. cc @zc2638
|
Signed-off-by: gy95 <guoyao17@huawei.com>
Signed-off-by: gy95 <guoyao17@huawei.com>
Signed-off-by: gy95 <guoyao17@huawei.com>
Signed-off-by: gy95 <guoyao17@huawei.com>
Signed-off-by: gy95 <guoyao17@huawei.com>
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.
/approve
/assign @zc2638
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fisherxu, wackxu The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
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?: