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

Add gopass plugin to krew plugin index #208

Merged
merged 5 commits into from
Aug 26, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions plugins/gopass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
name: gopass
spec:
version: "v0.0.3"
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a version mismatch between this manifest and what is reported by kubectl gopass version (see https://github.com/gopasspw/kubectl-gopass/blob/59315e46389540624cca8c6ecb45694ed1dc3e87/kubectl-gopass#L140). Have you considered to generate deployment artifacts with a script?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, I added a small helper to create the tags and extracted the version as variable in the script.

platforms:
- selector:
matchExpressions:
- {key: os, operator: In, values: [darwin, linux]}
Copy link
Contributor

@corneliusweig corneliusweig Aug 19, 2019

Choose a reason for hiding this comment

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

The script is in pure bash. I think it would also make sense to allow installation on Windows and mention bash as a pre-requisite (which you already do).

Note: for windows, the script should have a .exe ending.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, windows has bash support in newest windows 10 build. I've enabled it. Not sure about the ending though. I will probably revisit later on as gopass support for windows itself is an ongoing topic.

Copy link
Contributor

@corneliusweig corneliusweig Aug 20, 2019

Choose a reason for hiding this comment

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

I'm a bit puzzled now. The manifest has a windows section which also make the CI test fail. Was that intentional?

If you want to add support for windows later, that's fine with me. I was not aware that gopass is not available for windows yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No it shouldn't fail. I made another attempt to fix the build.

uri: https://github.com/gopasspw/kubectl-gopass/archive/v0.0.3.zip
sha256: "ae4d2aa8ec061aa6916b2120fa3caf48d1cee328bab7cd263a03f8b1aeec22f8"
files:
- from: "/kubectl-gopass-*/kubectl-gopass"
to: "."
bin: "./kubectl-gopass"
shortDescription: Imports secrets from gopass
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
shortDescription: Imports secrets from gopass
shortDescription: Imports Secrets from gopass

Making it a capital S signals that this is about kubernetes Secret resources. Or maybe even

Imports Secret resources from gopass

homepage: https://github.com/gopasspw/kubectl-gopass
caveats: |
This plugin requires bash and gopass to be set up correctly
Copy link
Member

Choose a reason for hiding this comment

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

“Correctly” is redundant.

description: |
Copy link
Contributor

Choose a reason for hiding this comment

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

Most plugins also give some basic usage instructions and how to get help.

Copy link
Member

Choose a reason for hiding this comment

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

I think it's ok if --help/-h works.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can copy / paste the usage output here, but not sure what you will gain. I think the usage is quite obvious for gopass users right?

This plugin allows applying and diffing secrets from gopass to k8s
Copy link
Member

Choose a reason for hiding this comment

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

Kubernetes is better.