Skip to content

Commit

Permalink
Support deploying Pods (Tekton Tasks, Deployments, ...) from the loca…
Browse files Browse the repository at this point in the history
…l registry.
  • Loading branch information
tmds authored and vdemeester committed Oct 1, 2024
1 parent 7a90f74 commit bcda17a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
9 changes: 8 additions & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ shopt -s inherit_errexit
set -xeu -o pipefail

kind delete cluster
kind create cluster
cat <<EOF | kind create cluster --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry]
config_path = "/etc/containerd/certs.d"
EOF
kind export kubeconfig

source .env
Expand Down
9 changes: 9 additions & 0 deletions install-registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ spec:
app: registry
EOS

phase "Adding local registry to containerd config"
REGISTRY_DIR="/etc/containerd/certs.d/registry.${REGISTRY_NAMESPACE}.svc.cluster.local:32222"
for node in $(kind get nodes); do
docker exec "${node}" mkdir -p "${REGISTRY_DIR}"
cat <<EOF | docker exec -i "${node}" cp /dev/stdin "${REGISTRY_DIR}/hosts.toml"
[host."http://localhost:32222"]
EOF
done


phase "Waiting for Registry rollout"
rollout_status "${REGISTRY_NAMESPACE}" "registry"

0 comments on commit bcda17a

Please sign in to comment.