From 056dd8a8b0bcbe95a115cd1fbc104290f7d14dc1 Mon Sep 17 00:00:00 2001 From: CarlosEDP Date: Fri, 3 May 2019 14:00:05 -0300 Subject: [PATCH] Change domain to generic nip.io. Use http Kubelet port --- main.jsonnet | 2 ++ manifests/grafana-config.yaml | 2 +- manifests/ingress-alertmanager-main.yaml | 2 +- manifests/ingress-grafana.yaml | 2 +- manifests/ingress-prometheus-k8s.yaml | 2 +- manifests/prometheus-prometheus.yaml | 2 +- .../prometheus-serviceMonitorKubelet.yaml | 18 ++++-------------- vars.jsonnet | 6 +++--- 8 files changed, 14 insertions(+), 22 deletions(-) diff --git a/main.jsonnet b/main.jsonnet index 58b851b..735e674 100644 --- a/main.jsonnet +++ b/main.jsonnet @@ -5,6 +5,8 @@ local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + (import 'kube-prometheus/kube-prometheus-anti-affinity.libsonnet') + (import 'kube-prometheus/kube-prometheus-kops-coredns.libsonnet') + (import 'kube-prometheus/kube-prometheus-kubeadm.libsonnet') + // Use http Kubelet targets. Comment to revert to https + + (import 'kube-prometheus/kube-prometheus-insecure-kubelet.libsonnet') + (import 'base_operator_stack.jsonnet') + (import 'smtp_server.jsonnet') // Additional Modules diff --git a/manifests/grafana-config.yaml b/manifests/grafana-config.yaml index 14966e2..750e3c8 100644 --- a/manifests/grafana-config.yaml +++ b/manifests/grafana-config.yaml @@ -1,6 +1,6 @@ apiVersion: v1 data: - grafana.ini: W2F1dGguYW5vbnltb3VzXQplbmFibGVkID0gZmFsc2UKW2F1dGguYmFzaWNdCmVuYWJsZWQgPSBmYWxzZQpbc2Vzc2lvbl0KcHJvdmlkZXIgPSBtZW1vcnkKW3NtdHBdCmVuYWJsZWQgPSB0cnVlCmZyb21fYWRkcmVzcyA9IGNhcmxvc2VkcEBnbWFpbC5jb20KZnJvbV9uYW1lID0gR3JhZmFuYSBBbGVydApob3N0ID0gc210cC1zZXJ2ZXIubW9uaXRvcmluZy5zdmM6MjUKcGFzc3dvcmQgPSAKc2tpcF92ZXJpZnkgPSB0cnVlCnVzZXIgPSAK + grafana.ini: W2F1dGguYW5vbnltb3VzXQplbmFibGVkID0gZmFsc2UKW2F1dGguYmFzaWNdCmVuYWJsZWQgPSBmYWxzZQpbc2Vzc2lvbl0KcHJvdmlkZXIgPSBtZW1vcnkKW3NtdHBdCmVuYWJsZWQgPSB0cnVlCmZyb21fYWRkcmVzcyA9IG15ZW1haWxAZ21haWwuY29tCmZyb21fbmFtZSA9IEdyYWZhbmEgQWxlcnQKaG9zdCA9IHNtdHAtc2VydmVyLm1vbml0b3Jpbmcuc3ZjOjI1CnBhc3N3b3JkID0gCnNraXBfdmVyaWZ5ID0gdHJ1ZQp1c2VyID0gCg== kind: Secret metadata: name: grafana-config diff --git a/manifests/ingress-alertmanager-main.yaml b/manifests/ingress-alertmanager-main.yaml index 540a0b2..343d8e4 100644 --- a/manifests/ingress-alertmanager-main.yaml +++ b/manifests/ingress-alertmanager-main.yaml @@ -5,7 +5,7 @@ metadata: namespace: monitoring spec: rules: - - host: alertmanager.internal.carlosedp.com + - host: alertmanager.192.168.99.102.nip.io http: paths: - backend: diff --git a/manifests/ingress-grafana.yaml b/manifests/ingress-grafana.yaml index cd56db0..defc89a 100644 --- a/manifests/ingress-grafana.yaml +++ b/manifests/ingress-grafana.yaml @@ -5,7 +5,7 @@ metadata: namespace: monitoring spec: rules: - - host: grafana.internal.carlosedp.com + - host: grafana.192.168.99.102.nip.io http: paths: - backend: diff --git a/manifests/ingress-prometheus-k8s.yaml b/manifests/ingress-prometheus-k8s.yaml index aad643d..b8542b3 100644 --- a/manifests/ingress-prometheus-k8s.yaml +++ b/manifests/ingress-prometheus-k8s.yaml @@ -5,7 +5,7 @@ metadata: namespace: monitoring spec: rules: - - host: prometheus.internal.carlosedp.com + - host: prometheus.192.168.99.102.nip.io http: paths: - backend: diff --git a/manifests/prometheus-prometheus.yaml b/manifests/prometheus-prometheus.yaml index d9280c8..542828a 100644 --- a/manifests/prometheus-prometheus.yaml +++ b/manifests/prometheus-prometheus.yaml @@ -26,7 +26,7 @@ spec: namespace: monitoring port: web baseImage: carlosedp/prometheus - externalUrl: http://prometheus.internal.carlosedp.com + externalUrl: http://prometheus.192.168.99.102.nip.io nodeSelector: beta.kubernetes.io/os: linux replicas: 1 diff --git a/manifests/prometheus-serviceMonitorKubelet.yaml b/manifests/prometheus-serviceMonitorKubelet.yaml index 91da377..71b95a5 100644 --- a/manifests/prometheus-serviceMonitorKubelet.yaml +++ b/manifests/prometheus-serviceMonitorKubelet.yaml @@ -8,25 +8,15 @@ metadata: spec: endpoints: - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token - honorLabels: true interval: 30s - port: https-metrics - scheme: https - tlsConfig: - insecureSkipVerify: true + port: http-metrics + scheme: http - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token honorLabels: true interval: 30s - metricRelabelings: - - action: drop - regex: container_(network_tcp_usage_total|network_udp_usage_total|tasks_state|cpu_load_average_10s) - sourceLabels: - - __name__ path: /metrics/cadvisor - port: https-metrics - scheme: https - tlsConfig: - insecureSkipVerify: true + port: http-metrics + scheme: http jobLabel: k8s-app namespaceSelector: matchNames: diff --git a/vars.jsonnet b/vars.jsonnet index 145b502..f130685 100644 --- a/vars.jsonnet +++ b/vars.jsonnet @@ -15,10 +15,10 @@ }, // Domain suffix for the ingresses - suffixDomain: "internal.carlosedp.com", + suffixDomain: "192.168.99.102.nip.io", - // Grafana from email + // Grafana "from" email grafana: { - from_address: 'carlosedp@gmail.com', + from_address: 'myemail@gmail.com', }, } \ No newline at end of file