From a137e29ff020ad32175a9fd6fd45f9060435b524 Mon Sep 17 00:00:00 2001 From: Maarten de Waard <maarten@greenhost.nl> Date: Thu, 8 Apr 2021 11:23:20 +0200 Subject: [PATCH] reduce prometheus install timeout to something reasonable, rename prometheus-stack release --- .../templates/settings/prometheus-stack.yaml | 9 +-- .../apps/templates/settings/prometheus.yaml | 59 ------------------- flux/oas/prometheus-stack_hr.yaml | 6 +- 3 files changed, 4 insertions(+), 70 deletions(-) delete mode 100644 ansible/roles/apps/templates/settings/prometheus.yaml diff --git a/ansible/roles/apps/templates/settings/prometheus-stack.yaml b/ansible/roles/apps/templates/settings/prometheus-stack.yaml index caa2e55ca..275e201d2 100644 --- a/ansible/roles/apps/templates/settings/prometheus-stack.yaml +++ b/ansible/roles/apps/templates/settings/prometheus-stack.yaml @@ -204,6 +204,8 @@ grafana: plugins: - grafana-piechart-panel + +# Resource limits suggested by cablespagetti # resources: # limits: # cpu: 500m @@ -250,10 +252,3 @@ kube-state-metrics: # cpu: 5m # memory: 128Mi # priorityClassName: high-priority - -# Use an unofficial multi-arch image until kube-state-metrics v2 is stable -# TODO: Use this if it does not work with default image -# image: -# repository: eddiezane/kube-state-metrics -# tag: v1.9.7 - diff --git a/ansible/roles/apps/templates/settings/prometheus.yaml b/ansible/roles/apps/templates/settings/prometheus.yaml deleted file mode 100644 index c8b930e1e..000000000 --- a/ansible/roles/apps/templates/settings/prometheus.yaml +++ /dev/null @@ -1,59 +0,0 @@ -#jinja2:lstrip_blocks:"True" -alertmanager: - persistentVolume: - existingClaim: "alertmanager" -server: - global: - scrape_interval: "3m" - evaluation_interval: "3m" - persistentVolume: - existingClaim: "prometheus-server" - retention: "10d" - {% if prometheus_enable_ingress is defined and prometheus_enable_ingress %} - ingress: - enabled: true - annotations: - nginx.ingress.kubernetes.io/auth-type: basic - nginx.ingress.kubernetes.io/auth-secret: prometheus-basic-auth - nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required' - kubernetes.io/tls-acme: "true" - hosts: - - "prometheus.{{ domain }}" - tls: - - secretName: prometheus-tls - hosts: - - "prometheus.{{ domain }}" - {% endif %} - extraConfigmapMounts: - - name: alerts-custom - mountPath: /etc/custom-config - configMap: prometheus-alerts-custom - readOnly: true - -# https://github.com/helm/charts/issues/9254#issuecomment-443554083 -configmapReload: - prometheus: - extraConfigmapMounts: - - name: alerts-custom - mountPath: /etc/custom-config - configMap: prometheus-alerts-custom - readOnly: true - extraVolumeDirs: - - /etc/custom-config - -serverFiles: - prometheus.yml: - rule_files: - - /etc/custom-config/custom-openappstack-alerts.yaml - - /etc/custom-config/alertmanager-alerts.yaml - - /etc/custom-config/cert-manager-alerts.yaml - - /etc/custom-config/coredns-alerts.yaml - - /etc/custom-config/kube-state-metrics-alerts.yaml - - /etc/custom-config/kubernetes-alerts.yaml - - /etc/custom-config/loki-alerts.yaml - - /etc/custom-config/node-exporter-alerts.yaml - - /etc/custom-config/prometheus-alerts.yaml - - /etc/custom-config/promtail-alerts.yaml - - /etc/custom-config/kubernetes-rules.yaml - - /etc/custom-config/loki-rules.yaml - - /etc/custom-config/node-exporter-rules.yaml diff --git a/flux/oas/prometheus-stack_hr.yaml b/flux/oas/prometheus-stack_hr.yaml index 300ebb04c..659914478 100644 --- a/flux/oas/prometheus-stack_hr.yaml +++ b/flux/oas/prometheus-stack_hr.yaml @@ -2,7 +2,7 @@ apiVersion: helm.fluxcd.io/v1 kind: HelmRelease metadata: - name: prometheus + name: prometheus-stack namespace: oas annotations: flux.weave.works/automated: "false" @@ -11,11 +11,9 @@ spec: chart: repository: https://prometheus-community.github.io/helm-charts name: kube-prometheus-stack - # TODO: Lower to version from - # https://github.com/cablespaghetti/k3s-monitoring if this does not work version: 14.5.0 valuesFrom: - secretKeyRef: name: prometheus-stack-settings key: values.yaml - timeout: 1800 + timeout: 300 -- GitLab