-
Notifications
You must be signed in to change notification settings - Fork 6
59 lines (51 loc) · 1.74 KB
/
kubeconform.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: kubeconform
on: pull_request
jobs:
kubeconform:
runs-on: ubuntu-latest
strategy:
matrix:
k8s_version:
- "1.25.11"
- "1.26.6"
- "1.27.3"
permissions:
contents: read
packages: read
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure test-values
env:
MNEMONIC: ${{ secrets.MNEMONIC }}
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
TEST_VALUES_PATH: ./charts/rollups-node/ci/test-values.yaml
run: cat $TEST_VALUES_PATH.tpl | envsubst > $TEST_VALUES_PATH
- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: v3.12.1
- name: Add dependancies
working-directory: ./charts/rollups-node
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm dependency build
- name: Install kubeconform
env:
KUBECONFORM_VERSION: "0.6.1"
run: |
wget https://github.com/yannh/kubeconform/releases/download/v${KUBECONFORM_VERSION}/kubeconform-linux-amd64.tar.gz
tar -xzf kubeconform-linux-amd64.tar.gz
install kubeconform /usr/local/bin
kubeconform -v
- name: Run kubeconform
run: |
helm template test -f ./charts/rollups-node/ci/test-values.yaml ./charts/rollups-node | \
kubeconform \
-schema-location default \
-schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json' \
-ignore-missing-schemas \
-kubernetes-version=${{ matrix.k8s_version }} \
-output=tap