diff --git a/client_int_test.go b/client_int_test.go index 2497c329..a36cea3a 100644 --- a/client_int_test.go +++ b/client_int_test.go @@ -48,7 +48,7 @@ const ( // DefaultRegistry must contain both the registry host and // registry namespace at this time. This will likely be // split and defaulted to the forthcoming in-cluster registry. - DefaultRegistry = "localhost:5000/func" + DefaultRegistry = "kind-registry:50000/func" // DefaultNamespace for the underlying deployments. Must be the same // as is set up and configured (see hack/configure.sh) diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 9171f30f..61057d75 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -53,7 +53,7 @@ Allocate a new local cluster by running `hack/allocate.sh`. The allocation script sets up a local container registry and connects it to the cluster. This registry must be set as trusted and its address entered in the local hosts file. This is a one-time configuration and on Linux can be accomplished by running `hack/registry.sh`. -On other systems, add `127.0.0.1 kind-registry` to your local hosts file and `"insecure-registries" = ["kind-registry:5000"]` to your docker daemon config (`docker/daemon.json`). +On other systems, add `127.0.0.1 kind-registry` to your local hosts file and `"insecure-registries" = ["kind-registry:50000"]` to your docker daemon config (`docker/daemon.json`). ### Using the Cluster diff --git a/function_unit_test.go b/function_unit_test.go index faec977f..b18ed56c 100644 --- a/function_unit_test.go +++ b/function_unit_test.go @@ -21,8 +21,8 @@ func TestFunction_ImageWithDigest(t *testing.T) { }{ { name: "Full path with port", - fields: fields{Image: "image-registry.openshift-image-registry.svc.cluster.local:5000/default/bar", ImageDigest: "42"}, - want: "image-registry.openshift-image-registry.svc.cluster.local:5000/default/bar@42", + fields: fields{Image: "image-registry.openshift-image-registry.svc.cluster.local:50000/default/bar", ImageDigest: "42"}, + want: "image-registry.openshift-image-registry.svc.cluster.local:50000/default/bar@42", }, { name: "Path with namespace", diff --git a/hack/allocate.sh b/hack/allocate.sh index 158324f4..15beb4f6 100755 --- a/hack/allocate.sh +++ b/hack/allocate.sh @@ -62,8 +62,8 @@ nodes: listenAddress: "127.0.0.1" containerdConfigPatches: - |- - [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"] - endpoint = ["http://kind-registry:5000"] + [plugins."io.containerd.grpc.v1.cri".registry.mirrors."kind-registry:50000"] + endpoint = ["http://kind-registry:50000"] EOF sleep 10 kubectl wait pod --for=condition=Ready -l '!job-name' -n kube-system --timeout=5m @@ -179,7 +179,7 @@ registry() { # see https://kind.sigs.k8s.io/docs/user/local-registry/ echo "${em}⑥ Registry${me}" - docker run -d --restart=always -p "5000:5000" --name "kind-registry" registry:2 + docker run -d --restart=always -p "50000:50000" --env REGISTRY_HTTP_ADDR="0.0.0.0:50000" --name "kind-registry" registry:2 docker network connect "kind" "kind-registry" kubectl apply -f - < /tmp/daemon.json.tmp && sudo mv /tmp/daemon.json.tmp /etc/docker/daemon.json sudo service docker restart } diff --git a/hack/test-integration-podman.sh b/hack/test-integration-podman.sh index 8b734065..f87df527 100755 --- a/hack/test-integration-podman.sh +++ b/hack/test-integration-podman.sh @@ -5,7 +5,7 @@ unqualified-search-registries = ["docker.io", "quay.io", "registry.fedoraproject short-name-mode="permissive" [[registry]] -location="localhost:5000" +location="kind-registry:50000" insecure=true EOF diff --git a/test/_e2e/config.go b/test/_e2e/config.go index 88c49d0f..8ab41788 100644 --- a/test/_e2e/config.go +++ b/test/_e2e/config.go @@ -7,7 +7,7 @@ import ( // Intended to provide setup configuration for E2E tests const ( - defaultRegistry = "localhost:5000/user" + defaultRegistry = "kind-registry:50000/user" testTemplateRepository = "http://github.com/lance/test-templates.git" //nolint:varcheck,deadcode ) diff --git a/test/_e2e/main_test.go b/test/_e2e/main_test.go index 477bf0ab..b600701f 100644 --- a/test/_e2e/main_test.go +++ b/test/_e2e/main_test.go @@ -56,7 +56,7 @@ func createConfigAuth(dockerConfigFile string, content string) error { if content == "" { content = `{ "auths": { - "localhost:5000": { + "kind-registry:50000": { "auth": "dXNlcjpwYXNzd29yZA==" } } @@ -82,7 +82,7 @@ func updateConfigAuth(dockerConfigFile string) error { log.Println("Updating ./docker/config.json file with default registry authentication.") exp := regexp.MustCompile(`"auths"[\s]*?[:][\s]*?{`) newContent := exp.ReplaceAll(bcontent, []byte(`"auths": { - "localhost:5000": { + "kind-registry:50000": { "auth": "dXNlcjpwYXNzd29yZA==" },`)) diff --git a/testdata/cluster.yaml b/testdata/cluster.yaml index 9b54240d..6faa816b 100644 --- a/testdata/cluster.yaml +++ b/testdata/cluster.yaml @@ -13,5 +13,5 @@ nodes: listenAddress: "127.0.0.1" containerdConfigPatches: - |- - [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"] - endpoint = ["http://kind-registry:5000"] + [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:50000"] + endpoint = ["http://kind-registry:50000"] diff --git a/testdata/repositories/customTemplateRepo/README.md b/testdata/repositories/customTemplateRepo/README.md new file mode 100644 index 00000000..e69de29b