diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c7c2f670d..ee436e033 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -152,3 +152,23 @@ jobs: with: name: PR_STATUS path: SKIP_CI.txt + + kube-linter: + name: "🎀 kube-linter" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: redhat-actions/oc-installer@v1 + - name: Process template + run: | + mkdir processed-templates + oc process -f templates/composer.yml \ + -p IMAGE_TAG=image_tag \ + --local \ + -o yaml > processed-templates/composer.yml + + - uses: stackrox/kube-linter-action@v1.0.4 + with: + directory: processed-templates + config: templates/.kube-linter-config.yml + version: 0.3.0 diff --git a/templates/.kube-linter-config.yml b/templates/.kube-linter-config.yml new file mode 100644 index 000000000..f3af77f05 --- /dev/null +++ b/templates/.kube-linter-config.yml @@ -0,0 +1,4 @@ +checks: + exclude: + - "no-read-only-root-fs" + - "run-as-non-root"