diff --git a/BUILD.bazel b/BUILD.bazel index 98394e00030a..01eac4ae7aa4 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -85,6 +85,7 @@ filegroup( ".git/**", "*.db", "*.gz", + "_bin/**", ], ), visibility = ["//visibility:private"], diff --git a/prow/BUILD.bazel b/prow/BUILD.bazel index cda8858eb5c4..e734a232882a 100644 --- a/prow/BUILD.bazel +++ b/prow/BUILD.bazel @@ -94,14 +94,14 @@ prow_push( images = image_tags( targets = { # Local registry as documented: https://kind.sigs.k8s.io/docs/user/local-registry/ - "localhost:5000/sinker": "//prow/cmd/sinker:image", - "localhost:5000/crier": "//prow/cmd/crier:image", - "localhost:5000/hook": "//prow/cmd/hook:image", - "localhost:5000/horologium": "//prow/cmd/horologium:image", - "localhost:5000/prow-controller-manager": "//prow/cmd/prow-controller-manager:image", - "localhost:5000/deck": "//prow/cmd/deck:image", - "localhost:5000/tide": "//prow/cmd/tide:image", - "localhost:5000/fakeghserver": "//prow/test/integration/fakeghserver:image", + "localhost:5001/sinker": "//prow/cmd/sinker:image", + "localhost:5001/crier": "//prow/cmd/crier:image", + "localhost:5001/hook": "//prow/cmd/hook:image", + "localhost:5001/horologium": "//prow/cmd/horologium:image", + "localhost:5001/prow-controller-manager": "//prow/cmd/prow-controller-manager:image", + "localhost:5001/deck": "//prow/cmd/deck:image", + "localhost:5001/tide": "//prow/cmd/tide:image", + "localhost:5001/fakeghserver": "//prow/test/integration/fakeghserver:image", }, ), ) diff --git a/prow/test/integration/README.md b/prow/test/integration/README.md index 47ccda04a6e9..1154c325f017 100644 --- a/prow/test/integration/README.md +++ b/prow/test/integration/README.md @@ -47,11 +47,11 @@ Delete the local cluster and the local registry. (Assume the component to be added is named `most-awesome-component`) -* Add `most-awesome-component` at [`testimage-push`](https://github.com/kubernetes/test-infra/blob/f9fb6d28ebbcf77dc0b99d741b8df5f5d85c739e/prow/BUILD.bazel#L66) target, so that the component is pushed to `localhost:5000` registry +* Add `most-awesome-component` at [`testimage-push`](https://github.com/kubernetes/test-infra/blob/f9fb6d28ebbcf77dc0b99d741b8df5f5d85c739e/prow/BUILD.bazel#L66) target, so that the component is pushed to `localhost:5001` registry * Deploy `most-awesome-component` during integration test https://github.com/kubernetes/test-infra/blob/f9fb6d28ebbcf77dc0b99d741b8df5f5d85c739e/prow/test/integration/setup-cluster.sh#L33, and cleanup the component after integration test https://github.com/kubernetes/test-infra/blob/f9fb6d28ebbcf77dc0b99d741b8df5f5d85c739e/prow/test/integration/cleanup.sh#L23 * Add `most-awesome-component` deployment yaml at https://github.com/kubernetes/test-infra/tree/master/prow/test/integration/prow/cluster, so that the deployment works. Modifications involve: * `most-awesome-component_service.yaml` and `most-awesome-component_rbac.yaml` can be symlinks from https://github.com/kubernetes/test-infra/tree/master/config/prow/cluster. - * `most-awesome-component_deployment.yaml` will at least requires changing image registry to `localhost:5000` like https://github.com/kubernetes/test-infra/blob/f9fb6d28ebbcf77dc0b99d741b8df5f5d85c739e/prow/test/integration/prow/cluster/hook_deployment.yaml#L41. + * `most-awesome-component_deployment.yaml` will at least requires changing image registry to `localhost:5001` like https://github.com/kubernetes/test-infra/blob/f9fb6d28ebbcf77dc0b99d741b8df5f5d85c739e/prow/test/integration/prow/cluster/hook_deployment.yaml#L41. * [If using github client] `github-endpoint` should be changed to `fakeghserver`, which was from https://github.com/kubernetes/test-infra/tree/master/prow/test/integration/fakeghserver. * [If using github client] Existing fake github server only implemented partial github APIs, will need to add APIs that `most-awesome-component` uses at https://github.com/kubernetes/test-infra/tree/master/prow/test/integration/fakeghserver diff --git a/prow/test/integration/prow/cluster/crier_deployment.yaml b/prow/test/integration/prow/cluster/crier_deployment.yaml index f3db2b721484..7a0e1fc142be 100644 --- a/prow/test/integration/prow/cluster/crier_deployment.yaml +++ b/prow/test/integration/prow/cluster/crier_deployment.yaml @@ -19,7 +19,7 @@ spec: terminationGracePeriodSeconds: 30 containers: - name: crier - image: localhost:5000/crier + image: localhost:5001/crier args: - --config-path=/etc/config/config.yaml - --github-endpoint=http://fakeghserver diff --git a/prow/test/integration/prow/cluster/deck_deployment.yaml b/prow/test/integration/prow/cluster/deck_deployment.yaml index 759d226c299f..f9ed4ad0262d 100644 --- a/prow/test/integration/prow/cluster/deck_deployment.yaml +++ b/prow/test/integration/prow/cluster/deck_deployment.yaml @@ -38,7 +38,7 @@ spec: terminationGracePeriodSeconds: 30 containers: - name: deck - image: localhost:5000/deck + image: localhost:5001/deck imagePullPolicy: Always ports: - name: http diff --git a/prow/test/integration/prow/cluster/fakeghserver.yaml b/prow/test/integration/prow/cluster/fakeghserver.yaml index d4f28b32522e..1b723f255c58 100644 --- a/prow/test/integration/prow/cluster/fakeghserver.yaml +++ b/prow/test/integration/prow/cluster/fakeghserver.yaml @@ -17,7 +17,7 @@ spec: spec: containers: - name: fakeghserver - image: localhost:5000/fakeghserver + image: localhost:5001/fakeghserver ports: - containerPort: 8888 --- diff --git a/prow/test/integration/prow/cluster/hook_deployment.yaml b/prow/test/integration/prow/cluster/hook_deployment.yaml index 3ca7f572179b..9d2abf1b60ee 100644 --- a/prow/test/integration/prow/cluster/hook_deployment.yaml +++ b/prow/test/integration/prow/cluster/hook_deployment.yaml @@ -38,7 +38,7 @@ spec: terminationGracePeriodSeconds: 180 containers: - name: hook - image: localhost:5000/hook + image: localhost:5001/hook imagePullPolicy: Always args: - --dry-run=false diff --git a/prow/test/integration/prow/cluster/horologium_deployment.yaml b/prow/test/integration/prow/cluster/horologium_deployment.yaml index 73eaf5f2e02a..9f10e8128284 100644 --- a/prow/test/integration/prow/cluster/horologium_deployment.yaml +++ b/prow/test/integration/prow/cluster/horologium_deployment.yaml @@ -35,7 +35,7 @@ spec: terminationGracePeriodSeconds: 30 containers: - name: horologium - image: localhost:5000/horologium + image: localhost:5001/horologium args: - --config-path=/etc/config/config.yaml - --job-config-path=/etc/job-config diff --git a/prow/test/integration/prow/cluster/prow_controller_manager_deployment.yaml b/prow/test/integration/prow/cluster/prow_controller_manager_deployment.yaml index 28b35c56b9e4..ab6a51a15a01 100644 --- a/prow/test/integration/prow/cluster/prow_controller_manager_deployment.yaml +++ b/prow/test/integration/prow/cluster/prow_controller_manager_deployment.yaml @@ -34,7 +34,7 @@ spec: serviceAccountName: prow-controller-manager containers: - name: prow-controller-manager - image: localhost:5000/prow-controller-manager + image: localhost:5001/prow-controller-manager args: - --config-path=/etc/config/config.yaml - --dry-run=false diff --git a/prow/test/integration/prow/cluster/sinker.yaml b/prow/test/integration/prow/cluster/sinker.yaml index 7d6df036407c..f5cb2ba1943d 100644 --- a/prow/test/integration/prow/cluster/sinker.yaml +++ b/prow/test/integration/prow/cluster/sinker.yaml @@ -133,7 +133,7 @@ spec: args: - --config-path=/etc/config/config.yaml - --dry-run=false - image: localhost:5000/sinker + image: localhost:5001/sinker volumeMounts: - name: config mountPath: /etc/config diff --git a/prow/test/integration/prow/cluster/tide_deployment.yaml b/prow/test/integration/prow/cluster/tide_deployment.yaml index c5758042ac56..ab87e7f00fbf 100644 --- a/prow/test/integration/prow/cluster/tide_deployment.yaml +++ b/prow/test/integration/prow/cluster/tide_deployment.yaml @@ -34,7 +34,7 @@ spec: serviceAccountName: tide containers: - name: tide - image: localhost:5000/tide + image: localhost:5001/tide args: - --dry-run=true - --github-endpoint=http://fakeghserver diff --git a/prow/test/integration/prow/jobs/periodics.yaml b/prow/test/integration/prow/jobs/periodics.yaml index 1661194a6bf2..ce78b091c5f3 100644 --- a/prow/test/integration/prow/jobs/periodics.yaml +++ b/prow/test/integration/prow/jobs/periodics.yaml @@ -7,4 +7,4 @@ periodics: - echo args: - "Hello World!" - image: localhost:5000/alpine + image: localhost:5001/alpine diff --git a/prow/test/integration/setup-cluster.sh b/prow/test/integration/setup-cluster.sh index c2da451e4243..c6af93ae3156 100755 --- a/prow/test/integration/setup-cluster.sh +++ b/prow/test/integration/setup-cluster.sh @@ -29,7 +29,7 @@ fi readonly DEFAULT_CLUSTER_NAME="kind-prow-integration" readonly DEFAULT_CONTEXT="kind-${DEFAULT_CLUSTER_NAME}" readonly DEFAULT_REGISTRY_NAME="kind-registry" -readonly DEFAULT_REGISTRY_PORT="5000" +readonly DEFAULT_REGISTRY_PORT="5001" readonly PROW_COMPONENTS="sinker crier hook horologium prow-controller-manager fakeghserver deck tide deck-tenanted" if [[ -z "${HOME:-}" ]]; then # kubectl looks for HOME which is not set in bazel @@ -54,7 +54,7 @@ apiVersion: kind.x-k8s.io/v1alpha4 containerdConfigPatches: - |- [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:${DEFAULT_REGISTRY_PORT}"] - endpoint = ["http://${DEFAULT_REGISTRY_NAME}:${DEFAULT_REGISTRY_PORT}"] + endpoint = ["http://${DEFAULT_REGISTRY_NAME}:5000"] nodes: - role: control-plane kubeadmConfigPatches: @@ -142,8 +142,8 @@ function deploy_prow() { function push_prow_job_image() { echo "Push test image to registry" docker pull gcr.io/k8s-prow/alpine - docker tag gcr.io/k8s-prow/alpine:latest localhost:5000/alpine:latest - docker push localhost:5000/alpine:latest + docker tag gcr.io/k8s-prow/alpine:latest localhost:5001/alpine:latest + docker push localhost:5001/alpine:latest } function main() { diff --git a/prow/test/integration/setup-local-registry.sh b/prow/test/integration/setup-local-registry.sh index ad2afce00f6c..73da69cddf57 100755 --- a/prow/test/integration/setup-local-registry.sh +++ b/prow/test/integration/setup-local-registry.sh @@ -20,14 +20,14 @@ set -o pipefail readonly DEFAULT_CLUSTER_NAME="kind-prow-integration" readonly DEFAULT_CONTEXT="kind-${DEFAULT_CLUSTER_NAME}" readonly DEFAULT_REGISTRY_NAME="kind-registry" -readonly DEFAULT_REGISTRY_PORT="5000" +readonly DEFAULT_REGISTRY_PORT="5001" # create registry container unless it already exists running="$(docker inspect -f '{{.State.Running}}' "${DEFAULT_REGISTRY_NAME}" 2>/dev/null || true)" if [ "${running}" != 'true' ]; then echo "Creating docker container for hosting local registry localhost:${DEFAULT_REGISTRY_PORT}" docker run \ - -d --restart=always -p "127.0.0.1:${DEFAULT_REGISTRY_PORT}:${DEFAULT_REGISTRY_PORT}" --name "${DEFAULT_REGISTRY_NAME}" \ + -d --restart=always -p "127.0.0.1:${DEFAULT_REGISTRY_PORT}:5000" --name "${DEFAULT_REGISTRY_NAME}" \ registry:2 else echo "Local registry localhost:${DEFAULT_REGISTRY_PORT} already exist and running." diff --git a/prow/test/integration/test/sinker_test.go b/prow/test/integration/test/sinker_test.go index 77c5cfa83f44..16557fc8f8ad 100644 --- a/prow/test/integration/test/sinker_test.go +++ b/prow/test/integration/test/sinker_test.go @@ -68,7 +68,7 @@ func TestDeletePod(t *testing.T) { Containers: []corev1.Container{ { Name: "alpine", - Image: "localhost:5000/alpine", + Image: "localhost:5001/alpine", Args: []string{ "sleep", "1000000", @@ -108,7 +108,7 @@ func TestDeletePod(t *testing.T) { Containers: []corev1.Container{ { Name: "alpine", - Image: "localhost:5000/alpine", + Image: "localhost:5001/alpine", Args: []string{ "sleep", "1000000", @@ -149,7 +149,7 @@ func TestDeletePod(t *testing.T) { Containers: []corev1.Container{ { Name: "alpine", - Image: "localhost:5000/alpine", + Image: "localhost:5001/alpine", Args: []string{ "sleep", "1000000", @@ -191,7 +191,7 @@ func TestDeletePod(t *testing.T) { Containers: []corev1.Container{ { Name: "alpine", - Image: "localhost:5000/alpine", + Image: "localhost:5001/alpine", Args: []string{ "sleep", "1000000", @@ -214,7 +214,7 @@ func TestDeletePod(t *testing.T) { Containers: []corev1.Container{ { Name: "alpine", - Image: "localhost:5000/alpine", + Image: "localhost:5001/alpine", Args: []string{ "sleep", "1000000",