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

Support for --all-namespaces #3

Open
xunholy opened this issue May 13, 2020 · 4 comments
Open

Support for --all-namespaces #3

xunholy opened this issue May 13, 2020 · 4 comments

Comments

@xunholy
Copy link

xunholy commented May 13, 2020

- conftest test -o "${{ inputs.output }}" -p "${{ inputs.policy }}" --namespace "${{ inputs.namespace }}" --combine="${{ inputs.combine }}" ${{ inputs.files }}

I've like to be able to specify any number of the supported flags available in the conftest CLI can we have an input that allows me to specify my own flags? Or can we get support for --all-namespaces in the interim?

@garethr
Copy link
Collaborator

garethr commented May 13, 2020

Adding an args property would definitely feel like a good idea for arbitrary flags. I've done this with other Actions and it works well.

@xunholy
Copy link
Author

xunholy commented May 13, 2020

Agreed, this would then decouple the Github actions needing to maintain new inputs as the upstream CLI added new functionality. I also noticed here we're pinning the image to use latest we should also have the ability to version pin the Github action ideally, it needs to be a more conscious effort in case there could be introduced breaking changes or some fundamental functionality changes, EG. Flags, and other general upstream changes.

@garethr
Copy link
Collaborator

garethr commented May 13, 2020

Alas you can't (or at least couldn't) pass a variable from the Action to the image. If you've seen a nice pattern for that I'd definitely be interested.

@xunholy
Copy link
Author

xunholy commented May 13, 2020

@garethr correct the way it has been implemented does make it difficult.

I helped do something similar for the ansible-lint-action - https://github.com/ansible/ansible-lint-action

It wasn't exactly how I'd like but they now use override-deps as a way to cherrypick the version they want to install and use in their dockerfile by running custom logic in their entrypoint script.

The alternative is to explicitly use the image:tag with the version then release the action with tags so you can reference the action like following:

- name: Conftest
  uses: instrumenta/[email protected]

I think either approach is fine, I find the latter requires more maintenance on this repo to ensure the new releases are maintained and tagged so the first option being able to parse the version puts that effort into the users' hands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants