Skip to content
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

Merged
merged 5 commits into from
Mar 17, 2022

Conversation

gy95
Copy link
Member

@gy95 gy95 commented Mar 14, 2022

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?:


@kubeedge-bot kubeedge-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 14, 2022
"Container runtime type, default is docker")

cmd.Flags().StringVar(&cfg.RemoteRuntimeEndpoint, cmdcommon.RemoteRuntimeEndpoint, cfg.RemoteRuntimeEndpoint,
"KubeEdge Edge Node RemoteRuntimeEndpoint string")
Copy link
Collaborator

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

Copy link
Member Author

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")
Copy link
Collaborator

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
Copy link
Collaborator

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

Copy link
Member Author

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.

Copy link
Collaborator

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)
Copy link
Collaborator

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes

Copy link
Member Author

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)
}

Copy link
Collaborator

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

Copy link
Member Author

@gy95 gy95 Mar 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed, PTAL again

Copy link
Collaborator

@wackxu wackxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kubeedge-bot
Copy link
Collaborator

@wackxu: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

lgtm

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.

Copy link
Member

@fisherxu fisherxu left a 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

@zc2638
Copy link
Member

zc2638 commented Mar 16, 2022

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
+1

@kubeedge-bot kubeedge-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 16, 2022
Signed-off-by: gy95 <guoyao17@huawei.com>
Signed-off-by: gy95 <guoyao17@huawei.com>
Signed-off-by: gy95 <guoyao17@huawei.com>
@kubeedge-bot kubeedge-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 16, 2022
Signed-off-by: gy95 <guoyao17@huawei.com>
Signed-off-by: gy95 <guoyao17@huawei.com>
Copy link
Member

@fisherxu fisherxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
/assign @zc2638

@kubeedge-bot
Copy link
Collaborator

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubeedge-bot kubeedge-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 17, 2022
@zc2638
Copy link
Member

zc2638 commented Mar 17, 2022

/lgtm

@kubeedge-bot kubeedge-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 17, 2022
@kubeedge-bot kubeedge-bot merged commit 3d5404c into kubeedge:master Mar 17, 2022
@gy95 gy95 deleted the remoteimage branch March 17, 2022 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants