Skip to content

Commit e24db2b

Browse files
authored
test: new LoadBalancer Service e2e test (#1304)
**What problem does this PR solve?**: Creates a new check in Nutanix e2e tests that reservces an IP in the Subnet for metallb, creates a Deployment and Service and verifies its reachable from inside the runner. **Which issue(s) this PR fixes**: Fixes # **How Has This Been Tested?**: <!-- Please describe the tests that you ran to verify your changes. Provide output from the tests and any manual steps needed to replicate the tests. --> **Special notes for your reviewer**: <!-- Use this to provide any additional information to the reviewers. This may include: - Best way to review the PR. - Where the author wants the most review attention on. - etc. -->
1 parent 376cfd4 commit e24db2b

13 files changed

+225
-36
lines changed

examples/capi-quick-start/nutanix-cluster-calico-crs.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,8 @@ spec:
9595
serviceLoadBalancer:
9696
configuration:
9797
addressRanges:
98-
- end: 198.18.1.10
99-
start: 198.18.1.1
100-
- end: 198.18.1.30
101-
start: 198.18.1.21
98+
- end: ${KUBERNETES_SERVICE_LOAD_BALANCER_IP}
99+
start: ${KUBERNETES_SERVICE_LOAD_BALANCER_IP}
102100
provider: MetalLB
103101
controlPlane:
104102
nutanix:

examples/capi-quick-start/nutanix-cluster-calico-helm-addon.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,8 @@ spec:
9292
serviceLoadBalancer:
9393
configuration:
9494
addressRanges:
95-
- end: 198.18.1.10
96-
start: 198.18.1.1
97-
- end: 198.18.1.30
98-
start: 198.18.1.21
95+
- end: ${KUBERNETES_SERVICE_LOAD_BALANCER_IP}
96+
start: ${KUBERNETES_SERVICE_LOAD_BALANCER_IP}
9997
provider: MetalLB
10098
controlPlane:
10199
nutanix:

examples/capi-quick-start/nutanix-cluster-cilium-crs.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,8 @@ spec:
9595
serviceLoadBalancer:
9696
configuration:
9797
addressRanges:
98-
- end: 198.18.1.10
99-
start: 198.18.1.1
100-
- end: 198.18.1.30
101-
start: 198.18.1.21
98+
- end: ${KUBERNETES_SERVICE_LOAD_BALANCER_IP}
99+
start: ${KUBERNETES_SERVICE_LOAD_BALANCER_IP}
102100
provider: MetalLB
103101
controlPlane:
104102
nutanix:

examples/capi-quick-start/nutanix-cluster-cilium-helm-addon.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,8 @@ spec:
9494
serviceLoadBalancer:
9595
configuration:
9696
addressRanges:
97-
- end: 198.18.1.10
98-
start: 198.18.1.1
99-
- end: 198.18.1.30
100-
start: 198.18.1.21
97+
- end: ${KUBERNETES_SERVICE_LOAD_BALANCER_IP}
98+
start: ${KUBERNETES_SERVICE_LOAD_BALANCER_IP}
10199
provider: MetalLB
102100
controlPlane:
103101
nutanix:

examples/capi-quick-start/nutanix-cluster-with-failuredomains-cilium-crs.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,8 @@ spec:
131131
serviceLoadBalancer:
132132
configuration:
133133
addressRanges:
134-
- end: 198.18.1.10
135-
start: 198.18.1.1
136-
- end: 198.18.1.30
137-
start: 198.18.1.21
134+
- end: ${KUBERNETES_SERVICE_LOAD_BALANCER_IP}
135+
start: ${KUBERNETES_SERVICE_LOAD_BALANCER_IP}
138136
provider: MetalLB
139137
controlPlane:
140138
nutanix:

examples/capi-quick-start/nutanix-cluster-with-failuredomains-cilium-helm-addon.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,8 @@ spec:
130130
serviceLoadBalancer:
131131
configuration:
132132
addressRanges:
133-
- end: 198.18.1.10
134-
start: 198.18.1.1
135-
- end: 198.18.1.30
136-
start: 198.18.1.21
133+
- end: ${KUBERNETES_SERVICE_LOAD_BALANCER_IP}
134+
start: ${KUBERNETES_SERVICE_LOAD_BALANCER_IP}
137135
provider: MetalLB
138136
controlPlane:
139137
nutanix:

hack/examples/bases/docker/cluster/kustomization.yaml.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ patches:
5252
# Deploy ServiceLoadBalancer MetalLB
5353
- target:
5454
kind: Cluster
55-
path: ../../../patches/metallb.yaml
55+
path: ../../../patches/docker/metallb.yaml

hack/examples/bases/nutanix/cluster/kustomization.yaml.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,4 @@ patches:
8787
# Deploy ServiceLoadBalancer MetalLB
8888
- target:
8989
kind: Cluster
90-
path: ../../../patches/metallb.yaml
90+
path: ../../../patches/nutanix/metallb.yaml
File renamed without changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright 2024 Nutanix. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
- op: "add"
5+
path: "/spec/topology/variables/0/value/addons/serviceLoadBalancer"
6+
value:
7+
provider: MetalLB
8+
configuration:
9+
addressRanges:
10+
- start: ${KUBERNETES_SERVICE_LOAD_BALANCER_IP}
11+
end: ${KUBERNETES_SERVICE_LOAD_BALANCER_IP}

0 commit comments

Comments
 (0)