Skip to content

Commit 727a2e7

Browse files
Merge branch 'allow_root_gitopts_path' into feature/gitops_path_root_support
2 parents 9b8c03d + 3080eef commit 727a2e7

4 files changed

Lines changed: 14 additions & 11 deletions

File tree

create_kind_cluster.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,24 @@ set -o errexit
1313
# desired cluster name; default is "kind"
1414
KIND_CLUSTER_NAME="${KIND_CLUSTER_NAME:-kind}"
1515

16+
# kind executable
17+
go install sigs.k8s.io/kind@v0.29.0
18+
kind="$(go env GOPATH)/bin/kind"
19+
which "${kind}"
20+
1621
# create registry container unless it already exists
1722
reg_name='kind-registry'
18-
reg_port='5000'
23+
reg_port='15000'
1924
running="$(docker inspect -f '{{.State.Running}}' "${reg_name}" 2>/dev/null || true)"
2025
if [ "${running}" != 'true' ]; then
2126
docker container rm "${reg_name}" 2>/dev/null || true
2227
docker run \
23-
-d --restart=always -p "${reg_port}:5000" --name "${reg_name}" \
24-
registry:2
28+
-d --restart=always -e "REGISTRY_HTTP_ADDR=0.0.0.0:${reg_port}" -p "${reg_port}:${reg_port}" --name "${reg_name}" \
29+
registry:3
2530
fi
2631

2732
# create a cluster with the local registry enabled in containerd
28-
cat <<EOF | kind create cluster --name "${KIND_CLUSTER_NAME}" --image "kindest/node:v1.30.13" --config=-
33+
cat <<EOF | "${kind}" create cluster --name "${KIND_CLUSTER_NAME}" --image "kindest/node:v1.30.13" --config=-
2934
kind: Cluster
3035
apiVersion: kind.x-k8s.io/v1alpha4
3136
containerdConfigPatches:

e2e_test.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,12 @@ bindir=$(cd `dirname "$0"` && pwd)
1717
repo_path=$bindir
1818
cd $repo_path
1919

20-
#check installs
20+
# Check prerequisites
2121
bazel version
2222
docker version
2323
which kubectl
2424
go version
2525

26-
go get sigs.k8s.io/kind@v0.29.0
27-
2826
cluster_running="$(docker inspect -f '{{.State.Running}}' kind-control-plane 2>/dev/null || true)"
2927
if [ "${cluster_running}" != 'true' ]; then
3028
./create_kind_cluster.sh

examples/helloworld/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ CLUSTER = "kind-kind"
4545

4646
USER = "kind-kind"
4747

48-
REGISTRY = "localhost:5000"
48+
REGISTRY = "localhost:15000"
4949

5050
k8s_deploy(
5151
name = "mynamespace",

examples/helloworld/k8s_deploy_test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ cat mynamespace.show
3131
grep -F "kind: Deployment" mynamespace.show
3232
grep -F "kind: Service" mynamespace.show
3333
grep -F "name: helloworld" mynamespace.show
34-
grep -E "image: localhost:5000/.*/helloworld/image@sha256" mynamespace.show
34+
grep -E "image: localhost:15000/.*/helloworld/image@sha256" mynamespace.show
3535
grep -E "app_label_image_short_digest" mynamespace.show | grep -v -F 'image.short-digest'
3636

3737
$(rlocation examples/helloworld/canary.show) > canary.show
@@ -42,7 +42,7 @@ grep -F "kind: Deployment" canary.show
4242
grep -F "kind: Service" canary.show
4343
grep -F "namespace: $NAMESPACE" canary.show
4444
grep -F "name: helloworld-canary" canary.show
45-
grep -E "image: localhost:5000/k8s/helloworld/image@sha256" canary.show
45+
grep -E "image: localhost:15000/k8s/helloworld/image@sha256" canary.show
4646

4747
$(rlocation examples/helloworld/release.show) > release.show
4848
echo "DEBUG: release.show:"
@@ -52,4 +52,4 @@ grep -F "kind: Deployment" release.show
5252
grep -F "kind: Service" release.show
5353
grep -F "namespace: $NAMESPACE" canary.show
5454
grep -F "name: helloworld" mynamespace.show
55-
grep -E "image: localhost:5000/k8s/helloworld/image@sha256" release.show
55+
grep -E "image: localhost:15000/k8s/helloworld/image@sha256" release.show

0 commit comments

Comments
 (0)