Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

[kn-admin]Add support to remove registry with credentials #47

Merged
merged 3 commits into from
Jun 21, 2020

Conversation

12345lcr
Copy link
Contributor

For issue: #39

As a Knative administrator, I want to remove registry with credentials for Knative platform through username and server url.

For example:
# To remove a registry
kn admin registry remove --username=myusername  --server=docker.io

Usage:
  kn admin registry remove [flags]

Flags:
  -h, --help              help for remove
      --server string     Registry Address
      --username string   Registry Username

Global Flags:
      --config string   config file (default is $HOME/.config/kn/plugins/admin.yaml)

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Jun 11, 2020
@knative-prow-robot
Copy link

Welcome @12345lcr! It looks like this is your first PR to knative/client-contrib 🎉

@knative-prow-robot
Copy link

Hi @12345lcr. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@knative-prow-robot knative-prow-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 11, 2020
@zhanggbj
Copy link

/ok-to-test

@knative-prow-robot knative-prow-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 11, 2020
plugins/admin/pkg/command/registry/add.go Outdated Show resolved Hide resolved
plugins/admin/pkg/command/registry/registry.go Outdated Show resolved Hide resolved
plugins/admin/pkg/command/registry/remove.go Outdated Show resolved Hide resolved
plugins/admin/pkg/command/registry/remove.go Outdated Show resolved Hide resolved
@zhanggbj
Copy link

@12345lcr Generally it looks very good! Just a few minor comments as above.
Also could you please help to update the examples for registry rmand user stories in https://github.com/knative/client-contrib/blob/master/plugins/admin/README.adoc? Thanks!

@zhanggbj
Copy link

@rhuss would you please help to add @12345lcr to knative org, or do you have the knative admin contract name? Thanks!

@rhuss
Copy link
Contributor

rhuss commented Jun 11, 2020

You can ask in #steering-toc-questions or for now ping @evankanderson directly. I'm off because of holidays here in Germany and back on Monday.

Copy link
Contributor

@maximilien maximilien left a comment

Choose a reason for hiding this comment

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

See comments. Thanks for contributions.

plugins/admin/pkg/command/registry/add.go Outdated Show resolved Hide resolved
plugins/admin/pkg/command/registry/remove.go Outdated Show resolved Hide resolved
plugins/admin/pkg/command/registry/remove.go Outdated Show resolved Hide resolved
plugins/admin/pkg/command/registry/remove_test.go Outdated Show resolved Hide resolved
@12345lcr
Copy link
Contributor Author

@zhanggbj @chaozbj @maximilien Thank you all for reviewing and I am really appreciate it! I just updated the pr with comments addressed, feel free to review again and leave any comments.

@zhanggbj
Copy link

@12345lcr LGTM. But would you please also add ab example for registry rm in https://github.com/knative/client-contrib/blob/master/plugins/admin/README.adoc as others? Thanks!

@knative-prow-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 12345lcr, zhanggbj

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

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 19, 2020
@zhanggbj
Copy link

LGTM 👍
just noticed @maximilien have requested for change, not sure If Max got further comments. If not, I'll merge it by end of today. Thanks @12345lcr for your PR and patience!!!

@zhanggbj
Copy link

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 21, 2020
@knative-prow-robot knative-prow-robot merged commit 5213e9a into knative:master Jun 21, 2020
@@ -69,23 +69,27 @@ Manage Service deployment from a private registry
For example:

kn admin registry add \
--secret-name=[SECRET_NAME]
Copy link
Contributor

Choose a reason for hiding this comment

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

How about just --secret instead of --secret-name ?

Choose a reason for hiding this comment

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

@navid @12345lcr
I agree, it's good to keep the flag short. About the wording, we have an issue #53 to track, we can fix it there. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

8 participants