Skip to content

Commit 875a1f3

Browse files
authored
feat: include kind-config in taskfile (#172)
Include the kind config directly in the Taskfile. This removes the requirement of having the kind-config.yaml file present locally and facilitate the usage of the Taskfile for remote executions. Closes #171 Signed-off-by: Gabriele Fedi <gabriele.fedi@enterprisedb.com>
1 parent 8992540 commit 875a1f3

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

.github/workflows/bake.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ jobs:
4141
_shared: &shared
4242
- 'docker-bake.hcl'
4343
- 'Taskfile.yml'
44-
- 'kind-config.yaml'
4544
- 'test/**'
4645
- '.github/workflows/bake*.yml'
4746
pgvector:

Taskfile.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,21 @@ tasks:
229229
env:
230230
_EXPERIMENTAL_DAGGER_RUNNER_HOST: container://{{ .DAGGER_ENGINE_NAME }}
231231
cmds:
232-
- >
233-
dagger call -m github.com/aweris/daggerverse/kind@{{ .DAGGER_KIND_SHA }} --socket {{ .DOCKER_SOCKET }}
234-
container with-env-variable --name=KIND_EXPERIMENTAL_DOCKER_NETWORK --value={{ .E2E_NETWORK }} with-env-variable --name=CACHE_BUSTER --value="$(date)"
235-
with-file --source=kind-config.yaml --path=/root/kind-config.yaml
232+
- |
233+
KIND_CONFIG=$(cat <<'EOF'
234+
kind: Cluster
235+
apiVersion: kind.x-k8s.io/v1alpha4
236+
featureGates:
237+
ImageVolume: true
238+
containerdConfigPatches:
239+
- |-
240+
[plugins."io.containerd.cri.v1.images".registry]
241+
config_path = "/etc/containerd/certs.d"
242+
EOF
243+
)
244+
dagger call -m github.com/aweris/daggerverse/kind@{{ .DAGGER_KIND_SHA }} --socket {{ .DOCKER_SOCKET }} \
245+
container with-env-variable --name=KIND_EXPERIMENTAL_DOCKER_NETWORK --value={{ .E2E_NETWORK }} with-env-variable --name=CACHE_BUSTER --value="$(date)" \
246+
with-new-file --contents="${KIND_CONFIG}" --path=/root/kind-config.yaml \
236247
with-exec --args="kind","create","cluster","--name","{{ .KIND_CLUSTER_NAME }}","--image","kindest/node:{{ .KIND_NODE_VERSION }}","--config","/root/kind-config.yaml" sync
237248
- docker exec "{{ .KIND_CLUSTER_NAME }}-control-plane" mkdir -p "{{ .REGISTRY_DIR }}"
238249
- |

kind-config.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)