Skip to content

Commit 24c2733

Browse files
committed
fixup! fixup! fix: allow opting-into upstream probes
1 parent 590171f commit 24c2733

8 files changed

+96
-22
lines changed

jsonnet/kube-prometheus/components/kube-state-metrics.libsonnet

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,16 +167,32 @@ function(params) (import 'github.com/kubernetes/kube-state-metrics/jsonnet/kube-
167167
spec+: {
168168
automountServiceAccountToken: true,
169169
containers: std.map(function(c) c {
170-
ports:: null,
171170
securityContext+: {
172171
runAsGroup: 65534,
173172
},
174173
args: ['--host=127.0.0.1', '--port=8081', '--telemetry-host=127.0.0.1', '--telemetry-port=8082'],
175174
resources: ksm._config.resources,
176175
} + if !ksm._config.enableProbes then {
176+
ports:: null,
177177
livenessProbe:: null,
178178
readinessProbe:: null,
179-
} else {}, super.containers) + [kubeRbacProxyMain, kubeRbacProxySelf],
179+
} else {
180+
ports: defaults.kubeRbacProxyMain.ports + defaults.kubeRbacProxySelf.ports,
181+
livenessProbe: {
182+
httpGet: {
183+
path: '/livez',
184+
port: defaults.kubeRbacProxyMain.ports[0].name,
185+
scheme: 'HTTPS',
186+
},
187+
},
188+
readinessProbe: {
189+
httpGet: {
190+
path: '/readyz',
191+
port: defaults.kubeRbacProxySelf.ports[0].name,
192+
scheme: 'HTTPS',
193+
},
194+
},
195+
}, super.containers) + [kubeRbacProxyMain, kubeRbacProxySelf],
180196
},
181197
},
182198
},

jsonnetfile.lock.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"subdir": "contrib/mixin"
1919
}
2020
},
21-
"version": "6c1fe4a92a00854fc54828e257708f9e7f5b4f28",
21+
"version": "2ed418c191bccc23d542b4081f96b694025fe031",
2222
"sum": "IXI3LQIT9NmTPJAk8WLUJd5+qZfcGpeNCyWIK7oEpws="
2323
},
2424
{
@@ -88,7 +88,7 @@
8888
"subdir": "grafana-builder"
8989
}
9090
},
91-
"version": "c0b39ad68a99c7791a19b14da92c7f886d8c55da",
91+
"version": "a41bfeae97007b9ed047823e44974ce1a0817ca9",
9292
"sum": "yxqWcq/N3E/a/XreeU6EuE6X7kYPnG0AspAQFKOjASo="
9393
},
9494
{
@@ -98,7 +98,7 @@
9898
"subdir": "mixin-utils"
9999
}
100100
},
101-
"version": "c0b39ad68a99c7791a19b14da92c7f886d8c55da",
101+
"version": "a41bfeae97007b9ed047823e44974ce1a0817ca9",
102102
"sum": "LoYq5QxJmUXEtqkEG8CFUBLBhhzDDaNANHc7Gz36ZdM="
103103
},
104104
{
@@ -158,7 +158,7 @@
158158
"subdir": "jsonnet/mixin"
159159
}
160160
},
161-
"version": "1f36a6778f8e4b08799c43f3e2f9ba624feac416",
161+
"version": "7fc97ea10dc1958e93bac0e066f5ec111c5ff193",
162162
"sum": "gi+knjdxs2T715iIQIntrimbHRgHnpM8IFBJDD1gYfs=",
163163
"name": "prometheus-operator-mixin"
164164
},
@@ -169,8 +169,8 @@
169169
"subdir": "jsonnet/prometheus-operator"
170170
}
171171
},
172-
"version": "1f36a6778f8e4b08799c43f3e2f9ba624feac416",
173-
"sum": "IYa+0bUT25fTKjjDyZw9gV8DAi1BgfmLE1ucouoxKCs="
172+
"version": "7fc97ea10dc1958e93bac0e066f5ec111c5ff193",
173+
"sum": "f2tfHUdjLBQOev2ernkHs0CLSUFap4zjH31swdTx+Bk="
174174
},
175175
{
176176
"source": {
@@ -200,7 +200,7 @@
200200
"subdir": "documentation/prometheus-mixin"
201201
}
202202
},
203-
"version": "e8fa1312a7a8934fd2928fab1bb8d7e5f2ea0a1a",
203+
"version": "c328d5fc8820ec7fe45296cfd4de8036b58f4a3a",
204204
"sum": "dYLcLzGH4yF3qB7OGC/7z4nqeTNjv42L7Q3BENU8XJI=",
205205
"name": "prometheus"
206206
},

