Kube-linter in Azure yml pipeline
rajendar123 opened this issue · comments
Hi Team,
We would like to use Kube-linter in azure yml pipeline. I saw there is a Github action in kube-linter document. But I am not able use this action in yml pipeline. Could you please tell me where can I find kube-linter usage in azure yml pipeline document.
Regards,
Rajendar.
Hey, can you share what have you already tried? It look like azure pipeline supports docker images so you can use it to lint your files.
I have tried with Github actions but Github actions are not supported so used docker
docker pull stackrox/kube-linter:0.1.4
docker run -v /path/to/files/you/want/to/lint:/dir -v /path/to/config.yaml:/etc/config.yaml stackrox/kube-linter lint /dir --config /etc/config.yaml
It is working with above code
You can update version as the latest one is 0.2.6
Can you share the whole yaml so maybe some else can use it in the future?
I expect it to look like this:
stages:
- stage: PreDeployment
jobs:
- job: Kube-Linter
steps:
- displayName: Pull stackrox/kube-linter docker image
script: docker pull stackrox/kube-linter:0.2.6
- displayName: kube-linter lint
script: |
docker run \
-v /path/to/files/you/want/to/lint:/dir \
-v /path/to/config.yaml:config.yaml \
stackrox/kube-linter lint /dir --config config.yaml