mirror of
https://github.com/prometheus-operator/kube-prometheus.git
synced 2025-08-31 19:31:23 +02:00
Remove ksonnet from jsonnet/kube-prometheus/kube-prometheus-bootkube.libsonnet
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
This commit is contained in:
parent
6d641706de
commit
f274702ece
@ -1,23 +1,42 @@
|
||||
local k = import 'github.com/ksonnet/ksonnet-lib/ksonnet.beta.4/k.libsonnet';
|
||||
local service = k.core.v1.service;
|
||||
local servicePort = k.core.v1.service.mixin.spec.portsType;
|
||||
local service(name, namespace, labels, selector, ports) = {
|
||||
apiVersion: 'v1',
|
||||
kind: 'Service',
|
||||
metadata: {
|
||||
name: name,
|
||||
namespace: namespace,
|
||||
labels: labels,
|
||||
},
|
||||
spec: {
|
||||
ports+: ports,
|
||||
selector: selector,
|
||||
clusterIP: 'None',
|
||||
},
|
||||
};
|
||||
|
||||
{
|
||||
prometheus+:: {
|
||||
kubeControllerManagerPrometheusDiscoveryService:
|
||||
service.new('kube-controller-manager-prometheus-discovery', { 'k8s-app': 'kube-controller-manager' }, servicePort.newNamed('https-metrics', 10257, 10257)) +
|
||||
service.mixin.metadata.withNamespace('kube-system') +
|
||||
service.mixin.metadata.withLabels({ 'k8s-app': 'kube-controller-manager' }) +
|
||||
service.mixin.spec.withClusterIp('None'),
|
||||
kubeSchedulerPrometheusDiscoveryService:
|
||||
service.new('kube-scheduler-prometheus-discovery', { 'k8s-app': 'kube-scheduler' }, servicePort.newNamed('https-metrics', 10259, 10259)) +
|
||||
service.mixin.metadata.withNamespace('kube-system') +
|
||||
service.mixin.metadata.withLabels({ 'k8s-app': 'kube-scheduler' }) +
|
||||
service.mixin.spec.withClusterIp('None'),
|
||||
kubeDnsPrometheusDiscoveryService:
|
||||
service.new('kube-dns-prometheus-discovery', { 'k8s-app': 'kube-dns' }, [servicePort.newNamed('http-metrics-skydns', 10055, 10055), servicePort.newNamed('http-metrics-dnsmasq', 10054, 10054)]) +
|
||||
service.mixin.metadata.withNamespace('kube-system') +
|
||||
service.mixin.metadata.withLabels({ 'k8s-app': 'kube-dns' }) +
|
||||
service.mixin.spec.withClusterIp('None'),
|
||||
kubeControllerManagerPrometheusDiscoveryService: service(
|
||||
'kube-controller-manager-prometheus-discovery',
|
||||
'kube-system',
|
||||
{ 'k8s-app': 'kube-controller-manager' },
|
||||
{ 'k8s-app': 'kube-controller-manager' },
|
||||
[{ name: 'https-metrics', port: 10257, targetPort: 10257 }]
|
||||
),
|
||||
|
||||
kubeSchedulerPrometheusDiscoveryService: service(
|
||||
'kube-scheduler-prometheus-discovery',
|
||||
'kube-system',
|
||||
{ 'k8s-app': 'kube-scheduler' },
|
||||
{ 'k8s-app': 'kube-scheduler' },
|
||||
[{ name: 'https-metrics', port: 10259, targetPort: 10259 }]
|
||||
),
|
||||
|
||||
kubeDnsPrometheusDiscoveryService: service(
|
||||
'kube-dns-prometheus-discovery',
|
||||
'kube-syste',
|
||||
{ 'k8s-app': 'kube-dns' },
|
||||
{ 'k8s-app': 'kube-dns' },
|
||||
[{ name: 'http-metrics-skydns', port: 10055, targetPort: 10055 }, { name: 'http-metrics-dnsmasq', port: 10054, targetPort: 10054 }]
|
||||
),
|
||||
},
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user