manifests/prometheusOperator-clusterRole.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ rules:
5656
resources:
5757
- services
5858
- services/finalizers
59-
- endpoints
6059
verbs:
6160
- get
6261
- create
@@ -98,6 +97,15 @@ rules:
9897
- storageclasses
9998
verbs:
10099
- get
100+
- apiGroups:
101+
- ""
102+
resources:
103+
- endpoints
104+
verbs:
105+
- get
106+
- create
107+
- update
108+
- delete
101109
- apiGroups:
102110
- authentication.k8s.io
103111
resources:

manifests/prometheusOperator-deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ spec:
3030
- args:
3131
- --kubelet-service=kube-system/kubelet
3232
- --prometheus-config-reloader=quay.io/prometheus-operator/prometheus-config-reloader:v0.76.2
33+
- --kubelet-endpoints=true
34+
- --kubelet-endpointslice=false
3335
env:
3436
- name: GOGC
3537
value: "30"

manifests/setup/0alertmanagerCustomResourceDefinition.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7910,6 +7910,11 @@ spec:
79107910
type: object
79117911
x-kubernetes-map-type: atomic
79127912
type: object
7913+
certFile:
7914+
description: |-
7915+
Path to the TLS certificate file in the Prometheus container for the server.
7916+
Mutually exclusive with `cert`.
7917+
type: string
79137918
cipherSuites:
79147919
description: |-
79157920
List of supported cipher suites for TLS versions up to TLS 1.2. If empty,
@@ -7972,6 +7977,11 @@ spec:
79727977
For more detail on clientAuth options:
79737978
https://golang.org/pkg/crypto/tls/#ClientAuthType
79747979
type: string
7980+
clientCAFile:
7981+
description: |-
7982+
Path to the CA certificate file for client certificate authentication to the server.
7983+
Mutually exclusive with `client_ca`.
7984+
type: string
79757985
curvePreferences:
79767986
description: |-
79777987
Elliptic curves that will be used in an ECDHE handshake, in preference
@@ -7980,6 +7990,11 @@ spec:
79807990
items:
79817991
type: string
79827992
type: array
7993+
keyFile:
7994+
description: |-
7995+
Path to the TLS key file in the Prometheus container for the server.
7996+
Mutually exclusive with `keySecret`.
7997+
type: string
79837998
keySecret:
79847999
description: Secret containing the TLS key for the server.
79858000
properties:
@@ -8015,9 +8030,6 @@ spec:
80158030
cipher suite. If true then the server's preference, as expressed in
80168031
the order of elements in cipherSuites, is used.
80178032
type: boolean
8018-
required:
8019-
- cert
8020-
- keySecret
80218033
type: object
80228034
type: object
80238035
type: object

manifests/setup/0prometheusCustomResourceDefinition.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11757,6 +11757,11 @@ spec:
1175711757
type: object
1175811758
x-kubernetes-map-type: atomic
1175911759
type: object
11760+
certFile:
11761+
description: |-
11762+
Path to the TLS certificate file in the Prometheus container for the server.
11763+
Mutually exclusive with `cert`.
11764+
type: string
1176011765
cipherSuites:
1176111766
description: |-
1176211767
List of supported cipher suites for TLS versions up to TLS 1.2. If empty,
@@ -11819,6 +11824,11 @@ spec:
1181911824
For more detail on clientAuth options:
1182011825
https://golang.org/pkg/crypto/tls/#ClientAuthType
1182111826
type: string
11827+
clientCAFile:
11828+
description: |-
11829+
Path to the CA certificate file for client certificate authentication to the server.
11830+
Mutually exclusive with `client_ca`.
11831+
type: string
1182211832
curvePreferences:
1182311833
description: |-
1182411834
Elliptic curves that will be used in an ECDHE handshake, in preference
@@ -11827,6 +11837,11 @@ spec:
1182711837
items:
1182811838
type: string
1182911839
type: array
11840+
keyFile:
11841+
description: |-
11842+
Path to the TLS key file in the Prometheus container for the server.
11843+
Mutually exclusive with `keySecret`.
11844+
type: string
1183011845
keySecret:
1183111846
description: Secret containing the TLS key for the server.
1183211847
properties:
@@ -11862,9 +11877,6 @@ spec:
1186211877
cipher suite. If true then the server's preference, as expressed in
1186311878
the order of elements in cipherSuites, is used.
1186411879
type: boolean
11865-
required:
11866-
- cert
11867-
- keySecret
1186811880
type: object
1186911881
type: object
1187011882
type: object

