diff --git a/monitor/alertmanager/datas.tf b/monitor/alertmanager/datas.tf index e9d2ef7..f47dfac 100644 --- a/monitor/alertmanager/datas.tf +++ b/monitor/alertmanager/datas.tf @@ -54,7 +54,7 @@ data "kustomization_overlay" "data" { apiVersion: v1 kind: ConfigMap metadata: - name: alertmanager-kube-grafana-datasource + name: alertmanager-operated data: datasource.yaml: |- apiVersion: 1 diff --git a/monitor/alertmanager/index.yaml b/monitor/alertmanager/index.yaml index 320f13a..7f05ad1 100644 --- a/monitor/alertmanager/index.yaml +++ b/monitor/alertmanager/index.yaml @@ -6,26 +6,6 @@ metadata: name: alertmanager description: null options: - listenLocal: - default: false - examples: - - false - type: boolean - ingress-class: - default: traefik - examples: - - traefik - type: string - logLevel: - default: info - examples: - - info - type: string - domain: - default: your-company - examples: - - your-company - type: string images: default: alertmanager: @@ -65,16 +45,16 @@ 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 + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string app-group: default: monitor examples: @@ -85,15 +65,35 @@ options: examples: - 1 type: integer + listenLocal: + default: false + examples: + - false + type: boolean + domain-name: + default: your_company.com + examples: + - your_company.com + type: string retention: default: 120h examples: - 120h type: string - issuer: - default: letsencrypt-prod + ingress-class: + default: traefik examples: - - letsencrypt-prod + - traefik + type: string + domain: + default: your-company + examples: + - your-company + type: string + logLevel: + default: info + examples: + - info type: string dependencies: - dist: null diff --git a/monitor/grafana/index.yaml b/monitor/grafana/index.yaml index 88e15f0..41ae9b2 100644 --- a/monitor/grafana/index.yaml +++ b/monitor/grafana/index.yaml @@ -6,21 +6,41 @@ metadata: name: grafana description: null options: - ingress-class: - default: traefik + admin_name: + default: grafana_admin examples: - - traefik + - grafana_admin + type: string + app-group: + default: monitor + examples: + - monitor type: string domain: default: your-company examples: - your-company type: string + sub-domain: + default: grafana + examples: + - grafana + type: string + domain-name: + default: your_company.com + examples: + - your_company.com + type: string issuer: default: letsencrypt-prod examples: - letsencrypt-prod type: string + ingress-class: + default: traefik + examples: + - traefik + type: string images: default: busybox: @@ -137,26 +157,6 @@ options: default: 10Gi type: string type: object - app-group: - default: monitor - examples: - - monitor - type: string - domain-name: - default: your_company.com - examples: - - your_company.com - type: string - sub-domain: - default: grafana - examples: - - grafana - type: string - admin_name: - default: grafana_admin - examples: - - grafana_admin - type: string dependencies: [] providers: kubernetes: true diff --git a/monitor/loki/apps_v1_StatefulSet_loki.yaml b/monitor/loki/apps_v1_StatefulSet_loki.yaml index c4ac9cb..3bced30 100644 --- a/monitor/loki/apps_v1_StatefulSet_loki.yaml +++ b/monitor/loki/apps_v1_StatefulSet_loki.yaml @@ -32,7 +32,7 @@ spec: template: metadata: annotations: - checksum/config: 00968f96c123aef1e3b51506bfca47d4009fec466be45ff4db4755acd6142f13 + checksum/config: f0b5fe7288abac6838f61aacfebeba1a01d5cf3d391971062c58797d2f0ea40f labels: app.kubernetes.io/name: loki app.kubernetes.io/instance: loki diff --git a/monitor/loki/config.tf b/monitor/loki/config.tf index 9230439..55e18a7 100644 --- a/monitor/loki/config.tf +++ b/monitor/loki/config.tf @@ -5,7 +5,7 @@ resource "kubectl_manifest" "datasource" { metadata: name: loki-datasource namespace: "${var.namespace}" - labels: ${jsonencode(local.common-labels)} + labels: ${jsonencode(merge(local.common-labels, {"grafana_datasource" = "1"}))} data: loki-datasource.yaml: |- apiVersion: 1 diff --git a/monitor/loki/index.yaml b/monitor/loki/index.yaml index 718deee..3df1f2e 100644 --- a/monitor/loki/index.yaml +++ b/monitor/loki/index.yaml @@ -6,6 +6,25 @@ metadata: name: loki description: null options: + volume: + default: + accessMode: ReadWriteOnce + size: 10Gi + examples: + - accessMode: ReadWriteOnce + size: 10Gi + properties: + accessMode: + default: ReadWriteOnce + enum: + - ReadWriteOnce + - ReadOnlyMany + - ReadWriteMany + type: string + size: + default: 10Gi + type: string + type: object images: default: loki: @@ -45,25 +64,6 @@ options: type: string type: object type: object - volume: - default: - accessMode: ReadWriteOnce - size: 10Gi - examples: - - accessMode: ReadWriteOnce - size: 10Gi - properties: - accessMode: - default: ReadWriteOnce - enum: - - ReadWriteOnce - - ReadOnlyMany - - ReadWriteMany - type: string - size: - default: 10Gi - type: string - type: object dependencies: [] providers: kubernetes: true diff --git a/monitor/prometheus/datas.tf b/monitor/prometheus/datas.tf index e86c093..cc380a3 100644 --- a/monitor/prometheus/datas.tf +++ b/monitor/prometheus/datas.tf @@ -71,7 +71,7 @@ data "kustomization_overlay" "data" { - name: Prometheus type: prometheus uid: prometheus - url: http://prometheus-community-kube-prometheus.${var.namespace}:9090/ + url: http://prometheus-operated.${var.namespace}:9090/ access: proxy isDefault: false jsonData: diff --git a/monitor/prometheus/index.yaml b/monitor/prometheus/index.yaml index bd8b478..a1bfe55 100644 --- a/monitor/prometheus/index.yaml +++ b/monitor/prometheus/index.yaml @@ -6,6 +6,61 @@ metadata: name: prometheus description: null options: + domain: + default: your-company + examples: + - your-company + type: string + ingress-class: + default: traefik + examples: + - traefik + type: string + retention: + default: 10d + examples: + - 10d + type: string + listenLocal: + default: false + examples: + - false + type: boolean + shards: + default: 1 + examples: + - 1 + type: integer + domain-name: + default: your_company.com + examples: + - your_company.com + type: string + app-group: + default: monitor + examples: + - monitor + type: string + logLevel: + default: info + examples: + - info + type: string + enableAdminAPI: + default: false + examples: + - false + type: boolean + replicas: + default: 1 + examples: + - 1 + type: integer + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string images: default: prometheus: @@ -45,66 +100,11 @@ 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: - - false - type: boolean dependencies: - dist: null category: share