k3s eps
This commit is contained in:
parent
904808b1c5
commit
7eff156636
41
monitoring/k3s.libsonnet
Normal file
41
monitoring/k3s.libsonnet
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
|
||||||
|
local endpoints = k.core.v1.endpoints;
|
||||||
|
local endpointSubset = endpoints.subsetsType;
|
||||||
|
local endpointPort = endpointSubset.portsType;
|
||||||
|
|
||||||
|
{
|
||||||
|
prometheus+:: {
|
||||||
|
kubeSchedulerPrometheusDiscoveryEndpoints:
|
||||||
|
local port = endpointPort.new() +
|
||||||
|
endpointPort.withName('http-metrics') +
|
||||||
|
endpointPort.withPort(10251) +
|
||||||
|
endpointPort.withProtocol('TCP');
|
||||||
|
local subset = endpointSubset.new() +
|
||||||
|
endpointSubset.withAddresses([
|
||||||
|
{ ip: '185.95.218.11' },
|
||||||
|
]) +
|
||||||
|
endpointSubset.withPorts(port);
|
||||||
|
|
||||||
|
endpoints.new() +
|
||||||
|
endpoints.mixin.metadata.withName('kube-scheduler-knurrli') +
|
||||||
|
endpoints.mixin.metadata.withNamespace('kube-system') +
|
||||||
|
endpoints.mixin.metadata.withLabels({ 'k8s-app': 'kube-scheduler' }) +
|
||||||
|
endpoints.withSubsets(subset),
|
||||||
|
kubeControllerManagerPrometheusDiscoveryEndpoints:
|
||||||
|
local port = endpointPort.new() +
|
||||||
|
endpointPort.withName('http-metrics') +
|
||||||
|
endpointPort.withPort(10252) +
|
||||||
|
endpointPort.withProtocol('TCP');
|
||||||
|
local subset = endpointSubset.new() +
|
||||||
|
endpointSubset.withAddresses([
|
||||||
|
{ ip: '185.95.218.11' },
|
||||||
|
]) +
|
||||||
|
endpointSubset.withPorts(port);
|
||||||
|
|
||||||
|
endpoints.new() +
|
||||||
|
endpoints.mixin.metadata.withName('kube-controller-manager-knurrli') +
|
||||||
|
endpoints.mixin.metadata.withNamespace('kube-system') +
|
||||||
|
endpoints.mixin.metadata.withLabels({ 'k8s-app': 'kube-controller-manager' }) +
|
||||||
|
endpoints.withSubsets(subset),
|
||||||
|
},
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Endpoints
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: kube-controller-manager
|
||||||
|
name: kube-controller-manager-knurrli
|
||||||
|
namespace: kube-system
|
||||||
|
subsets:
|
||||||
|
- addresses:
|
||||||
|
- ip: 185.95.218.11
|
||||||
|
ports:
|
||||||
|
- name: http-metrics
|
||||||
|
port: 10252
|
||||||
|
protocol: TCP
|
|
@ -0,0 +1,14 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Endpoints
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
k8s-app: kube-scheduler
|
||||||
|
name: kube-scheduler-knurrli
|
||||||
|
namespace: kube-system
|
||||||
|
subsets:
|
||||||
|
- addresses:
|
||||||
|
- ip: 185.95.218.11
|
||||||
|
ports:
|
||||||
|
- name: http-metrics
|
||||||
|
port: 10251
|
||||||
|
protocol: TCP
|
|
@ -1,6 +1,7 @@
|
||||||
local kp =
|
local kp =
|
||||||
(import 'kube-prometheus/kube-prometheus.libsonnet') +
|
(import 'kube-prometheus/kube-prometheus.libsonnet') +
|
||||||
(import 'prometheus-pushgateway/pushgateway.libsonnet') +
|
(import 'prometheus-pushgateway/pushgateway.libsonnet') +
|
||||||
|
(import 'k3s.libsonnet')
|
||||||
// Uncomment the following imports to enable its patches
|
// Uncomment the following imports to enable its patches
|
||||||
// (import 'kube-prometheus/kube-prometheus-anti-affinity.libsonnet') +
|
// (import 'kube-prometheus/kube-prometheus-anti-affinity.libsonnet') +
|
||||||
// (import 'kube-prometheus/kube-prometheus-managed-cluster.libsonnet') +
|
// (import 'kube-prometheus/kube-prometheus-managed-cluster.libsonnet') +
|
||||||
|
|
Reference in a new issue