manifests/setup/0prometheusagentCustomResourceDefinition.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9723,6 +9723,11 @@ spec:
97239723
type: object
97249724
x-kubernetes-map-type: atomic
97259725
type: object
9726+
certFile:
9727+
description: |-
9728+
Path to the TLS certificate file in the Prometheus container for the server.
9729+
Mutually exclusive with `cert`.
9730+
type: string
97269731
cipherSuites:
97279732
description: |-
97289733
List of supported cipher suites for TLS versions up to TLS 1.2. If empty,
@@ -9785,6 +9790,11 @@ spec:
97859790
For more detail on clientAuth options:
97869791
https://golang.org/pkg/crypto/tls/#ClientAuthType
97879792
type: string
9793+
clientCAFile:
9794+
description: |-
9795+
Path to the CA certificate file for client certificate authentication to the server.
9796+
Mutually exclusive with `client_ca`.
9797+
type: string
97889798
curvePreferences:
97899799
description: |-
97909800
Elliptic curves that will be used in an ECDHE handshake, in preference
@@ -9793,6 +9803,11 @@ spec:
97939803
items:
97949804
type: string
97959805
type: array
9806+
keyFile:
9807+
description: |-
9808+
Path to the TLS key file in the Prometheus container for the server.
9809+
Mutually exclusive with `keySecret`.
9810+
type: string
97969811
keySecret:
97979812
description: Secret containing the TLS key for the server.
97989813
properties:
@@ -9828,9 +9843,6 @@ spec:
98289843
cipher suite. If true then the server's preference, as expressed in
98299844
the order of elements in cipherSuites, is used.
98309845
type: boolean
9831-
required:
9832-
- cert
9833-
- keySecret
98349846
type: object
98359847
type: object
98369848
type: object

manifests/setup/0thanosrulerCustomResourceDefinition.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7355,6 +7355,11 @@ spec:
73557355
type: object
73567356
x-kubernetes-map-type: atomic
73577357
type: object
7358+
certFile:
7359+
description: |-
7360+
Path to the TLS certificate file in the Prometheus container for the server.
7361+
Mutually exclusive with `cert`.
7362+
type: string
73587363
cipherSuites:
73597364
description: |-
73607365
List of supported cipher suites for TLS versions up to TLS 1.2. If empty,
@@ -7417,6 +7422,11 @@ spec:
74177422
For more detail on clientAuth options:
74187423
https://golang.org/pkg/crypto/tls/#ClientAuthType
74197424
type: string
7425+
clientCAFile:
7426+
description: |-
7427+
Path to the CA certificate file for client certificate authentication to the server.
7428+
Mutually exclusive with `client_ca`.
7429+
type: string
74207430
curvePreferences:
74217431
description: |-
74227432
Elliptic curves that will be used in an ECDHE handshake, in preference
@@ -7425,6 +7435,11 @@ spec:
74257435
items:
74267436
type: string
74277437
type: array
7438+
keyFile:
7439+
description: |-
7440+
Path to the TLS key file in the Prometheus container for the server.
7441+
Mutually exclusive with `keySecret`.
7442+
type: string
74287443
keySecret:
74297444
description: Secret containing the TLS key for the server.
74307445
properties:
@@ -7460,9 +7475,6 @@ spec:
74607475
cipher suite. If true then the server's preference, as expressed in
74617476
the order of elements in cipherSuites, is used.
74627477
type: boolean
7463-
required:
7464-
- cert
7465-
- keySecret
74667478
type: object
74677479
type: object
74687480
type: object

0 commit comments

Comments
 (0)