@@ -46,42 +46,14 @@ jobs:
4646 - uses : actions/setup-go@v2
4747 with : { go-version: 1.x }
4848
49- - name : Install k3d
50- # Git tag from https://github.com/rancher/k3d/releases or "latest"
51- env : { K3D_TAG: latest }
52- run : |
53- curl --fail --silent https://raw.githubusercontent.com/rancher/k3d/main/install.sh |
54- TAG="${K3D_TAG#latest}" bash && k3d version | head -n1
55-
5649 - name : Start k3s
57- # https://rancher.com/docs/k3s/latest/en/upgrades/basic/#release-channels
58- env : { K3S_CHANNEL: "${{ matrix.kubernetes }}" }
59- run : k3d cluster create --image="+${K3S_CHANNEL}" --no-lb --timeout=2m --wait
50+ uses : ./.github/actions/k3d
51+ with :
52+ k3s-channel : " ${{ matrix.kubernetes }}"
53+ prefetch-images : |
54+ registry.developers.crunchydata.com/crunchydata/crunchy-postgres:centos8-13.5-0
55+ registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:centos8-2.36-0
56+ registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:centos8-1.16-0
6057
61- - name : Prefetch container images
62- run : |
63- {
64- echo '"registry.developers.crunchydata.com/crunchydata/crunchy-postgres:centos8-13.5-0"'
65- echo '"registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:centos8-2.36-0"'
66- echo '"registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:centos8-1.16-0"'
67- } |
68- jq --slurp --arg name 'image-prefetch' --argjson labels '{"name":"image-prefetch"}' '{
69- apiVersion: "apps/v1", kind: "DaemonSet",
70- metadata: { name: $name, labels: $labels },
71- spec: {
72- selector: { matchLabels: $labels },
73- template: {
74- metadata: { labels: $labels },
75- spec: {
76- initContainers: to_entries | map({ name: "c\(.key)", command: ["true"], image: .value }),
77- containers: [{ name: "pause", image: "k8s.gcr.io/pause:3.5" }]
78- }
79- }
80- }
81- }' |
82- kubectl create --filename=- && {
83- kubectl rollout status daemonset.apps/image-prefetch --timeout=90s ||
84- kubectl describe daemonset.apps/image-prefetch
85- }
8658 - env : { PGO_TEST_TIMEOUT_SCALE: 1.2 }
8759 run : make createnamespaces check-envtest-existing
0 commit comments