5454 test :
5555 - main
5656 - auth
57- - helm
57+ test-variation :
58+ - " "
5859 include :
5960 # Chart.yaml contains the chart's oldest supported k8s version, we
6061 # test against that and the oldest known supported helm cli version
@@ -64,25 +65,60 @@ jobs:
6465 - k3s-channel : v1.20
6566 helm-version : v3.5.0
6667 test : helm
68+ test-variation : dind
69+ local-chart-extra-args : >-
70+ --values testing/k8s-binder-k8s-hub/binderhub-chart+dind.yaml
71+ --set config.BinderHub.image_prefix=$REGISTRY_HOST/test/
72+ --set registry.url=http://$REGISTRY_HOST
73+ - k3s-channel : latest
74+ test : helm
75+ test-variation : pink
76+ local-chart-extra-args : >-
77+ --values testing/k8s-binder-k8s-hub/binderhub-chart+pink.yaml
78+ --set config.BinderHub.image_prefix=$REGISTRY_HOST/test/
79+ --set registry.url=http://$REGISTRY_HOST
6780 - k3s-channel : latest
6881 test : helm
6982 test-variation : upgrade
7083 # upgrade-from represents a release channel, see: https://jupyterhub.github.io/helm-chart/info.json
7184 upgrade-from : dev
7285 upgrade-from-extra-args : " "
86+
87+ services :
88+ registry :
89+ image : docker.io/library/registry:latest
90+ ports :
91+ - 5000:5000
92+
7393 steps :
7494 - uses : actions/checkout@v3
7595 with :
7696 # chartpress requires the full history
7797 fetch-depth : 0
7898
99+ - name : Set registry host
100+ if : matrix.test-variation == 'dind' || matrix.test-variation == 'pink'
101+ run : |
102+ REGISTRY_HOST=$(hostname -I | awk '{print $1}'):5000
103+ echo REGISTRY_HOST="$REGISTRY_HOST" >> $GITHUB_ENV
104+
105+ # Allow k3s to pull from private registry
106+ # https://docs.k3s.io/installation/private-registry
107+ sudo mkdir -p /etc/rancher/k3s/
108+ cat << EOF | sudo tee /etc/rancher/k3s/registries.yaml
109+ mirrors:
110+ "$REGISTRY_HOST":
111+ endpoint:
112+ - "http://$REGISTRY_HOST"
113+ EOF
114+
79115 - uses : jupyterhub/action-k3s-helm@v3
80116 with :
81117 k3s-channel : ${{ matrix.k3s-channel }}
82118 helm-version : ${{ matrix.helm-version }}
83119 metrics-enabled : false
84120 traefik-enabled : false
85- docker-enabled : true
121+ docker-enabled : ${{ matrix.test-variation != 'dind' && matrix.test-variation != 'pink' }}
86122
87123 - name : Setup OS level dependencies
88124 run : |
@@ -145,9 +181,17 @@ jobs:
145181 run : |
146182 export DOCKER_BUILDKIT=1
147183
184+ CHARTPRESS_ARGS=
185+ if [ "${{ matrix.test-variation }}" = "dind" -o "${{ matrix.test-variation }}" = "pink" ]; then
186+ CHARTPRESS_ARGS="--image-prefix localhost:5000/binderhub- --push"
187+
188+ # Allow the pods to push to the non-https GitHub workflow registry
189+ envsubst < testing/k8s-binder-k8s-hub/cm-insecure-registries-${{ matrix.test-variation }}.yaml | kubectl apply -f -
190+ fi
191+
148192 # Use chartpress to create the helm chart and build its images
149193 helm dependency update ./helm-chart/binderhub
150- (cd helm-chart && chartpress)
194+ (cd helm-chart && chartpress $CHARTPRESS_ARGS )
151195 git --no-pager diff --color=always
152196
153197 - name : Generate values.schema.json from schema.yaml
@@ -286,7 +330,12 @@ jobs:
286330 uses : jupyterhub/action-k8s-namespace-report@v1
287331 if : always()
288332 with :
289- important-workloads : deploy/binder deploy/hub deploy/proxy
333+ important-workloads : >
334+ deploy/binder
335+ deploy/hub
336+ deploy/proxy
337+ daemonset/binderhub-test-dind
338+ daemonset/binderhub-test-pink
290339
291340 # GitHub action reference: https://github.com/codecov/codecov-action
292341 - name : Upload coverage stats
0 commit comments