Skip to content
check

GitHub Action

Kubernetes yaml validation by kubeval0.15.0

v1.0.6 Pre-release

Kubernetes yaml validation by kubeval0.15.0

check

Kubernetes yaml validation by kubeval0.15.0

Validate Kubernetes manifests by using Kubeval

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Kubernetes yaml validation by kubeval0.15.0

uses: andloh/[email protected]

Learn more about this action in andloh/actions-k8s-manifests-validate-kubeval

Choose a version

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: andloh/[email protected]
        with:
          files: dir1,dir2
          token: ${{ secrets.GITHUB_TOKEN }}
          ignored_filename_patterns: .github/workflow/action.yaml,file2.yaml

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 ""
ignored_filename_patterns A comma-separated list of regular expressions specifying filenames to ignore ""