Skip to content

Commit 7a6948b

Browse files
committed
Fix kind/tilt setup and move setup script to hack folder
1 parent a86c1e7 commit 7a6948b

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ delete-workload-cluster: $(CLUSTERCTL) ## Deletes the development Kubernetes Clu
272272

273273
.PHONY: kind-create
274274
kind-create: $(KUBECTL) ## create capm kind cluster if needed
275-
./scripts/kind-with-registry.sh
275+
./hack/kind-with-registry.sh
276276

277277
.PHONY: kind-delete
278278
kind-delete: ## Destroys the "capm" kind cluster.

Tiltfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ settings = {
1818
],
1919
"preload_images_for_kind": True,
2020
"kind_cluster_name": "capm",
21-
"capi_version": "v1.6.4",
22-
"capi_ipam_version": "v1.0.1",
21+
"capi_version": "v1.11.2",
22+
"capi_ipam_version": "v1.0.3",
2323
"cert_manager_version": "v1.14.4",
24-
"kubernetes_version": "v1.29.4",
24+
"kubernetes_version": "v1.30.5",
2525
"metal_image": "ghcr.io/ironcore-dev/metal-operator-controller-manager:latest",
2626
"new_args": {
2727
"metal": [
Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,22 @@ kind: Cluster
3434
apiVersion: kind.x-k8s.io/v1alpha4
3535
containerdConfigPatches:
3636
- |-
37-
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:${reg_port}"]
38-
endpoint = ["http://${reg_name}:5000"]
37+
[plugins."io.containerd.grpc.v1.cri".registry]
38+
config_path = "/etc/containerd/certs.d"
3939
EOF
4040

41-
# connect the registry to the cluster network
42-
# (the network may already be connected)
43-
docker network connect "kind" "${reg_name}" || true
41+
# add the registry config to the nodes
42+
REGISTRY_DIR="/etc/containerd/certs.d/localhost:${reg_port}"
43+
node="capm-control-plane"
44+
docker exec "${node}" mkdir -p "${REGISTRY_DIR}"
45+
cat <<EOF | docker exec -i "${node}" cp /dev/stdin "${REGISTRY_DIR}/hosts.toml"
46+
[host."http://${reg_name}:5000"]
47+
EOF
48+
49+
# aonnect the registry to the cluster network if not already connected
50+
if [ "$(docker inspect -f='{{json .NetworkSettings.Networks.kind}}' "${reg_name}")" = 'null' ]; then
51+
docker network connect "kind" "${reg_name}"
52+
fi
4453

4554
# Document the local registry
4655
# https://github.com/kubernetes/enhancements/tree/master/keps/sig-cluster-lifecycle/generic/1755-communicating-a-local-registry

0 commit comments

Comments
 (0)