5555 - main
5656 - auth
5757 - helm
58+ test-variation :
59+ - " "
5860 include :
5961 # Chart.yaml contains the chart's oldest supported k8s version, we
6062 # test against that and the oldest known supported helm cli version
@@ -70,19 +72,56 @@ jobs:
7072 # upgrade-from represents a release channel, see: https://jupyterhub.github.io/helm-chart/info.json
7173 upgrade-from : dev
7274 upgrade-from-extra-args : " "
75+ - k3s-channel : v1.25
76+ test : helm
77+ test-variation : dind
78+ local-chart-extra-args : >-
79+ --values testing/k8s-binder-k8s-hub/binderhub-chart+dind.yaml
80+ --set config.BinderHub.image_prefix=$REGISTRY_HOST/test/
81+ --set registry.url=http://$REGISTRY_HOST
82+ - k3s-channel : v1.25
83+ test : helm
84+ test-variation : pink
85+ local-chart-extra-args : >-
86+ --values testing/k8s-binder-k8s-hub/binderhub-chart+pink.yaml
87+ --set config.BinderHub.image_prefix=$REGISTRY_HOST/test/
88+ --set registry.url=http://$REGISTRY_HOST
89+
90+ services :
91+ registry :
92+ image : docker.io/library/registry:latest
93+ ports :
94+ - 5000:5000
95+
7396 steps :
7497 - uses : actions/checkout@v3
7598 with :
7699 # chartpress requires the full history
77100 fetch-depth : 0
78101
102+ - name : Set registry host
103+ if : matrix.test-variation == 'dind' || matrix.test-variation == 'pink'
104+ run : |
105+ REGISTRY_HOST=$(hostname -I | awk '{print $1}'):5000
106+ echo REGISTRY_HOST="$REGISTRY_HOST" >> $GITHUB_ENV
107+
108+ # Allow k3s to pull from private registry
109+ # https://docs.k3s.io/installation/private-registry
110+ sudo mkdir -p /etc/rancher/k3s/
111+ cat << EOF | sudo tee /etc/rancher/k3s/registries.yaml
112+ mirrors:
113+ "$REGISTRY_HOST":
114+ endpoint:
115+ - "http://$REGISTRY_HOST"
116+ EOF
117+
79118 - uses : jupyterhub/action-k3s-helm@v3
80119 with :
81120 k3s-channel : ${{ matrix.k3s-channel }}
82121 helm-version : ${{ matrix.helm-version }}
83122 metrics-enabled : false
84123 traefik-enabled : false
85- docker-enabled : true
124+ docker-enabled : ${{ matrix.test-variation != 'dind' && matrix.test-variation != 'pink' }}
86125
87126 - name : Setup OS level dependencies
88127 run : |
@@ -145,9 +184,17 @@ jobs:
145184 run : |
146185 export DOCKER_BUILDKIT=1
147186
187+ CHARTPRESS_ARGS=
188+ if [ "${{ matrix.test-variation }}" = "dind" -o "${{ matrix.test-variation }}" = "pink" ]; then
189+ CHARTPRESS_ARGS="--image-prefix localhost:5000/binderhub- --push"
190+
191+ # Allow the pods to push to the non-https GitHub workflow registry
192+ envsubst < testing/k8s-binder-k8s-hub/cm-insecure-registries-${{ matrix.test-variation }}.yaml | kubectl apply -f -
193+ fi
194+
148195 # Use chartpress to create the helm chart and build its images
149196 helm dependency update ./helm-chart/binderhub
150- (cd helm-chart && chartpress)
197+ (cd helm-chart && chartpress $CHARTPRESS_ARGS )
151198 git --no-pager diff --color=always
152199
153200 - name : Generate values.schema.json from schema.yaml
@@ -286,7 +333,12 @@ jobs:
286333 uses : jupyterhub/action-k8s-namespace-report@v1
287334 if : always()
288335 with :
289- important-workloads : deploy/binder deploy/hub deploy/proxy
336+ important-workloads : >
337+ deploy/binder
338+ deploy/hub
339+ deploy/proxy
340+ daemonset/binderhub-test-dind
341+ daemonset/binderhub-test-pink
290342
291343 # GitHub action reference: https://github.com/codecov/codecov-action
292344 - name : Upload coverage stats
0 commit comments