Skip to content

Commit c65e112

Browse files
authored
fix: metrics rbac (#26)
1 parent d91ad01 commit c65e112

File tree

4 files changed

+27
-3
lines changed

4 files changed

+27
-3
lines changed

chart/k8soauth2-proxy-controller/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ keywords:
1313
name: k8soauth2-proxy-controller
1414
sources:
1515
- https://github.com/DoodleScheduling/k8soauth2-proxy-controller
16-
version: 0.2.4
16+
version: 0.2.5

chart/k8soauth2-proxy-controller/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ spec:
8888
- --upstream=http://127.0.0.1:{{ .Values.metricsPort }}
8989
- --logtostderr=true
9090
- --v=0
91-
image: quay.io/brancz/kube-rbac-proxy:v0.14.0
91+
image: {{ .Values.kubeRBACProxy.image }}
9292
imagePullPolicy: IfNotPresent
9393
name: kube-rbac-proxy
9494
ports:

chart/k8soauth2-proxy-controller/templates/metrics-rbac.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,24 @@ rules:
1616
---
1717
apiVersion: rbac.authorization.k8s.io/v1
1818
kind: ClusterRoleBinding
19+
metadata:
20+
name: {{ include "k8soauth2-proxy-controller.fullname" . }}-metrics
21+
labels:
22+
app.kubernetes.io/name: {{ include "k8soauth2-proxy-controller.name" . }}
23+
app.kubernetes.io/instance: {{ .Release.Name }}
24+
app.kubernetes.io/managed-by: {{ .Release.Service }}
25+
helm.sh/chart: {{ include "k8soauth2-proxy-controller.chart" . }}
26+
roleRef:
27+
apiGroup: rbac.authorization.k8s.io
28+
kind: ClusterRole
29+
name: {{ include "k8soauth2-proxy-controller.fullname" . }}-metrics-reader
30+
subjects:
31+
- kind: ServiceAccount
32+
name: {{ template "k8soauth2-proxy-controller.serviceAccountName" . }}
33+
namespace: {{ .Release.Namespace }}
34+
---
35+
apiVersion: rbac.authorization.k8s.io/v1
36+
kind: ClusterRoleBinding
1937
metadata:
2038
name: {{ include "k8soauth2-proxy-controller.fullname" . }}-proxy
2139
labels:

chart/k8soauth2-proxy-controller/values.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,19 @@ prometheusRule:
132132

133133
kubeRBACProxy:
134134
enabled: true
135-
135+
image: quay.io/brancz/kube-rbac-proxy:v0.14.2
136136
securityContext:
137137
allowPrivilegeEscalation: false
138138
capabilities:
139139
drop: ["all"]
140140
readOnlyRootFilesystem: true
141141

142142
resources: {}
143+
# limits:
144+
# cpu: 500m
145+
# memory: 128Mi
146+
# requests:
147+
# cpu: 5m
148+
# memory: 64Mi
143149

144150
tolerations: []

0 commit comments

Comments
 (0)