-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (70 loc) · 2.47 KB
/
k8s.yml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: k8s-lint
on:
push:
branches:
- master
- main
pull_request:
jobs:
k8s-lint:
name: helm-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: alexellis/setup-arkade@v1
- uses: alexellis/arkade-get@master
with:
kubectl: latest
kustomize: latest
kubeconform: latest
kubeval: latest
helm: latest
jq: latest
yq: latest
- name: helm-lint-dex
run: |
helm lint charts/dex
- name: helm-lint-dex-k8s-auth
run: |
helmv3 lint charts/dex-k8s-authenticator
- name: helm-template
run: |
helm template charts/dex --output-dir /github/workspace/rendered-charts/dex
helm template charts/dex-k8s-authenticator --output-dir /github/workspace/rendered-charts/dex-k8s-authenticator
- name: kubeval
run: |
kubeval -d /github/workspace/rendered-charts --strict --ignore-missing-schemas
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup-kind
uses: engineerd/[email protected]
with:
name: kind
- name: build-ci-image
run: |
docker build -t sl1pm4t/dex-k8s-authenticator:${GITHUB_SHA} .
kind load docker-image sl1pm4t/dex-k8s-authenticator:${GITHUB_SHA}
- name: update-helm-values
run: |
set -x
export NODE_IP=$(kubectl get nodes -o jsonpath="{.items[0].status.addresses[0].address}")
export CI_TAG=$GITHUB_SHA
envsubst < ./tests/e2e/helm/dex-overrides.yaml > /tmp/dex-overrides.yaml
envsubst < ./tests/e2e/helm/dex-k8s-auth-overrides.yaml > /tmp/dex-k8s-auth-overrides.yaml
- name: install-dex
run: |
helm install -f /tmp/dex-overrides.yaml dex ./charts/dex
kubectl describe deployment dex
kubectl rollout status deploy dex -w
- name: install-dex-auth
run: |
helm install -f /tmp/dex-k8s-auth-overrides.yaml dex-k8s-authenticator ./charts/dex-k8s-authenticator
kubectl describe deployment dex-k8s-authenticator
kubectl rollout status deploy dex-k8s-authenticator -w
- name: test
run: |
kubectl get pods
export NODE_IP=$(kubectl get nodes -o jsonpath="{.items[0].status.addresses[0].address}")
curl -Lsf "http://${NODE_IP}:30000/login/my-cluster" | grep "Log in to Your Account"