Skip to content

Commit 64db26b

Browse files
authored
Merge pull request #217 from dockersamples/add-ca-trust-to-sdlc-variant
Add bootstrap script to SDLC variant to trust Traefik CA
2 parents 76767e8 + 869759c commit 64db26b

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

compose.override.sdlc.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ services:
3333
- source: workspace-wait-for-bootstrap
3434
target: /startup-scripts/00-wait-for-bootstrap.sh
3535
mode: 0755
36+
- source: workspace-ca-cert-setup
37+
target: /startup-scripts/05-ca-cert-setup.sh
38+
mode: 0755
3639
- source: workspace-ci-secrets
3740
target: /startup-scripts/10-ci-secrets.sh
3841
mode: 0755
@@ -370,6 +373,17 @@ configs:
370373
done
371374
echo "SSH key is registered. Bootstrap complete."
372375
376+
# Sets up the CA cert used by Traefik (the reverse proxy for all of the lab) in the workspace, so that the
377+
# workspace can trust the TLS connections to Gitea and k3s using the Traefik certs
378+
workspace-ca-cert-setup: |
379+
content: |
380+
#!/bin/bash
381+
382+
set -e
383+
384+
cp /traefik-ca/ca.crt /usr/local/share/ca-certificates/traefik-ca.crt
385+
update-ca-certificates
386+
373387
# Creates all CI secrets in the Gitea repo. Can be skipped by setting SKIP_CI_SECRET_SETUP=true,
374388
# which is useful for labs that guide users through creating the secrets themselves.
375389
workspace-ci-secrets:

0 commit comments

Comments
 (0)