From c21b15ac4b82c349ffed8ee0ed689fc990ddde2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Huss?= Date: Tue, 23 Jan 2024 09:58:54 +0100 Subject: [PATCH] fix --- monitor/alertmanager/index.yaml | 72 ++++++------- ..._prometheus-community-kube-prometheus.yaml | 32 ------ monitor/prometheus/datas.tf | 7 ++ monitor/prometheus/index.yaml | 100 +++++++++--------- ..._prometheus-community-kube-prometheus.yaml | 7 -- ..._prometheus-community-kube-prometheus.yaml | 1 + 6 files changed, 94 insertions(+), 125 deletions(-) delete mode 100644 monitor/alertmanager/v1_Service_prometheus-community-kube-prometheus.yaml diff --git a/monitor/alertmanager/index.yaml b/monitor/alertmanager/index.yaml index 56b6cc9..320f13a 100644 --- a/monitor/alertmanager/index.yaml +++ b/monitor/alertmanager/index.yaml @@ -11,50 +11,20 @@ options: examples: - false type: boolean - domain: - default: your-company + ingress-class: + default: traefik examples: - - your-company - type: string - app-group: - default: monitor - examples: - - monitor - type: string - sub-domain: - default: alertmanager - examples: - - alertmanager + - traefik type: string logLevel: default: info examples: - info type: string - issuer: - default: letsencrypt-prod + domain: + default: your-company examples: - - letsencrypt-prod - type: string - domain-name: - default: your_company.com - examples: - - your_company.com - type: string - retention: - default: 120h - examples: - - 120h - type: string - replicas: - default: 1 - examples: - - 1 - type: integer - ingress-class: - default: traefik - examples: - - traefik + - your-company type: string images: default: @@ -95,6 +65,36 @@ options: type: string type: object type: object + domain-name: + default: your_company.com + examples: + - your_company.com + type: string + sub-domain: + default: alertmanager + examples: + - alertmanager + type: string + app-group: + default: monitor + examples: + - monitor + type: string + replicas: + default: 1 + examples: + - 1 + type: integer + retention: + default: 120h + examples: + - 120h + type: string + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string dependencies: - dist: null category: share diff --git a/monitor/alertmanager/v1_Service_prometheus-community-kube-prometheus.yaml b/monitor/alertmanager/v1_Service_prometheus-community-kube-prometheus.yaml deleted file mode 100644 index 29e4323..0000000 --- a/monitor/alertmanager/v1_Service_prometheus-community-kube-prometheus.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# Source: kube-prometheus-stack/templates/prometheus/service.yaml -apiVersion: v1 -kind: Service -metadata: - name: prometheus-community-kube-prometheus - namespace: vynil-monitor - labels: - app: kube-prometheus-stack-prometheus - self-monitor: "true" - - app.kubernetes.io/managed-by: Helm - app.kubernetes.io/instance: prometheus-community - app.kubernetes.io/version: "56.0.3" - app.kubernetes.io/part-of: kube-prometheus-stack - chart: kube-prometheus-stack-56.0.3 - release: "prometheus-community" - heritage: "Helm" -spec: - ports: - - name: http-web - port: 9090 - targetPort: 9090 - - name: reloader-web - appProtocol: http - port: 8080 - targetPort: reloader-web - publishNotReadyAddresses: false - selector: - app.kubernetes.io/name: prometheus - operator.prometheus.io/name: prometheus-community-kube-prometheus - sessionAffinity: None - type: "ClusterIP" \ No newline at end of file diff --git a/monitor/prometheus/datas.tf b/monitor/prometheus/datas.tf index e14a4c6..e86c093 100644 --- a/monitor/prometheus/datas.tf +++ b/monitor/prometheus/datas.tf @@ -45,6 +45,13 @@ data "kustomization_overlay" "data" { listenLocal: ${var.listenLocal} enableAdminAPI: ${var.enableAdminAPI} retention: "${var.retention}" + alerting: + alertmanagers: + - namespace: ${var.namespace} + name: prometheus-community-kube-alertmanager + port: http-web + pathPrefix: "/" + apiVersion: v2 EOF } patches { diff --git a/monitor/prometheus/index.yaml b/monitor/prometheus/index.yaml index ab197d0..bd8b478 100644 --- a/monitor/prometheus/index.yaml +++ b/monitor/prometheus/index.yaml @@ -6,56 +6,6 @@ metadata: name: prometheus description: null options: - domain-name: - default: your_company.com - examples: - - your_company.com - type: string - replicas: - default: 1 - examples: - - 1 - type: integer - logLevel: - default: info - examples: - - info - type: string - sub-domain: - default: prometheus - examples: - - prometheus - type: string - retention: - default: 10d - examples: - - 10d - type: string - ingress-class: - default: traefik - examples: - - traefik - type: string - app-group: - default: monitor - examples: - - monitor - type: string - listenLocal: - default: false - examples: - - false - type: boolean - domain: - default: your-company - examples: - - your-company - type: string - issuer: - default: letsencrypt-prod - examples: - - letsencrypt-prod - type: string images: default: prometheus: @@ -95,11 +45,61 @@ options: type: string type: object type: object + domain: + default: your-company + examples: + - your-company + type: string + ingress-class: + default: traefik + examples: + - traefik + type: string + domain-name: + default: your_company.com + examples: + - your_company.com + type: string + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string + app-group: + default: monitor + examples: + - monitor + type: string + replicas: + default: 1 + examples: + - 1 + type: integer shards: default: 1 examples: - 1 type: integer + logLevel: + default: info + examples: + - info + type: string + sub-domain: + default: prometheus + examples: + - prometheus + type: string + listenLocal: + default: false + examples: + - false + type: boolean + retention: + default: 10d + examples: + - 10d + type: string enableAdminAPI: default: false examples: diff --git a/monitor/prometheus/monitoring.coreos.com_v1_Prometheus_prometheus-community-kube-prometheus.yaml b/monitor/prometheus/monitoring.coreos.com_v1_Prometheus_prometheus-community-kube-prometheus.yaml index 594a1b7..671542d 100644 --- a/monitor/prometheus/monitoring.coreos.com_v1_Prometheus_prometheus-community-kube-prometheus.yaml +++ b/monitor/prometheus/monitoring.coreos.com_v1_Prometheus_prometheus-community-kube-prometheus.yaml @@ -15,13 +15,6 @@ metadata: release: "prometheus-community" heritage: "Helm" spec: - alerting: - alertmanagers: - - namespace: vynil-monitor - name: prometheus-community-kube-alertmanager - port: http-web - pathPrefix: "/" - apiVersion: v2 image: "quay.io/prometheus/prometheus:v2.49.1" version: v2.49.1 externalUrl: http://prometheus-community-kube-prometheus.vynil-monitor:9090 diff --git a/monitor/prometheus/v1_ServiceAccount_prometheus-community-kube-prometheus.yaml b/monitor/prometheus/v1_ServiceAccount_prometheus-community-kube-prometheus.yaml index f6db2f3..78e8332 100644 --- a/monitor/prometheus/v1_ServiceAccount_prometheus-community-kube-prometheus.yaml +++ b/monitor/prometheus/v1_ServiceAccount_prometheus-community-kube-prometheus.yaml @@ -1,3 +1,4 @@ +--- # Source: kube-prometheus-stack/templates/prometheus/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount