Skip to content

Commit 408db67

Browse files
committed
Run kubeval to validate K8S spec files
Signed-off-by: Marco Pracucci <[email protected]>
1 parent 01fae92 commit 408db67

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ lint:
123123
misspell -error docs
124124
golangci-lint run --new-from-rev ed7c302fd968 --build-tags netgo --timeout=5m --enable golint --enable misspell --enable gofmt
125125

126+
# Validate Kubernetes spec files. Requires:
127+
# https://kubeval.instrumenta.dev
128+
kubeval ./k8s/*
129+
126130
test:
127131
./tools/test -netgo
128132

build-image/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ RUN GO111MODULE=on go get -tags netgo \
2020
github.com/gogo/protobuf/[email protected] && \
2121
rm -rf /go/pkg /go/src
2222

23+
ENV KUBEVAL_VERSION=0.14.0
24+
RUN curl -Ls https://github.com/instrumenta/kubeval/releases/download/${KUBEVAL_VERSION}/kubeval-linux-amd64.tar.gz -o /tmp/kubeval-linux-amd64.tar.gz && \
25+
tar -xf /tmp/kubeval-linux-amd64.tar.gz -C /tmp && \
26+
cp /tmp/kubeval /usr/local/bin && \
27+
rm -f /tmp/kubeval*
28+
2329
ENV NODE_PATH=/usr/lib/node_modules
2430
COPY build.sh /
2531
ENV GOCACHE=/go/cache

0 commit comments

Comments
 (0)