This commit is contained in:
CarlosEDP 2019-02-04 20:20:03 -02:00
parent 2acf11bcd5
commit 0af6b6eb2e

View File

@ -10,10 +10,6 @@ local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') +
namespace: "monitoring", namespace: "monitoring",
urls+:: { urls+:: {
prom_externalUrl: 'http://prometheus.internal.carlosedp.com',
alert_externalUrl: 'http://alertmanager.internal.carlosedp.com',
grafana_externalUrl: 'http://grafana.internal.carlosedp.com/',
prom_ingress: 'prometheus.internal.carlosedp.com', prom_ingress: 'prometheus.internal.carlosedp.com',
alert_ingress: 'alertmanager.internal.carlosedp.com', alert_ingress: 'alertmanager.internal.carlosedp.com',
grafana_ingress: 'grafana.internal.carlosedp.com', grafana_ingress: 'grafana.internal.carlosedp.com',
@ -76,7 +72,7 @@ local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') +
prometheus+: { prometheus+: {
spec+: { spec+: {
retention: '15d', retention: '15d',
externalUrl: $._config.urls.prom_externalUrl, externalUrl: 'http://' + $._config.urls.prom_ingress,
storage: { storage: {
volumeClaimTemplate: volumeClaimTemplate:
pvc.new() + pvc.new() +
@ -113,7 +109,6 @@ local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') +
}, },
storage: storage:
local pvc = k.core.v1.persistentVolumeClaim; local pvc = k.core.v1.persistentVolumeClaim;
local deployment = k.apps.v1beta2.deployment;
pvc.new() + pvc.mixin.metadata.withNamespace($._config.namespace) + pvc.new() + pvc.mixin.metadata.withNamespace($._config.namespace) +
pvc.mixin.metadata.withName("grafana-storage") + pvc.mixin.metadata.withName("grafana-storage") +
pvc.mixin.spec.withAccessModes('ReadWriteMany') + pvc.mixin.spec.withAccessModes('ReadWriteMany') +
@ -208,8 +203,8 @@ local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') +
httpIngressPath.mixin.backend.withServicePort('web') httpIngressPath.mixin.backend.withServicePort('web')
), ),
), ),
// 'grafana-external':
// // Example external ingress with authentication // // Example external ingress with authentication
// 'grafana-external':
// ingress.new() + // ingress.new() +
// ingress.mixin.metadata.withName('grafana-external') + // ingress.mixin.metadata.withName('grafana-external') +
// ingress.mixin.metadata.withNamespace($._config.namespace) + // ingress.mixin.metadata.withNamespace($._config.namespace) +