@@ -27,23 +27,42 @@ runs:
2727 repository : jumpstarter-dev/jumpstarter
2828 ref : ${{ inputs.jumpstarter-ref }}
2929 path : jumpstarter
30- - name : Deploy jumpstarter controller
30+ - name : Deploy dex
3131 shell : bash
3232 run : |
33- cp "$GITHUB_ACTION_PATH"/values.kind.yaml ./controller/deploy/helm/jumpstarter/values.kind.yaml
33+ sudo apt-get update
34+ sudo apt-get install -y easy-rsa
35+
36+ export EASYRSA_BATCH=1
37+ export EASYRSA_PKI=pki
38+ /usr/share/easy-rsa/easyrsa init-pki
39+ /usr/share/easy-rsa/easyrsa --no-pass build-ca
40+ /usr/share/easy-rsa/easyrsa --no-pass build-server-full dex.dex.svc.cluster.local
41+
3442 cp "$GITHUB_ACTION_PATH"/kind_cluster.yaml ./controller/hack/kind_cluster.yaml
35- make -C controller deploy
43+ make -C controller cluster
44+
45+ kubectl create namespace dex
46+ kubectl -n dex create secret tls dex-tls \
47+ --cert=pki/issued/dex.dex.svc.cluster.local.crt \
48+ --key=pki/private/dex.dex.svc.cluster.local.key
49+
50+ go run github.com/mikefarah/yq/v4@latest -i \
51+ '.jumpstarter-controller.authenticationConfig = (.jumpstarter-controller.authenticationConfig | from_yaml | .jwt[0].issuer.certificateAuthority = load_str("pki/ca.crt") | to_yaml)' \
52+ "$GITHUB_ACTION_PATH"/values.kind.yaml
53+
3654 # important!
3755 kubectl create clusterrolebinding oidc-reviewer \
3856 --clusterrole=system:service-account-issuer-discovery \
3957 --group=system:unauthenticated
40- - name : Deploy dex
41- shell : bash
42- run : |
43- kubectl create namespace dex
44- kubectl apply -f "$GITHUB_ACTION_PATH"/dex.yaml
58+
4559 helm repo add dex https://charts.dexidp.io
4660 helm install --namespace dex --wait -f "$GITHUB_ACTION_PATH"/dex.values.yaml dex dex/dex
61+ - name : Deploy jumpstarter controller
62+ shell : bash
63+ run : |
64+ cp "$GITHUB_ACTION_PATH"/values.kind.yaml ./controller/deploy/helm/jumpstarter/values.kind.yaml
65+ make -C controller deploy
4766 - name : Install jumpstarter
4867 shell : bash
4968 run : |
5675 - name : Run jumpstarter
5776 shell : bash
5877 run : |
59- sudo cp "$GITHUB_ACTION_PATH"/minica.pem /usr/local/share/ca-certificates/minica .crt
78+ sudo cp pki/ca.crt /usr/local/share/ca-certificates/ca .crt
6079 sudo update-ca-certificates
6180
6281 echo "127.0.0.1 dex.dex.svc.cluster.local" | sudo tee -a /etc/hosts
0 commit comments