-
Notifications
You must be signed in to change notification settings - Fork 36
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
add operator describe command #19
Conversation
7988fe9
to
27f6ab8
Compare
what about using
and with
|
@akram Sure! I don't see a reason why it can't be changed from |
I think this would be a great addition! Thanks for taking the time to propose this and put it together! +1 to To keep with the theme of the Also, do you think it be possible to re-use |
@akram Correct me if I'm wrong, but it sounds like you're suggesting to align the name of this subcommand based on your RFE in #22. Typing With this plugin, it is difficult to totally align to existing kubectl idioms without introducing this repetition. Let's continue this conversation in #22. (I'll copy this response there) |
Signed-off-by: Jose R. Gonzalez <josegonzalez89@gmail.com>
27f6ab8
to
c9abf7a
Compare
Latest push is to rebase on main |
Done!
Good catch, apologies for missing that theme! I've made this change roughly to what I think it should look like to keep on theme here. Probably more changes to come regarding this based on what's next, though.
Yup, I see the overlap you're mentioning here. The only thing that I see missing in Also a couple of helper functions, What do you think? As an aside, I'm keeping things as separate commits for the time being but I plan on squashing them down the line once we've finished cleaning this up! |
If I understand correctly, I think we can define and consume those flags entirely on the |
@joelanford Ah, yup! Last two commits should reflect those changes. Here's a quick breakdown of what changed in the latest commits.
Should be working as we described here. Let me know how this looks, any further changes, and if OK I can go through and do some commit squashing as needed. |
Hi folks! Just a friendly ping here to see what might be next for this PR. |
Sorry for the delay @komish! I've been a bit busy lately on some other priorities. At a glance, I think this looks pretty good, but I need to find some time to review a little more in-depth one more time. I should be able to find some time in the next week or two. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also a couple of helper functions, GetAvailableChannels() and GetSupportedInstallModes(). The latter can probably be moved away from being a method on action.OperatorShow into a standalone function somewhere so that really only leaves GetAvailableChannels() which I might want to include in action.OperatorListAvailable.
Yeah I agree we can consolidate some of this. There is some other potential minor refactoring I'm thinking of doing, so I can handle this in a follow-up.
Overall, looks basically ready to merge. Just one question about asNewlineDelimString
vs strings.Join
.
Signed-off-by: Jose R. Gonzalez <josegonzalez89@gmail.com>
Whoops! It absolutely can. Fixed. |
Signed-off-by: Jose R. Gonzalez josegonzalez89@gmail.com
This PR would add the ability to show details about operators available via packagemanifests in a cluster, similar to what one might see when browsing operators in the openshift console. Didn't see the functionality already there, so figured I'd hack together a proof of concept to see if it's something
kubectl-operator
would want to include.Let me know what changes I can make.
examples
By default, the command shows some basic information about the operator.
$ ./kubectl-operator show argocd-operator == Package == Argo CD 0.0.12 (by Argo CD Community) == Repository == https://github.com/argoproj-labs/argocd-operator == Catalog == Community Operators == Channels == alpha (default) (shown) == Install Modes == OwnNamespace SingleNamespace == Description == Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes.
You can add the
--with-long-description
flag to see the operator's description, which is in markdown format and commonly used as the "Readme" to render in the OpenShift Console. Since GitHub uses markdown to render content, I've added some escape ("\") characters to try to prevent this from rendering strangely here on GitHub.If the operator has multiple channels, the
--channel
flag helps render the data from the requested channel. Note the(shown)
annotation.