Skip to content

Commit 93f18ea

Browse files
committed
Add CircleCI manifests validation job
- validate Kubernetes manifests with kubeval - validate Flux Helm Releases with hrval
1 parent f487106 commit 93f18ea

File tree

3 files changed

+51
-4
lines changed

3 files changed

+51
-4
lines changed

.circleci/config.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
version: 2.1
2+
jobs:
3+
validate-yamls:
4+
docker:
5+
- image: circleci/golang:1.13
6+
steps:
7+
- checkout
8+
- run:
9+
name: Install kubeval and hrval
10+
command: |
11+
curl -sL https://raw.githubusercontent.com/stefanprodan/hrval-action/v2.3.0/src/deps.sh | sudo bash
12+
sudo curl -sL https://raw.githubusercontent.com/stefanprodan/hrval-action/v2.3.0/src/hrval.sh \
13+
-o /usr/local/bin/hrval.sh && sudo chmod +x /usr/local/bin/hrval.sh
14+
sudo curl -sL https://raw.githubusercontent.com/stefanprodan/hrval-action/v2.3.0/src/hrval-all.sh \
15+
-o /usr/local/bin/hrval && sudo chmod +x /usr/local/bin/hrval
16+
- run:
17+
name: Validate workloads
18+
environment:
19+
KUBE_VER: "1.16.0"
20+
command: |
21+
kubeval --strict --ignore-missing-schemas --kubernetes-version ${KUBE_VER} -d namespaces,workloads,releases
22+
- run:
23+
name: Validate releases
24+
environment:
25+
IGNORE_VALUES: "false"
26+
KUBE_VER: "1.15.0"
27+
HELM_VER: "v2"
28+
command: |
29+
hrval releases/ $IGNORE_VALUES $KUBE_VER $HELM_VER
30+
31+
workflows:
32+
version: 2
33+
validate:
34+
jobs:
35+
- validate-yamls:
36+
filters:
37+
branches:
38+
ignore:
39+
- gh-pages

README.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
# flux-get-started
22

3+
[![CircleCI](https://circleci.com/gh/fluxcd/flux-get-started.svg?style=svg)](https://circleci.com/gh/fluxcd/flux-get-started)
4+
35
We published a step-by-step run-through on how to use Flux and Helm Operator [over
46
here](https://github.com/fluxcd/flux/blob/master/docs/tutorials/get-started-helm.md).
57

6-
### Workloads
8+
## Workloads
79

810
[podinfo](https://github.com/stefanprodan/podinfo)
911
* Kubernetes deployment, ClusterIP service and Horizontal Pod Autoscaler
1012
* init container automated image updates (regular expression filter)
1113
* container automated image updates (semantic versioning filter)
1214

13-
### Helm releases
15+
## Helm Releases
1416

1517
Mongodb
1618
* Source: Helm repository (stable)
@@ -27,7 +29,13 @@ Ghost
2729
* disabled automated image updates (glob filter)
2830
* has external dependency - mariadb (stable)
2931

30-
## <a name="help"></a>Getting Help
32+
## Manifests Validation
33+
34+
CircleCI [jobs](./.circleci/config.yml):
35+
* validate Kubernetes manifests with [kubeval](https://github.com/instrumenta/kubeval)
36+
* validate Flux Helm Releases with [hrval](https://github.com/stefanprodan/hrval-action)
37+
38+
### <a name="help"></a>Getting Help
3139

3240
If you have any questions about, feedback for or problems with `flux-get-started`:
3341

releases/ghost.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ metadata:
1010
spec:
1111
releaseName: ghost
1212
chart:
13-
git: ssh://[email protected]/weaveworks/flux-get-started
13+
git: ssh://[email protected]/fluxcd/flux-get-started
1414
ref: master
1515
path: charts/ghost
1616
values:

0 commit comments

Comments
 (0)