rpi.carlosedp.cluster-monit.../modules/k3s-overrides.jsonnet

28 lines
1.3 KiB
Plaintext
Raw Normal View History

2020-05-26 01:23:56 +02:00
local utils = import '../utils.libsonnet';
local vars = import '../vars.jsonnet';
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
2020-10-03 10:09:08 +02:00
local service = k.core.v1.service;
local servicePort = k.core.v1.service.mixin.spec.portsType;
{
2019-09-27 00:02:33 +02:00
prometheus+:: {
kubeControllerManagerPrometheusDiscoveryEndpoints:
2019-11-14 16:25:16 +01:00
utils.newEndpoint('kube-controller-manager-prometheus-discovery', 'kube-system', vars.k3s.master_ip, 'http-metrics', 10252),
kubeSchedulerPrometheusDiscoveryEndpoints:
2019-11-14 16:25:16 +01:00
utils.newEndpoint('kube-scheduler-prometheus-discovery', 'kube-system', vars.k3s.master_ip, 'http-metrics', 10251),
2020-10-03 10:09:08 +02:00
kubeControllerManagerPrometheusDiscoveryService:
service.new('kube-controller-manager-prometheus-discovery', {}, servicePort.newNamed('http-metrics', 10252, 10252)) +
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', {}, servicePort.newNamed('http-metrics', 10251, 10251)) +
service.mixin.metadata.withNamespace('kube-system') +
service.mixin.metadata.withLabels({ 'k8s-app': 'kube-scheduler' }) +
service.mixin.spec.withClusterIp('None'),
},
}