karmada-io / karmada

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration
https://karmada.io
Apache License 2.0
4.11k stars 805 forks source link

Add karmadactl addons subcommand #2134

Closed wuyingjun-lucky closed 1 year ago

wuyingjun-lucky commented 1 year ago

Co-authored-by: duanmeng duanmeng_yewu@cmss.chinamobile.com Signed-off-by: wuyingjun wuyingjun_yewu@cmss.chinamobile.com

What type of PR is this? /kind feature

What this PR does / why we need it: Add karmadactl addons subcommand Which issue(s) this PR fixes: Fixes https://github.com/karmada-io/karmada/issues/1957

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE
wuyingjun-lucky commented 1 year ago

-------------------------------------------------latest test result-------------------------------------------------

image image image image

wuyingjun-lucky commented 1 year ago

/assign @lonelyCZ /assign @prodanlabs

lonelyCZ commented 1 year ago

Thanks for your hard work. I will review it ASAP.

wuyingjun-lucky commented 1 year ago

Thanks for your contributions! @wuyingjun-lucky @duanmengkk

I just tested it that was very cool. I think we can start to review it, this is fisrt round.

Help to review again

wuyingjun-lucky commented 1 year ago

@lonelyCZ help to review again

wuyingjun-lucky commented 1 year ago

Ready to be reviewed @lonelyCZ

lonelyCZ commented 1 year ago

It seems not to view options

[root@master67 karmada]# ./karmadactl addons enable -h
Enable Karmada addons from Kubernetes

Examples:
  # Enable Karmada all addons except karmada-scheduler-estimator to Kubernetes cluster
  karmadactl addons enable all
......
Usage:
  karmadactl addons enable [flags] [options]

Use "karmadactl addons options" for a list of global command-line options (applies to all commands).
[root@master67 karmada]# ./karmadactl addons options
Enable or disable a Karmada addon

Examples:
  # Enable or disable Karmada addons to the karmada-host cluster
  karmadactl addons enable karmada-search

Available Commands:
  disable       Disable karmada addons from Kubernetes
  enable        Enable Karmada addons from Kubernetes
  list          List karmada addons from Kubernetes

Use "karmadactl <command> --help" for more information about a given command.
wuyingjun-lucky commented 1 year ago

It seems not to view options

[root@master67 karmada]# ./karmadactl addons enable -h
Enable Karmada addons from Kubernetes

Examples:
  # Enable Karmada all addons except karmada-scheduler-estimator to Kubernetes cluster
  karmadactl addons enable all
......
Usage:
  karmadactl addons enable [flags] [options]

Use "karmadactl addons options" for a list of global command-line options (applies to all commands).
[root@master67 karmada]# ./karmadactl addons options
Enable or disable a Karmada addon

Examples:
  # Enable or disable Karmada addons to the karmada-host cluster
  karmadactl addons enable karmada-search

Available Commands:
  disable       Disable karmada addons from Kubernetes
  enable        Enable Karmada addons from Kubernetes
  list          List karmada addons from Kubernetes

Use "karmadactl <command> --help" for more information about a given command.

Hi, @lonelyCZ

The options seems like a sub command introduced by karmadactl.

image image

and it works for showing global command. Using karmadactl join -h or other subcommand will show the same information

image image

Do you think is it ok to use a new pr or issue to trace the options command ?

lonelyCZ commented 1 year ago

Nice finding!

Do you think is it ok to use a new pr or issue to trace the options command ?

Yes, it is ok. I found it didn't work for subcommand.

Use "karmadactl join options" for a list of global command-line options (applies to all commands).
[root@master67 karmada]# ./karmadactl join options
error: failed to get joining cluster config. error: context "options" does not exist

It looks good to me.

/cc @RainbowMango

lonelyCZ commented 1 year ago

/lgtm

wuyingjun-lucky commented 1 year ago

/assign @RainbowMango

wuyingjun-lucky commented 1 year ago

@RainbowMango Can you help to deal with this pull request ?

wuyingjun-lucky commented 1 year ago

PTAL @RainbowMango

RainbowMango commented 1 year ago

@wuyingjun-lucky is this the latest test result? Can you help update the test result to the PR description?

wuyingjun-lucky commented 1 year ago

@wuyingjun-lucky is this the latest test result? Can you help update the test result to the PR description?

list and disable

image
wuyingjun-lucky commented 1 year ago

@RainbowMango

enable

image
wuyingjun-lucky commented 1 year ago

logsimage

image image
wuyingjun-lucky commented 1 year ago

search aa result

image
wuyingjun-lucky commented 1 year ago

enable new cluster es

image
wuyingjun-lucky commented 1 year ago

@wuyingjun-lucky is this the latest test result? Can you help update the test result to the PR description?

updated

RainbowMango commented 1 year ago

Looks like it's a huge feature. Would you like to make a demo at the community meeting?

@prodanlabs Any comments?

RainbowMango commented 1 year ago
-bash-4.2# ./_output/bin/linux/amd64/karmadactl addons list --help 
List Karmada addons from Kubernetes

Does list mean to check whether supported addons are installed on a specific cluster?

In addition, enable/disable mean to install/install addons from a specific cluster?

wuyingjun-lucky commented 1 year ago

Looks like it's a huge feature. Would you like to make a demo at the community meeting?

@prodanlabs Any comments?

Of course if we are able to attend the meeting

wuyingjun-lucky commented 1 year ago
-bash-4.2# ./_output/bin/linux/amd64/karmadactl addons list --help 
List Karmada addons from Kubernetes

Does list mean to check whether supported addons are installed on a specific cluster?

In addition, enable/disable mean to install/install addons from a specific cluster?

Yes

RainbowMango commented 1 year ago

Great, looking forward to meeting you at the meeting.

wuyingjun-lucky commented 1 year ago

/reopen

karmada-bot commented 1 year ago

@wuyingjun-lucky: Reopened this PR.

In response to [this](https://github.com/karmada-io/karmada/pull/2134#issuecomment-1200855539): >/reopen Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
wuyingjun-lucky commented 1 year ago

Bot Bug happend. As https://github.com/karmada-io/karmada/pull/2283 merged. This pr closed as it refer to 2283 fix comments.

image

/cc @RainbowMango

karmada-bot commented 1 year ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

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: - ~~[OWNERS](https://github.com/karmada-io/karmada/blob/master/OWNERS)~~ [RainbowMango] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
RainbowMango commented 1 year ago

Bot Bug happend. As https://github.com/karmada-io/karmada/pull/2283 merged. This pr closed as it refer to 2283 fix comments.

:) Actually, this is GitHub behavior, not bot..., bot won't close issues when merging PRs.