Skip to content

Commit 4ea354c

Browse files
Merge pull request #33 from Kuadrant/remove-kube-rbac-proxy
remove kube-rbac-proxy sidecar
2 parents 27791c5 + 6f0e2c5 commit 4ea354c

10 files changed

+46
-42
lines changed

bundle/manifests/kuadrant-operator-controller-manager-metrics-service_v1_service.yaml

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ metadata:
77
name: kuadrant-operator-controller-manager-metrics-service
88
spec:
99
ports:
10-
- name: https
11-
port: 8443
12-
protocol: TCP
13-
targetPort: https
10+
- name: metrics
11+
port: 8080
12+
targetPort: metrics
1413
selector:
1514
control-plane: controller-manager
1615
status:

bundle/manifests/kuadrant-operator-manager-config_v1_configmap.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ data:
66
health:
77
healthProbeBindAddress: :8081
88
metrics:
9-
bindAddress: 127.0.0.1:8080
9+
bindAddress: :8080
1010
webhook:
1111
port: 9443
1212
leaderElection:

bundle/manifests/kuadrant-operator.clusterserviceversion.yaml

+3-26
Original file line numberDiff line numberDiff line change
@@ -313,18 +313,6 @@ spec:
313313
- patch
314314
- update
315315
- watch
316-
- apiGroups:
317-
- authentication.k8s.io
318-
resources:
319-
- tokenreviews
320-
verbs:
321-
- create
322-
- apiGroups:
323-
- authorization.k8s.io
324-
resources:
325-
- subjectaccessreviews
326-
verbs:
327-
- create
328316
serviceAccountName: kuadrant-operator-controller-manager
329317
deployments:
330318
- label:
@@ -343,20 +331,6 @@ spec:
343331
spec:
344332
containers:
345333
- args:
346-
- --secure-listen-address=0.0.0.0:8443
347-
- --upstream=http://127.0.0.1:8080/
348-
- --logtostderr=true
349-
- --v=10
350-
image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
351-
name: kube-rbac-proxy
352-
ports:
353-
- containerPort: 8443
354-
name: https
355-
protocol: TCP
356-
resources: {}
357-
- args:
358-
- --health-probe-bind-address=:8081
359-
- --metrics-bind-address=127.0.0.1:8080
360334
- --leader-elect
361335
command:
362336
- /manager
@@ -368,6 +342,9 @@ spec:
368342
initialDelaySeconds: 15
369343
periodSeconds: 20
370344
name: manager
345+
ports:
346+
- containerPort: 8080
347+
name: metrics
371348
readinessProbe:
372349
httpGet:
373350
path: /readyz

config/default/kustomization.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@ patchesStrategicMerge:
2828
# Protect the /metrics endpoint by putting it behind auth.
2929
# If you want your controller-manager to expose the /metrics
3030
# endpoint w/o any authn/z, please comment the following line.
31-
- manager_auth_proxy_patch.yaml
31+
#- manager_auth_proxy_patch.yaml
32+
- manager_metrics_patch.yaml
3233

3334
# Mount the controller config file for loading manager configurations
3435
# through a ComponentConfig type
3536
#- manager_config_patch.yaml
3637

38+
3739
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
3840
# crd/kustomization.yaml
3941
#- manager_webhook_patch.yaml
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: controller-manager
5+
namespace: system
6+
spec:
7+
template:
8+
spec:
9+
containers:
10+
- name: manager
11+
ports:
12+
- containerPort: 8080
13+
name: metrics

config/manager/controller_manager_config.yaml

+1-1
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: :8080
77
webhook:
88
port: 9443
99
leaderElection:

config/manager/kustomization.yaml

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

45
generatorOptions:
56
disableNameSuffixHash: true

config/manager/metrics_service.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
apiVersion: v1
3+
kind: Service
4+
metadata:
5+
labels:
6+
control-plane: controller-manager
7+
name: controller-manager-metrics-service
8+
namespace: system
9+
spec:
10+
ports:
11+
- name: metrics
12+
port: 8080
13+
targetPort: metrics
14+
selector:
15+
control-plane: controller-manager

config/prometheus/monitor.yaml

+2-5
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@ metadata:
1010
spec:
1111
endpoints:
1212
- path: /metrics
13-
port: https
14-
scheme: https
15-
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
16-
tlsConfig:
17-
insecureSkipVerify: true
13+
port: metrics
14+
scheme: http
1815
selector:
1916
matchLabels:
2017
control-plane: controller-manager

config/rbac/kustomization.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ resources:
1212
# Comment the following 4 lines if you want to disable
1313
# the auth proxy (https://github.com/brancz/kube-rbac-proxy)
1414
# which protects your /metrics endpoint.
15-
- auth_proxy_service.yaml
16-
- auth_proxy_role.yaml
17-
- auth_proxy_role_binding.yaml
18-
- auth_proxy_client_clusterrole.yaml
15+
# - auth_proxy_service.yaml
16+
# - auth_proxy_role.yaml
17+
# - auth_proxy_role_binding.yaml
18+
# - auth_proxy_client_clusterrole.yaml

0 commit comments

Comments
 (0)