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

Expose channels through CLI #14072

Merged
merged 2 commits into from
Dec 4, 2022
Merged

Conversation

olemarkus
Copy link
Member

Mount the channels API on kops addons. I put everything under addons rather than reusing kops get etc since especially apply have very different semantics.

Still some work left. In particular getting default cluster name, state store etc. Should try to merge the two CLI factories in some way.

/kind office-hours

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/office-hours cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. area/channels labels Jul 29, 2022
@olemarkus olemarkus mentioned this pull request Jul 30, 2022
@justinsb
Copy link
Member

Meant to comment on this during office hours; I think having get is good here. Apply we might not want to encourage users to use, so I proposed we put that command under toolbox, so we make fewer guarantees about it etc

@justinsb
Copy link
Member

justinsb commented Nov 4, 2022

This came up in office hours, are we agreed that it should go under toolbox? And is this still important?

@olemarkus
Copy link
Member Author

I think this is still important. It's always annoying to tell people they have to log into a control plane node and look at protokube logs in order to determine if channels did something wrong.

@johngmyers
Copy link
Member

Per office hours, we want this to go into toolbox.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. area/documentation and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 4, 2022
@olemarkus olemarkus force-pushed the channels-in-kops branch 2 times, most recently from 988320c to 5493811 Compare December 4, 2022 08:15
@olemarkus olemarkus force-pushed the channels-in-kops branch 2 times, most recently from 5f4ad3a to 60452a2 Compare December 4, 2022 09:13
@olemarkus olemarkus changed the title WIP: Expose channels through kops cli Expose channels through kops cli Dec 4, 2022
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 4, 2022
@olemarkus
Copy link
Member Author

/retest

Copy link
Member

@hakman hakman left a comment

Choose a reason for hiding this comment

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

Works nicely, except for a few nits:

  1. subcommands are awkward, so may be nicer to just redefine them as suggested.
  2. apply requires the channel path, but would be nice to default to the cluster channel.
Error: unexpected number of arguments. Only one channel may be processed at the same time.

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Dec 4, 2022

@olemarkus: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kops-e2e-aws-karpenter 8708f63 link true /test pull-kops-e2e-aws-karpenter

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@olemarkus olemarkus force-pushed the channels-in-kops branch 2 times, most recently from e881825 to e4cc280 Compare December 4, 2022 13:55
@@ -46,8 +46,10 @@ func NewCmdApplyChannel(f Factory, out io.Writer) *cobra.Command {
var options ApplyChannelOptions

cmd := &cobra.Command{
Use: "channel",
Short: "Apply channel",
Use: "channel CHANNEL",
Copy link
Member

Choose a reason for hiding this comment

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

Changes to channels should not be needed anymore.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, but it's still more correct now :p I think we should keep this change.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe just remove the example, or update the command?

@hakman hakman changed the title Expose channels through kops cli Expose channels through CLI Dec 4, 2022
Ole Markus With and others added 2 commits December 4, 2022 15:47
Make the channels apply commmand a bit more clear

Update cmd/kops/toolbox_addons.go

Co-authored-by: Ciprian Hacman <ciprian@hakman.dev>

Update cmd/kops/toolbox_addons.go

Co-authored-by: Ciprian Hacman <ciprian@hakman.dev>

fix docs
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 4, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 4, 2022
@k8s-ci-robot k8s-ci-robot merged commit 42bbf89 into kubernetes:master Dec 4, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.26 milestone Dec 4, 2022
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. area/channels area/documentation cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants