File tree Expand file tree Collapse file tree 7 files changed +67
-10
lines changed Expand file tree Collapse file tree 7 files changed +67
-10
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,14 @@ kind: ClusterRole
200
200
metadata :
201
201
name : machine-api-operator
202
202
rules :
203
-
203
+ - apiGroups : ["authentication.k8s.io"]
204
+ resources :
205
+ - tokenreviews
206
+ verbs : ["create"]
207
+ - apiGroups : ["authorization.k8s.io"]
208
+ resources :
209
+ - subjectaccessreviews
210
+ verbs : ["create"]
204
211
- apiGroups :
205
212
- config.openshift.io
206
213
resources :
@@ -319,6 +326,12 @@ metadata:
319
326
name : prometheus-k8s-machine-api-operator
320
327
namespace : openshift-machine-api
321
328
rules :
329
+ - apiGroups :
330
+ - " "
331
+ resources :
332
+ - namespace/metrics
333
+ verbs :
334
+ - get
322
335
- apiGroups :
323
336
- " "
324
337
resources :
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : ConfigMap
3
+ metadata :
4
+ name : kube-rbac-proxy
5
+ namespace : openshift-machine-api
6
+ data :
7
+ config-file.yaml : |+
8
+ authorization:
9
+ resourceAttributes:
10
+ apiVersion: v1
11
+ resource: namespace
12
+ subresource: metrics
13
+ namespace: openshift-machine-api
14
+
Original file line number Diff line number Diff line change @@ -4,15 +4,16 @@ kind: Service
4
4
metadata :
5
5
name : machine-api-operator
6
6
namespace : openshift-machine-api
7
+ annotations :
8
+ service.alpha.openshift.io/serving-cert-secret-name : machine-api-operator-tls
7
9
labels :
8
10
k8s-app : machine-api-operator
9
11
spec :
10
12
type : ClusterIP
11
13
ports :
12
- - name : metrics
13
- port : 8080
14
- targetPort : metrics
15
- protocol : TCP
14
+ - name : https
15
+ port : 8443
16
+ targetPort : https
16
17
selector :
17
18
k8s-app : machine-api-operator
18
19
sessionAffinity : None
Original file line number Diff line number Diff line change 18
18
priorityClassName : system-node-critical
19
19
serviceAccountName : machine-api-operator
20
20
containers :
21
+ - name : kube-rbac-proxy
22
+ image : quay.io/openshift/origin-kube-rbac-proxy:4.2.0
23
+ args :
24
+ - " --secure-listen-address=0.0.0.0:8443"
25
+ - " --upstream=http://127.0.0.1:8080/"
26
+ - " --tls-cert-file=/etc/tls/private/tls.crt"
27
+ - " --tls-private-key-file=/etc/tls/private/tls.key"
28
+ - " --config-file=/etc/kube-rbac-proxy/config-file.yaml"
29
+ - " --logtostderr=true"
30
+ - " --v=10"
31
+ ports :
32
+ - containerPort : 8443
33
+ name : https
34
+ volumeMounts :
35
+ - name : config
36
+ mountPath : /etc/kube-rbac-proxy
37
+ - mountPath : /etc/tls/private
38
+ name : machine-api-operator-tls
21
39
- name : machine-api-operator
22
40
image : docker.io/openshift/origin-machine-api-operator:v4.0.0
23
41
command :
36
54
fieldPath : metadata.namespace
37
55
- name : METRICS_PORT
38
56
value : " 8080"
39
- ports :
40
- - name : metrics
41
- containerPort : 8080
42
57
resources :
43
58
requests :
44
59
cpu : 10m
65
80
effect : " NoExecute"
66
81
tolerationSeconds : 120
67
82
volumes :
83
+ - name : config
84
+ configMap :
85
+ name : kube-rbac-proxy
68
86
- name : images
69
87
configMap :
70
88
name : machine-api-operator-images
89
+ - name : machine-api-operator-tls
90
+ secret :
91
+ secretName : machine-api-operator-tls
Original file line number Diff line number Diff line change 9
9
endpoints :
10
10
- bearerTokenFile : /var/run/secrets/kubernetes.io/serviceaccount/token
11
11
interval : 30s
12
- port : metrics
13
- scheme : http
12
+ port : https
13
+ scheme : https
14
+ tlsConfig :
15
+ caFile : /etc/prometheus/configmaps/serving-certs-ca-bundle/service-ca.crt
16
+ serverName : machine-api-operator.openshift-machine-api.svc
14
17
namespaceSelector :
15
18
matchNames :
16
19
- openshift-machine-api
Original file line number Diff line number Diff line change 54
54
from:
55
55
kind: DockerImage
56
56
name: quay.io/openshift/origin-ironic-static-ip-manager:v4.2.0
57
+ - name: kube-rbac-proxy
58
+ from:
59
+ kind: DockerImage
60
+ name: quay.io/openshift/origin-kube-rbac-proxy:4.2.0
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ resources:
26
26
- install/0000_30_machine-api-operator_07_machinehealthcheck.crd.yaml
27
27
- install/0000_30_machine-api-operator_08_machinedisruptionbudget.crd.yaml
28
28
- install/0000_30_machine-api-operator_09_rbac.yaml
29
+ - install/0000_30_machine-api-operator_10_kube-rbac-proxy-config.yaml
29
30
- install/0000_30_machine-api-operator_10_service.yaml
30
31
- install/0000_30_machine-api-operator_11_deployment.yaml
31
32
- install/0000_30_machine-api-operator_12_clusteroperator.yaml
You can’t perform that action at this time.
0 commit comments