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

introduce kubectl plugin #686

Merged
merged 1 commit into from
Sep 8, 2021

Conversation

XiShanYongYe-Chang
Copy link
Member

@XiShanYongYe-Chang XiShanYongYe-Chang commented Sep 1, 2021

Signed-off-by: changzhen changzhen5@huawei.com

What type of PR is this?

/kind feature

What this PR does / why we need it:

Support kubectl karmada plugin.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

# kubectl karmada -h
kubectl karmada controls a Kubernetes Cluster Federation.

Usage:
  karmada [flags]
  karmada [command]

Available Commands:
  cordon      Mark cluster as unschedulable
  help        Help about any command
  join        Register a cluster to control plane
  uncordon    Mark cluster as schedulable
  unjoin      Remove the registration of a cluster from control plane
  version     Print the version info

Flags:
      --add-dir-header                   If true, adds the file directory to the header of the log messages
      --alsologtostderr                  log to standard error as well as files
  -h, --help                             help for karmada
      --kubeconfig string                Paths to a kubeconfig. Only required if out-of-cluster.
      --log-backtrace-at traceLocation   when logging hits line file:N, emit a stack trace (default :0)
      --log-dir string                   If non-empty, write log files in this directory
      --log-file string                  If non-empty, use this log file
      --log-file-max-size uint           Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
      --log-flush-frequency duration     Maximum number of seconds between log flushes (default 5s)
      --logtostderr                      log to standard error instead of files (default true)
      --one-output                       If true, only write logs to their native severity level (vs also writing to each lower severity level)
      --skip-headers                     If true, avoid header prefixes in the log messages
      --skip-log-headers                 If true, avoid headers when opening log files
      --stderrthreshold severity         logs at or above this threshold go to stderr (default 2)
  -v, --v Level                          number for the log level verbosity
      --vmodule moduleSpec               comma-separated list of pattern=N settings for file-filtered logging

Use "karmada [command] --help" for more information about a command.
# kubectl karmada version
kubectl karmada version: version.Info{GitVersion:"v0.8.0-60-g5250689", GitCommit:"5250689ebc9e8e7b67e5055f6f38c28a3c6d8a45", GitTreeState:"clean", BuildDate:"2021-09-01T10:02:37Z", GoVersion:"go1.16", Compiler:"gc", Platform:"linux/amd64"}

Does this PR introduce a user-facing change?:

User can use `kubectl karmada` command, this command is the same as that of karmadactl.

@karmada-bot karmada-bot added kind/feature Categorizes issue or PR as related to a new feature. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 1, 2021
@XiShanYongYe-Chang XiShanYongYe-Chang force-pushed the kubectl-karmada branch 2 times, most recently from 3c80ece to 5250689 Compare September 1, 2021 09:59
@karmada-bot karmada-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 1, 2021
@RainbowMango
Copy link
Member

Is there a smart way to share code between karmadactl and kubectl-karmada?

@XiShanYongYe-Chang XiShanYongYe-Chang force-pushed the kubectl-karmada branch 3 times, most recently from f5c3184 to 21870a4 Compare September 2, 2021 03:18
Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 8, 2021
@RainbowMango
Copy link
Member

Hi @XiShanYongYe-Chang Please resolve the conflicts...

/hold
/retitle introduce kubectl plugin

@karmada-bot karmada-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 8, 2021
@karmada-bot karmada-bot changed the title support kubectl karmada plugin introduce kubectl plugin Sep 8, 2021
Signed-off-by: changzhen <changzhen5@huawei.com>
@karmada-bot karmada-bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 8, 2021
@XiShanYongYe-Chang
Copy link
Member Author

Hi @XiShanYongYe-Chang Please resolve the conflicts...

Resolved. Please have a look again.

@RainbowMango RainbowMango added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 8, 2021
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@RainbowMango
Copy link
Member

/lgtm
/hold cancel

@karmada-bot karmada-bot added lgtm Indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Sep 8, 2021
@karmada-bot karmada-bot merged commit d69f58c into karmada-io:master Sep 8, 2021
@XiShanYongYe-Chang XiShanYongYe-Chang deleted the kubectl-karmada branch September 16, 2021 02:25
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants