mirror of
https://github.com/prometheus-operator/kube-prometheus.git
synced 2025-08-26 17:01:50 +02:00
jsonnet: expose prometheus-operator metrics over secure channel
This commit is contained in:
parent
4541b9e10c
commit
6f37ddbcf9
@ -50,7 +50,62 @@ local configMapList = k3.core.v1.configMapList;
|
|||||||
preserveUnknownFields: null,
|
preserveUnknownFields: null,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
service+: {
|
||||||
|
spec+: {
|
||||||
|
ports: [
|
||||||
|
{
|
||||||
|
name: 'https',
|
||||||
|
port: 8443,
|
||||||
|
targetPort: 'https',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
serviceMonitor+: {
|
||||||
|
spec+: {
|
||||||
|
endpoints: [
|
||||||
|
{
|
||||||
|
port: 'https',
|
||||||
|
scheme: 'https',
|
||||||
|
honorLabels: true,
|
||||||
|
bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token',
|
||||||
|
tlsConfig: {
|
||||||
|
insecureSkipVerify: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
clusterRole+: {
|
||||||
|
rules+: [
|
||||||
|
{
|
||||||
|
apiGroups: ['authentication.k8s.io'],
|
||||||
|
resources: ['tokenreviews'],
|
||||||
|
verbs: ['create'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
apiGroups: ['authorization.k8s.io'],
|
||||||
|
resources: ['subjectaccessreviews'],
|
||||||
|
verbs: ['create'],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
} +
|
||||||
|
((import 'kube-prometheus/kube-rbac-proxy/container.libsonnet') {
|
||||||
|
config+:: {
|
||||||
|
kubeRbacProxy: {
|
||||||
|
local cfg = self,
|
||||||
|
image: $._config.imageRepos.kubeRbacProxy + ':' + $._config.versions.kubeRbacProxy,
|
||||||
|
name: 'kube-rbac-proxy',
|
||||||
|
securePortName: 'https',
|
||||||
|
securePort: 8443,
|
||||||
|
secureListenAddress: ':%d' % self.securePort,
|
||||||
|
upstream: 'http://127.0.0.1:8080/',
|
||||||
|
tlsCipherSuites: $._config.tlsCipherSuites,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}).deploymentMixin,
|
||||||
|
|
||||||
grafana+:: {
|
grafana+:: {
|
||||||
dashboardDefinitions: configMapList.new(super.dashboardDefinitions),
|
dashboardDefinitions: configMapList.new(super.dashboardDefinitions),
|
||||||
serviceMonitor: {
|
serviceMonitor: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user