Skip to content

Commit 7768a6d

Browse files
committed
fix metric collection in e2e test
During the removal of kube-rbac-proxy the e2e test metric collection broke. The easiest way to fix it is to set the default value of the metrics-bind-addr in our manager.yaml files and then replace it via our e2e test framework. Signed-off-by: Stefan Büringer [email protected]
1 parent 18dbaec commit 7768a6d

File tree

5 files changed

+16
-0
lines changed

5 files changed

+16
-0
lines changed

bootstrap/kubeadm/config/manager/manager.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ spec:
2020
- /manager
2121
args:
2222
- "--leader-elect"
23+
- "--metrics-bind-addr=localhost:8080"
2324
- "--feature-gates=MachinePool=${EXP_MACHINE_POOL:=false}"
2425
image: controller:latest
2526
name: manager

config/manager/manager.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ spec:
2121
- /manager
2222
args:
2323
- "--leader-elect"
24+
- "--metrics-bind-addr=localhost:8080"
2425
- "--feature-gates=MachinePool=${EXP_MACHINE_POOL:=false},ClusterResourceSet=${EXP_CLUSTER_RESOURCE_SET:=false}"
2526
image: controller:latest
2627
name: manager

controlplane/kubeadm/config/manager/manager.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ spec:
2020
- /manager
2121
args:
2222
- "--leader-elect"
23+
- "--metrics-bind-addr=localhost:8080"
2324
image: controller:latest
2425
name: manager
2526
ports:

test/e2e/config/docker.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ providers:
3737
new: --metrics-addr=:8080
3838
- name: v0.4.99 # next; use manifest from source files
3939
value: ../../../config/default
40+
replacements:
41+
- old: --metrics-bind-addr=localhost:8080
42+
new: --metrics-bind-addr=:8080
4043
files:
4144
- sourcePath: "../data/shared/v1alpha4/metadata.yaml"
4245

@@ -51,6 +54,9 @@ providers:
5154
new: --metrics-addr=:8080
5255
- name: v0.4.99 # next; use manifest from source files
5356
value: ../../../bootstrap/kubeadm/config/default
57+
replacements:
58+
- old: --metrics-bind-addr=localhost:8080
59+
new: --metrics-bind-addr=:8080
5460
files:
5561
- sourcePath: "../data/shared/v1alpha4/metadata.yaml"
5662

@@ -65,6 +71,9 @@ providers:
6571
new: --metrics-addr=:8080
6672
- name: v0.4.99 # next; use manifest from source files
6773
value: ../../../controlplane/kubeadm/config/default
74+
replacements:
75+
- old: --metrics-bind-addr=localhost:8080
76+
new: --metrics-bind-addr=:8080
6877
files:
6978
- sourcePath: "../data/shared/v1alpha4/metadata.yaml"
7079

@@ -82,6 +91,9 @@ providers:
8291
- sourcePath: "../data/infrastructure-docker/v1alpha3/cluster-template.yaml"
8392
- name: v0.4.99 # next; use manifest from source files
8493
value: ../../../test/infrastructure/docker/config/default
94+
replacements:
95+
- old: --metrics-bind-addr=localhost:8080
96+
new: --metrics-bind-addr=:8080
8597
files:
8698
# Add cluster templates
8799
- sourcePath: "../data/infrastructure-docker/v1alpha4/cluster-template.yaml"

test/infrastructure/docker/config/manager/manager.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ spec:
1818
containers:
1919
- args:
2020
- "--leader-elect"
21+
- "--metrics-bind-addr=localhost:8080"
2122
- "--feature-gates=MachinePool=${EXP_MACHINE_POOL:=false}"
2223
image: controller:latest
2324
name: manager

0 commit comments

Comments
 (0)