Skip to content

Commit 93e8e18

Browse files
copejonclaude
andcommitted
USHIFT-6951: Add kube-state-metrics as optional MicroShift component
Add kube-state-metrics kustomize manifests, healthcheck registration, RPM packaging, and OpenTelemetry collector drop-in configuration. Includes own 00-namespace.yaml for independent deployability and mergeWorkloads() for shared-namespace healthcheck support. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 93e835e commit 93e8e18

16 files changed

Lines changed: 1051 additions & 1 deletion
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: openshift-monitoring
5+
labels:
6+
name: openshift-monitoring
7+
pod-security.kubernetes.io/enforce: privileged
8+
pod-security.kubernetes.io/audit: privileged
9+
pod-security.kubernetes.io/warn: privileged
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRoleBinding
3+
metadata:
4+
labels:
5+
app.kubernetes.io/component: exporter
6+
app.kubernetes.io/managed-by: cluster-monitoring-operator
7+
app.kubernetes.io/name: kube-state-metrics
8+
app.kubernetes.io/part-of: openshift-monitoring
9+
app.kubernetes.io/version: 2.19.0
10+
name: kube-state-metrics
11+
roleRef:
12+
apiGroup: rbac.authorization.k8s.io
13+
kind: ClusterRole
14+
name: kube-state-metrics
15+
subjects:
16+
- kind: ServiceAccount
17+
name: kube-state-metrics
18+
namespace: openshift-monitoring
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRole
3+
metadata:
4+
labels:
5+
app.kubernetes.io/component: exporter
6+
app.kubernetes.io/managed-by: cluster-monitoring-operator
7+
app.kubernetes.io/name: kube-state-metrics
8+
app.kubernetes.io/part-of: openshift-monitoring
9+
app.kubernetes.io/version: 2.19.0
10+
name: kube-state-metrics
11+
rules:
12+
- apiGroups:
13+
- ""
14+
resources:
15+
- configmaps
16+
- secrets
17+
- nodes
18+
- pods
19+
- services
20+
- serviceaccounts
21+
- resourcequotas
22+
- replicationcontrollers
23+
- limitranges
24+
- persistentvolumeclaims
25+
- persistentvolumes
26+
- namespaces
27+
- endpoints
28+
verbs:
29+
- list
30+
- watch
31+
- apiGroups:
32+
- apps
33+
resources:
34+
- statefulsets
35+
- daemonsets
36+
- deployments
37+
- replicasets
38+
verbs:
39+
- list
40+
- watch
41+
- apiGroups:
42+
- batch
43+
resources:
44+
- cronjobs
45+
- jobs
46+
verbs:
47+
- list
48+
- watch
49+
- apiGroups:
50+
- autoscaling
51+
resources:
52+
- horizontalpodautoscalers
53+
verbs:
54+
- list
55+
- watch
56+
- apiGroups:
57+
- authentication.k8s.io
58+
resources:
59+
- tokenreviews
60+
verbs:
61+
- create
62+
- apiGroups:
63+
- authorization.k8s.io
64+
resources:
65+
- subjectaccessreviews
66+
verbs:
67+
- create
68+
- apiGroups:
69+
- policy
70+
resources:
71+
- poddisruptionbudgets
72+
verbs:
73+
- list
74+
- watch
75+
- apiGroups:
76+
- certificates.k8s.io
77+
resources:
78+
- certificatesigningrequests
79+
verbs:
80+
- list
81+
- watch
82+
- apiGroups:
83+
- discovery.k8s.io
84+
resources:
85+
- endpointslices
86+
verbs:
87+
- list
88+
- watch
89+
- apiGroups:
90+
- storage.k8s.io
91+
resources:
92+
- storageclasses
93+
- volumeattachments
94+
verbs:
95+
- list
96+
- watch
97+
- apiGroups:
98+
- admissionregistration.k8s.io
99+
resources:
100+
- mutatingwebhookconfigurations
101+
- validatingwebhookconfigurations
102+
verbs:
103+
- list
104+
- watch
105+
- apiGroups:
106+
- networking.k8s.io
107+
resources:
108+
- networkpolicies
109+
- ingressclasses
110+
- ingresses
111+
verbs:
112+
- list
113+
- watch
114+
- apiGroups:
115+
- coordination.k8s.io
116+
resources:
117+
- leases
118+
verbs:
119+
- list
120+
- watch
121+
- apiGroups:
122+
- rbac.authorization.k8s.io
123+
resources:
124+
- clusterrolebindings
125+
- clusterroles
126+
- rolebindings
127+
- roles
128+
verbs:
129+
- list
130+
- watch
131+
- apiGroups:
132+
- apiextensions.k8s.io
133+
resources:
134+
- customresourcedefinitions
135+
verbs:
136+
- get
137+
- list
138+
- watch
139+
- apiGroups:
140+
- autoscaling.k8s.io
141+
resources:
142+
- verticalpodautoscalers
143+
verbs:
144+
- list
145+
- watch
146+
- apiGroups:
147+
- gateway.networking.k8s.io
148+
resources:
149+
- gatewayclasses
150+
- gateways
151+
verbs:
152+
- list
153+
- watch
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: v1
2+
automountServiceAccountToken: false
3+
kind: ServiceAccount
4+
metadata:
5+
labels:
6+
app.kubernetes.io/component: exporter
7+
app.kubernetes.io/managed-by: cluster-monitoring-operator
8+
app.kubernetes.io/name: kube-state-metrics
9+
app.kubernetes.io/part-of: openshift-monitoring
10+
app.kubernetes.io/version: 2.19.0
11+
name: kube-state-metrics
12+
namespace: openshift-monitoring

0 commit comments

Comments
 (0)