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

feat: kosmosctl image pull/push #279

Merged

Conversation

kuangcheng66
Copy link
Contributor

feat: kosmosctl image pull/push

What type of PR is this?

  • feat: add kosmosctl image pull/push func

What does this PR do?

kosmosctl image pull --kosmos-version=[default: latest] --coredns-version=[default: latest] --eps-version=[default: latest]
kosmoscrl image push --artifact=[*.tar.gz] --username=[registry-username] --private-registry=[private-registry-name]

Which issue(s) does this PR fix?

Fixes #109

@kuangcheng66
Copy link
Contributor Author

/assign @wuyingjun-lucky @duanmengkk


func (o *CommandPullOptions) Run() error {
// 1. pull image from public registry
klog.Info("Start pulling images ...")
Copy link
Member

Choose a reason for hiding this comment

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

I think we may set the log level

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I'll set the output level of the log on the entire code

return nil
}

func (o *CommandPullOptions) ImagePull() (imageList []string, err error) {
Copy link
Member

Choose a reason for hiding this comment

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

ImagePull ---> pullImage

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

)

const (
ClusterTreeKnodeManager = "ghcr.io/kosmos-io/clustertree-knode-manager"
Copy link
Member

Choose a reason for hiding this comment

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

I think the KnodeManager is discard

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I'll recheck the names of all the images.

feat: kosmosctl image pull/push

Signed-off-by: kuangcheng <[email protected]>

fix: add klog level and check image name

Signed-off-by: kuangcheng <[email protected]>
@kuangcheng66 kuangcheng66 force-pushed the kosmosctl-install-image-version branch from 6a22894 to 546d553 Compare November 23, 2023 02:01
@wuyingjun-lucky
Copy link
Member

/approve

@kosmos-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kuangcheng66, wuyingjun-lucky

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

@wuyingjun-lucky
Copy link
Member

/lgtm

@kosmos-robot kosmos-robot merged commit 56f1258 into kosmos-io:main Nov 29, 2023
6 checks passed
@kuangcheng66 kuangcheng66 deleted the kosmosctl-install-image-version branch December 11, 2023 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kosmosctl command should support offline installation
4 participants