diff --git a/ansible/roles/apps/templates/settings/prometheus-stack.yaml b/ansible/roles/apps/templates/settings/prometheus-stack.yaml index caa2e55cad548aef1a62126927cda88cb278137b..275e201d29fa1525bf8e3cbbc8a55491d92e09f2 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 c8b930e1eb1a5c9ee39d2886a0d0a36b6bf41d6c..0000000000000000000000000000000000000000 --- 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 300ebb04cc0391bf66ce135e33b14636a52065e8..659914478bf3d766bd673af42c3e48b0d21b59ea 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