Skip to content

Commit

Permalink
Remove kube-rbac-proxy and open metrics endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianZaccaria committed Jul 26, 2023
1 parent c885e0a commit daf28cb
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 94 deletions.
8 changes: 3 additions & 5 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ bases:
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
# - ../prometheus

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

# Mount the controller config file for loading manager configurations
# through a ComponentConfig type
Expand Down
39 changes: 0 additions & 39 deletions config/default/manager_auth_proxy_patch.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ metadata:
namespace: system
spec:
ports:
- name: https
port: 8443
- name: metrics
port: 8080
protocol: TCP
targetPort: 8080
targetPort: metrics
selector:
app.kubernetes.io/name: codeflare-operator
app.kubernetes.io/part-of: codeflare
2 changes: 1 addition & 1 deletion config/manager/controller_manager_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: ControllerManagerConfig
health:
healthProbeBindAddress: :8081
metrics:
bindAddress: 127.0.0.1:8080
bindAddress: 0.0.0.0:8080
webhook:
port: 9443
leaderElection:
Expand Down
8 changes: 7 additions & 1 deletion config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ spec:
- command:
- /manager
args:
- --leader-elect
- "--health-probe-bind-address=:8081"
- "--metrics-bind-address=0.0.0.0:8080"
- "--leader-elect"
image: controller:latest
imagePullPolicy: Always
name: manager
Expand All @@ -44,6 +46,10 @@ spec:
capabilities:
drop:
- "ALL"
ports:
- containerPort: 8080
protocol: TCP
name: metrics
livenessProbe:
httpGet:
path: /healthz
Expand Down
9 changes: 0 additions & 9 deletions config/rbac/auth_proxy_client_clusterrole.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions config/rbac/auth_proxy_role.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions config/rbac/auth_proxy_role_binding.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions config/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,3 @@ resources:
- edit_role_binding.yaml # We are using this binding as mcad requires this role
- leader_election_role.yaml
- leader_election_role_binding.yaml
# Comment the following 4 lines if you want to disable
# the auth proxy (https://github.com/brancz/kube-rbac-proxy)
# which protects your /metrics endpoint.
- auth_proxy_service.yaml
- auth_proxy_role.yaml
- auth_proxy_role_binding.yaml
- auth_proxy_client_clusterrole.yaml

0 comments on commit daf28cb

Please sign in to comment.