kubernetes-sigs/kubectl-validate

Usage with CI?

alexzielenski opened this issue · 13 comments

readme could use a guide on how to integrate kubectl-validate into your CI system

If this is available to work on - I can help with this as well.

/assign

Happy to help @clearnicki if you need, let me know what I can do to be useful :-)

@alexzielenski I can start working on this today - is there anything specific that you would like to be included?

@apelisse - yea I would love some help, I can reach out to you on slack!

Spoke with @apelisse - this seems more involved than I have time for right now.

/unassign

This looks very promising for our CI automation - we've been looking at Kubeconform but we'd rather integrate a project that's already part of a K8s SIG. Would be interested in contributing to this after we finish our initial integration (we're planning on running this in GitHub Actions)

Minimally, publishing release binaries will be helpful for this to be walk-up usable - we could contribute that to this repo (or to get started faster we can start publishing it in an internal mirror)

Minimally, publishing release binaries will be helpful for this to be walk-up usable

That's good to know, please feel free to share anything that prevents you from integrating. May I ask what CI system you use? We could publish binary, but also a docker image I think would be nice. We're also planning on having a github action to easily run it. In the mean-time, a go install ... should work wonders for most people.

eyarz commented

I opened a PR with a naive implantation of kubectl-validate with github workflow and docker. This can be a good workaround until this project will get an official GitHub Action (published on the marketplace) and a Docker image (published on a registry).

I can help with that, but it will be impossible to do it without having some access permissions to this project to set it up.

Thank you @eyarz :)

Also, I think I can help with this task too. Just let me know if you think I can do anything.

I can help with that, but it will be impossible to do it without having some access permissions to this project to set it up.

Let's see if we can make that work. Ping me on slack!

This can be a good workaround until this project will get an official GitHub Action (published on the marketplace) and a Docker image (published on a registry)

I'm interested in both, I'm looking in the latter right now. Looks like we should be able to publish the docker image in registry.k8s.io!

MPV commented

This would be really helpful, as just running go install sigs.k8s.io/kubectl-validate@latest in CI currently takes more than 2.5 minutes to download.

I imagine either a binary or a docker image would be a lot quicker.

@MPV you can download the binary from the release page https://github.com/kubernetes-sigs/kubectl-validate/releases/tag/v0.0.4

Here (#142) is an implementation of validation errors as lint output. You can use this with reviewdog to post PR comments.

image