Skip to content

Commit 10ebfdc

Browse files
authored
expose a nodeport on kind cluster (#1021)
Signed-off-by: yashoza19 <[email protected]>
1 parent 235e3d4 commit 10ebfdc

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ E2E_REGISTRY_NAMESPACE := operator-controller-e2e
125125

126126
export REG_PKG_NAME := registry-operator
127127
export REGISTRY_ROOT := $(E2E_REGISTRY_NAME).$(E2E_REGISTRY_NAMESPACE).svc:5000
128-
export CATALOG_IMG := $(REGISTRY_ROOT)/test-catalog:e2e
128+
export CATALOG_IMG := $(REGISTRY_ROOT)/e2e/test-catalog:e2e
129129
.PHONY: test-ext-dev-e2e
130130
test-ext-dev-e2e: $(OPERATOR_SDK) $(KUSTOMIZE) $(KIND) #HELP Run extension create, upgrade and delete tests.
131131
test/extension-developer-e2e/setup.sh $(OPERATOR_SDK) $(CONTAINER_RUNTIME) $(KUSTOMIZE) $(KIND) $(KIND_CLUSTER_NAME) $(E2E_REGISTRY_NAMESPACE)
@@ -181,7 +181,7 @@ kind-redeploy: generate docker-build kind-load kind-deploy #EXHELP Redeploy newl
181181
.PHONY: kind-cluster
182182
kind-cluster: $(KIND) #EXHELP Standup a kind cluster.
183183
-$(KIND) delete cluster --name $(KIND_CLUSTER_NAME)
184-
$(KIND) create cluster --name $(KIND_CLUSTER_NAME) --image $(KIND_CLUSTER_IMAGE)
184+
$(KIND) create cluster --name $(KIND_CLUSTER_NAME) --image $(KIND_CLUSTER_IMAGE) --config ./kind-config.yaml
185185
$(KIND) export kubeconfig --name $(KIND_CLUSTER_NAME)
186186

187187
.PHONY: kind-clean

kind-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: kind.x-k8s.io/v1alpha4
2+
kind: Cluster
3+
nodes:
4+
- role: control-plane
5+
extraPortMappings:
6+
# e2e image registry service's NodePort
7+
- containerPort: 30000
8+
hostPort: 30000
9+
listenAddress: "127.0.0.1"
10+
protocol: tcp

test/tools/image-registry.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,11 @@ spec:
9090
selector:
9191
app: registry
9292
ports:
93-
- port: 5000
93+
- name: http
94+
port: 5000
9495
targetPort: 5000
96+
nodePort: 30000
97+
type: NodePort
9598
EOF
9699

97100
kubectl wait --for=condition=Available -n "${namespace}" "deploy/${name}" --timeout=60s

0 commit comments

Comments
 (0)