Skip to content

Commit

Permalink
Try kubeconform instead of kubeval
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoref committed Apr 24, 2024
1 parent 1702625 commit ee840c8
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 16 deletions.
6 changes: 2 additions & 4 deletions .github/actions/spelling-data/expect.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
configmap
fullname
garnercorp
GOPATH
kube
kubectl
kubeconform
kubernetes
kubeval
nindent
noreply
opensource
plugins
pvc
sbt
scalafix
stefanprodan
tpl
trunc
unshallow
Expand Down
4 changes: 4 additions & 0 deletions .github/actions/spelling-data/patterns.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
# version suffix <word>v#
(?:(?<=[A-Z]{2})V|(?<=[a-z]{2}|[A-Z]{2})v)\d+(?:\b|(?=[a-zA-Z_]))

# hit-count: 1 file-count: 1
# go install
go install(?:\s+[a-z]+\.[-@\w/.]+)+

# Questionably acceptable forms of `in to`
# Personally, I prefer `log into`, but people object
# https://www.tprteaching.com/log-into-log-in-to-login/
Expand Down
4 changes: 0 additions & 4 deletions .github/kubeval.sh

This file was deleted.

4 changes: 4 additions & 0 deletions .github/validate-kube.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh -e
for f in charts/*; do
helm template "$f" | kubeconform --strict
done
13 changes: 5 additions & 8 deletions .github/workflows/helm-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,11 @@ jobs:
default_branch: ${{ github.event.repository.default_branch }}
run: ct lint --target-branch "$default_branch"

- name: Download kubeval
- name: Download kubeconform
run: |
mkdir bin
cd bin
curl -L https://github.com/instrumenta/kubeval/releases/latest/download/kubeval-linux-amd64.tar.gz |
tar zx
pwd >> "$GITHUB_PATH"
go install github.com/yannh/kubeconform/cmd/kubeconform@latest
echo $(go env GOPATH)/bin >> "$GITHUB_PATH"
- name: Run kubeval
- name: Validate kubernetes objects
run: |
./.github/kubeval.sh
./.github/validate-kube.sh

0 comments on commit ee840c8

Please sign in to comment.