Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support deploying Pods (Tekton Tasks, Deployments, ...) from the local registry. #6

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"