sync master with current fork
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
{
|
||||
alert: 'TargetDown',
|
||||
annotations: {
|
||||
message: '{{ printf "%.4g" $value }}% of the {{ $labels.job }} targets are down.',
|
||||
message: '{{ printf "%.4g" $value }}% of the {{ $labels.job }} targets in {{ $labels.namespace }} namespace are down.',
|
||||
},
|
||||
expr: '100 * (count(up == 0) BY (job, namespace, service) / count(up) BY (job, namespace, service)) > 10',
|
||||
'for': '10m',
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"subdir": "jsonnet/prometheus-operator"
|
||||
}
|
||||
},
|
||||
"version": "release-0.33"
|
||||
"version": "release-0.34"
|
||||
},
|
||||
{
|
||||
"name": "etcd-mixin",
|
||||
|
||||
@@ -9,6 +9,12 @@
|
||||
scheme: 'http',
|
||||
interval: '30s',
|
||||
bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token',
|
||||
relabelings: [
|
||||
{
|
||||
sourceLabels: ['__metrics_path__'],
|
||||
targetLabel: 'metrics_path'
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
port: 'http-metrics',
|
||||
@@ -17,6 +23,21 @@
|
||||
interval: '30s',
|
||||
honorLabels: true,
|
||||
bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token',
|
||||
relabelings: [
|
||||
{
|
||||
sourceLabels: ['__metrics_path__'],
|
||||
targetLabel: 'metrics_path'
|
||||
},
|
||||
],
|
||||
metricRelabelings: [
|
||||
// Drop a bunch of metrics which are disabled but still sent, see
|
||||
// https://github.com/google/cadvisor/issues/1925.
|
||||
{
|
||||
sourceLabels: ['__name__'],
|
||||
regex: 'container_(network_tcp_usage_total|network_udp_usage_total|tasks_state|cpu_load_average_10s)',
|
||||
action: 'drop',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -14,7 +14,7 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
|
||||
},
|
||||
|
||||
versions+:: {
|
||||
kubeStateMetrics: 'v1.7.2',
|
||||
kubeStateMetrics: 'v1.8.0',
|
||||
kubeRbacProxy: 'v0.4.1',
|
||||
},
|
||||
|
||||
|
||||
@@ -118,8 +118,8 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
|
||||
// forgo declaring the host port, however it is important to declare
|
||||
// it so that the scheduler can decide if the pod is schedulable.
|
||||
container.withPorts(containerPort.new($._config.nodeExporter.port) + containerPort.withHostPort($._config.nodeExporter.port) + containerPort.withName('https')) +
|
||||
container.mixin.resources.withRequests({ cpu: '10m', memory: '20Mi' }) +
|
||||
container.mixin.resources.withLimits({ cpu: '20m', memory: '60Mi' }) +
|
||||
container.mixin.resources.withRequests($._config.resources['kube-rbac-proxy'].requests) +
|
||||
container.mixin.resources.withLimits($._config.resources['kube-rbac-proxy'].limits) +
|
||||
container.withEnv([ip]);
|
||||
|
||||
local c = [nodeExporter, proxy];
|
||||
|
||||
@@ -18,6 +18,8 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
|
||||
},
|
||||
|
||||
prometheus+:: {
|
||||
name: 'k8s',
|
||||
replicas: 2,
|
||||
rules: {},
|
||||
namespaces: ['default', 'kube-system', $._config.namespace],
|
||||
},
|
||||
@@ -26,10 +28,10 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
|
||||
prometheus+:: {
|
||||
local p = self,
|
||||
|
||||
name:: 'k8s',
|
||||
name:: $._config.prometheus.name,
|
||||
namespace:: $._config.namespace,
|
||||
roleBindingNamespaces:: $._config.prometheus.namespaces,
|
||||
replicas:: 2,
|
||||
replicas:: $._config.prometheus.replicas,
|
||||
prometheusRules:: $._config.prometheus.rules,
|
||||
alertmanagerName:: $.alertmanager.service.metadata.name,
|
||||
|
||||
@@ -281,6 +283,12 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
|
||||
insecureSkipVerify: true,
|
||||
},
|
||||
bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token',
|
||||
relabelings: [
|
||||
{
|
||||
sourceLabels: ['__metrics_path__'],
|
||||
targetLabel: 'metrics_path'
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
port: 'https-metrics',
|
||||
@@ -292,6 +300,12 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
|
||||
insecureSkipVerify: true,
|
||||
},
|
||||
bearerTokenFile: '/var/run/secrets/kubernetes.io/serviceaccount/token',
|
||||
relabelings: [
|
||||
{
|
||||
sourceLabels: ['__metrics_path__'],
|
||||
targetLabel: 'metrics_path'
|
||||
},
|
||||
],
|
||||
metricRelabelings: [
|
||||
// Drop a bunch of metrics which are disabled but still sent, see
|
||||
// https://github.com/google/cadvisor/issues/1925.
|
||||
|
||||
Reference in New Issue
Block a user