Skip to content

Commit 357d2ec

Browse files
committed
Fix manifest kustomization for metrics service
Also removed unused ClusterRole and ClusterRoleBinding that is supposed to grant access through kube-rbac-proxy, which is currently not in use in HNC. Tested: Verified that metrics service works as annotated by prometheus service annotations
1 parent 34837c2 commit 357d2ec

6 files changed

+6
-39
lines changed

config/manager/kustomization.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
resources:
22
- manager.yaml
3+
- metrics_service.yaml

config/manager/manager.yaml

-3
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ spec:
4040
- /manager
4141
args:
4242
- "--webhook-server-port=9443"
43-
# If /config/default/manager_auth_proxy_patch.yaml is used, the port in
44-
# --metrics-addr must match the value of --upstream passed to
45-
# kube-rbac-proxy.
4643
- "--metrics-addr=:8080"
4744
- "--max-reconciles=10"
4845
- "--apiserver-qps-throttle=50"

config/rbac/auth_proxy_service.yaml renamed to config/manager/metrics_service.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ apiVersion: v1
22
kind: Service
33
metadata:
44
annotations:
5-
prometheus.io/port: "8443"
6-
prometheus.io/scheme: https
5+
prometheus.io/port: "8080"
6+
prometheus.io/scheme: http
77
prometheus.io/scrape: "true"
88
labels:
99
control-plane: controller-manager
1010
name: controller-manager-metrics-service
1111
namespace: system
1212
spec:
1313
ports:
14-
- name: https
15-
port: 8443
16-
targetPort: https
14+
- name: metrics
15+
port: 8080
16+
targetPort: metrics
1717
selector:
1818
control-plane: controller-manager

config/rbac/auth_proxy_role.yaml

-13
This file was deleted.

config/rbac/auth_proxy_role_binding.yaml

-12
This file was deleted.

config/rbac/kustomization.yaml

-6
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,3 @@ resources:
44
- hnc_admin.yaml
55
- leader_election_role.yaml
66
- leader_election_role_binding.yaml
7-
# Comment the following 3 lines if you want to disable
8-
# the auth proxy (https://github.com/brancz/kube-rbac-proxy)
9-
# which protects your /metrics endpoint.
10-
- auth_proxy_service.yaml
11-
- auth_proxy_role.yaml
12-
- auth_proxy_role_binding.yaml

0 commit comments

Comments
 (0)