Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/makocchi-git/actions-k8s-manifests-validate-kubeval
A GitHub action for kubernetes yaml validation by using Kubeval
https://github.com/makocchi-git/actions-k8s-manifests-validate-kubeval
actions kubernetes kubeval yaml
Last synced: about 1 month ago
JSON representation
A GitHub action for kubernetes yaml validation by using Kubeval
- Host: GitHub
- URL: https://github.com/makocchi-git/actions-k8s-manifests-validate-kubeval
- Owner: makocchi-git
- License: wtfpl
- Created: 2020-01-16T01:34:47.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-21T15:56:43.000Z (over 4 years ago)
- Last Synced: 2024-09-28T11:23:32.556Z (about 2 months ago)
- Topics: actions, kubernetes, kubeval, yaml
- Language: Shell
- Size: 104 KB
- Stars: 6
- Watchers: 3
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Validate Kubernetes manifests by kubeval
[](https://github.com/makocchi-git/actions-k8s-manifests-validate/actions)
Validate [Kubernetes](https://github.com/kubernetes/kubernetes) manifests in your repository.
This action uses [Kubeval](https://kubeval.instrumenta.dev/) for validating.## Usage
### Basic
```yaml
# .github/workflows/manifests-validation.yml
name: Pull Request Checkon: [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".😥