Skip to content

Commit 458cc3d

Browse files
Remove kube-rbac-proxy and open metrics endpoint
1 parent 70f0719 commit 458cc3d

9 files changed

+14
-93
lines changed

config/default/kustomization.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@ bases:
2525
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
2626
# - ../prometheus
2727

28-
patchesStrategicMerge:
29-
# Protect the /metrics endpoint by putting it behind auth.
30-
# If you want your controller-manager to expose the /metrics
31-
# endpoint w/o any authn/z, please comment the following line.
32-
- manager_auth_proxy_patch.yaml
28+
resources:
29+
# Add metrics service
30+
- metrics_service.yaml
3331

3432
# Mount the controller config file for loading manager configurations
3533
# through a ComponentConfig type

config/default/manager_auth_proxy_patch.yaml

Lines changed: 0 additions & 39 deletions
This file was deleted.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ metadata:
55
namespace: system
66
spec:
77
ports:
8-
- name: https
8+
- name: metrics
99
port: 8443
1010
protocol: TCP
11-
targetPort: https
11+
targetPort: metrics
1212
selector:
1313
app.kubernetes.io/name: codeflare-operator
1414
app.kubernetes.io/part-of: codeflare

config/manager/controller_manager_config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: ControllerManagerConfig
33
health:
44
healthProbeBindAddress: :8081
55
metrics:
6-
bindAddress: 127.0.0.1:8080
6+
bindAddress: 0.0.0.0:8080
77
webhook:
88
port: 9443
99
leaderElection:

config/manager/manager.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ spec:
3535
- command:
3636
- /manager
3737
args:
38-
- --leader-elect
38+
- "--health-probe-bind-address=:8081"
39+
- "--metrics-bind-address=0.0.0.0:8080"
40+
- "--leader-elect"
3941
image: controller:latest
4042
imagePullPolicy: Always
4143
name: manager
@@ -44,6 +46,10 @@ spec:
4446
capabilities:
4547
drop:
4648
- "ALL"
49+
ports:
50+
- containerPort: 8080
51+
protocol: TCP
52+
name: metrics
4753
livenessProbe:
4854
httpGet:
4955
path: /healthz

config/rbac/auth_proxy_client_clusterrole.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

config/rbac/auth_proxy_role.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

config/rbac/auth_proxy_role_binding.yaml

Lines changed: 0 additions & 12 deletions
This file was deleted.

config/rbac/kustomization.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,4 @@ resources:
1010
- edit_role_binding.yaml # We are using this binding as mcad requires this role
1111
- leader_election_role.yaml
1212
- leader_election_role_binding.yaml
13-
# Comment the following 4 lines if you want to disable
14-
# the auth proxy (https://github.com/brancz/kube-rbac-proxy)
15-
# which protects your /metrics endpoint.
16-
- auth_proxy_service.yaml
17-
- auth_proxy_role.yaml
18-
- auth_proxy_role_binding.yaml
19-
- auth_proxy_client_clusterrole.yaml
13+

0 commit comments

Comments
 (0)