Skip to content

Kubernetes yaml validation by kubeval

Actions
Validate Kubernetes manifests by using Kubeval
v1.0.1
Latest
Star (6)

Validate Kubernetes manifests by kubeval

Validate Kubernetes manifests in your repository.
This action uses Kubeval for validating.

sample comment

Usage

Basic

# .github/workflows/manifests-validation.yml
name: Pull Request Check

on: [pull_request]

jobs:
  validation:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: validate manifests in dir1 and dir2
        uses: makocchi-git/[email protected]
        with:
          files: dir1,dir2
          token: ${{ secrets.GITHUB_TOKEN }}

Input parameters

Parameter Description Default
files Files or directories to validate .
version Version of Kubernetes to validate against master
strict Whether to not to check for extra properties true
openshift Whether to use the schemas from OpenShift rather than Kubernetes false
ignore_missing_schemas Whether or not to skip custom resources true
comment Write validation details to pull request comments true
token Github token for api. This is required if comment is true ""

NOTICE: Currently kubeval does not support to ignore specify files in the target directories. So when you set the files parameter to "."(default), your action would say "ERR - .github/workflows/your_action.yml: Missing 'kind' key".😥

Kubernetes yaml validation by kubeval is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Validate Kubernetes manifests by using Kubeval
v1.0.1
Latest

Kubernetes yaml validation by kubeval is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.