From 68df02b47a9007d029c6c3427523dd59320404ac Mon Sep 17 00:00:00 2001 From: Raffael H Date: Thu, 10 Aug 2023 14:49:17 +0200 Subject: [PATCH] Release version 0.2.0 --- charts/user-monitoring/Chart.yaml | 2 +- .../templates/{user-am.yaml => _user-am.yaml} | 3 ++ ...cret.yaml => _user-basic-auth-secret.yaml} | 0 ...cm.yaml => _user-blackboxexporter-cm.yaml} | 2 + ...aml => _user-blackboxexporter-deploy.yaml} | 2 + ...-grafana-cm.yaml => _user-grafana-cm.yaml} | 2 + ...l => _user-grafana-datasource-secret.yaml} | 2 + ...-deploy.yaml => _user-grafana-deploy.yaml} | 4 +- ...ngress.yaml => _user-grafana-ingress.yaml} | 2 + ...ng.yaml => _user-grafana-rolebinding.yaml} | 2 + ...-grafana-sa.yaml => _user-grafana-sa.yaml} | 2 + ...rafana-svc.yaml => _user-grafana-svc.yaml} | 2 + ...m-ingress.yaml => _user-prom-ingress.yaml} | 2 + ...er-prom-role.yaml => _user-prom-role.yaml} | 2 + ...nding.yaml => _user-prom-rolebinding.yaml} | 2 + .../{user-prom-sa.yaml => _user-prom-sa.yaml} | 3 +- ...-prometheus.yaml => _user-prometheus.yaml} | 2 + ...loy.yaml => _user-pushgateway-deploy.yaml} | 2 + ... => _user-pushgateway-servicemonitor.yaml} | 2 + ...ay-svc.yaml => _user-pushgateway-svc.yaml} | 2 + ...oy.yaml => _user-thanos-query-deploy.yaml} | 4 +- ...s.yaml => _user-thanos-query-ingress.yaml} | 2 + ...y-svc.yaml => _user-thanos-query-svc.yaml} | 2 + ...ss.yaml => _user-thanosruler-ingress.yaml} | 8 ++-- ...hanosruler.yaml => _user-thanosruler.yaml} | 4 +- .../user-monitoring/templates/monitoring.yaml | 44 +++++++++++++++++++ charts/user-monitoring/values.yaml | 26 ++++++++++- 27 files changed, 123 insertions(+), 9 deletions(-) rename charts/user-monitoring/templates/{user-am.yaml => _user-am.yaml} (72%) rename charts/user-monitoring/templates/{user-basic-auth-secret.yaml => _user-basic-auth-secret.yaml} (100%) rename charts/user-monitoring/templates/{user-blackboxexporter-cm.yaml => _user-blackboxexporter-cm.yaml} (92%) rename charts/user-monitoring/templates/{user-blackboxexporter-deploy.yaml => _user-blackboxexporter-deploy.yaml} (91%) rename charts/user-monitoring/templates/{user-grafana-cm.yaml => _user-grafana-cm.yaml} (83%) rename charts/user-monitoring/templates/{user-grafana-datasource-secret.yaml => _user-grafana-datasource-secret.yaml} (87%) rename charts/user-monitoring/templates/{user-grafana-deploy.yaml => _user-grafana-deploy.yaml} (94%) rename charts/user-monitoring/templates/{user-grafana-ingress.yaml => _user-grafana-ingress.yaml} (90%) rename charts/user-monitoring/templates/{user-grafana-rolebinding.yaml => _user-grafana-rolebinding.yaml} (83%) rename charts/user-monitoring/templates/{user-grafana-sa.yaml => _user-grafana-sa.yaml} (71%) rename charts/user-monitoring/templates/{user-grafana-svc.yaml => _user-grafana-svc.yaml} (82%) rename charts/user-monitoring/templates/{user-prom-ingress.yaml => _user-prom-ingress.yaml} (90%) rename charts/user-monitoring/templates/{user-prom-role.yaml => _user-prom-role.yaml} (87%) rename charts/user-monitoring/templates/{user-prom-rolebinding.yaml => _user-prom-rolebinding.yaml} (82%) rename charts/user-monitoring/templates/{user-prom-sa.yaml => _user-prom-sa.yaml} (76%) rename charts/user-monitoring/templates/{user-prometheus.yaml => _user-prometheus.yaml} (89%) rename charts/user-monitoring/templates/{user-pushgateway-deploy.yaml => _user-pushgateway-deploy.yaml} (90%) rename charts/user-monitoring/templates/{user-pushgateway-servicemonitor.yaml => _user-pushgateway-servicemonitor.yaml} (81%) rename charts/user-monitoring/templates/{user-pushgateway-svc.yaml => _user-pushgateway-svc.yaml} (81%) rename charts/user-monitoring/templates/{user-thanos-query-deploy.yaml => _user-thanos-query-deploy.yaml} (91%) rename charts/user-monitoring/templates/{user-thanos-query-ingress.yaml => _user-thanos-query-ingress.yaml} (91%) rename charts/user-monitoring/templates/{user-thanos-query-svc.yaml => _user-thanos-query-svc.yaml} (83%) rename charts/user-monitoring/templates/{user-thanosruler-ingress.yaml => _user-thanosruler-ingress.yaml} (67%) rename charts/user-monitoring/templates/{user-thanosruler.yaml => _user-thanosruler.yaml} (82%) create mode 100644 charts/user-monitoring/templates/monitoring.yaml diff --git a/charts/user-monitoring/Chart.yaml b/charts/user-monitoring/Chart.yaml index 9b26c27..def29e1 100644 --- a/charts/user-monitoring/Chart.yaml +++ b/charts/user-monitoring/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.5 +version: 0.2.0-U+1F992 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/user-monitoring/templates/user-am.yaml b/charts/user-monitoring/templates/_user-am.yaml similarity index 72% rename from charts/user-monitoring/templates/user-am.yaml rename to charts/user-monitoring/templates/_user-am.yaml index 15ae475..ea963ec 100644 --- a/charts/user-monitoring/templates/user-am.yaml +++ b/charts/user-monitoring/templates/_user-am.yaml @@ -1,3 +1,5 @@ +{{- define "alertmanager.alertmanager" }} + apiVersion: monitoring.coreos.com/v1 kind: Alertmanager metadata: @@ -5,3 +7,4 @@ metadata: app.kubernetes.io/name: {{ .Values.user }}-am name: {{ .Values.user }}-am spec: {} +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/user-basic-auth-secret.yaml b/charts/user-monitoring/templates/_user-basic-auth-secret.yaml similarity index 100% rename from charts/user-monitoring/templates/user-basic-auth-secret.yaml rename to charts/user-monitoring/templates/_user-basic-auth-secret.yaml diff --git a/charts/user-monitoring/templates/user-blackboxexporter-cm.yaml b/charts/user-monitoring/templates/_user-blackboxexporter-cm.yaml similarity index 92% rename from charts/user-monitoring/templates/user-blackboxexporter-cm.yaml rename to charts/user-monitoring/templates/_user-blackboxexporter-cm.yaml index d7d3190..5e3d111 100644 --- a/charts/user-monitoring/templates/user-blackboxexporter-cm.yaml +++ b/charts/user-monitoring/templates/_user-blackboxexporter-cm.yaml @@ -1,3 +1,4 @@ +{{- define "blackboxexporter.cm" }} apiVersion: v1 kind: ConfigMap metadata: @@ -34,3 +35,4 @@ data: valid_status_codes: [400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 421, 422, 423, 424, 425, 426, 428, 429, 431, 451, 418, 420, 444, 449, 499] tcp_connect: prober: tcp +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/user-blackboxexporter-deploy.yaml b/charts/user-monitoring/templates/_user-blackboxexporter-deploy.yaml similarity index 91% rename from charts/user-monitoring/templates/user-blackboxexporter-deploy.yaml rename to charts/user-monitoring/templates/_user-blackboxexporter-deploy.yaml index 0599888..d94b931 100644 --- a/charts/user-monitoring/templates/user-blackboxexporter-deploy.yaml +++ b/charts/user-monitoring/templates/_user-blackboxexporter-deploy.yaml @@ -1,3 +1,4 @@ +{{- define "blackboxexporter.deploy" }} apiVersion: apps/v1 kind: Deployment metadata: @@ -38,3 +39,4 @@ spec: configMap: defaultMode: 420 name: blackbox-exporter-config +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/user-grafana-cm.yaml b/charts/user-monitoring/templates/_user-grafana-cm.yaml similarity index 83% rename from charts/user-monitoring/templates/user-grafana-cm.yaml rename to charts/user-monitoring/templates/_user-grafana-cm.yaml index d7d1871..7d5da93 100644 --- a/charts/user-monitoring/templates/user-grafana-cm.yaml +++ b/charts/user-monitoring/templates/_user-grafana-cm.yaml @@ -1,3 +1,4 @@ +{{- define "grafana.dashboardprovider" }} kind: ConfigMap apiVersion: v1 metadata: @@ -15,3 +16,4 @@ data: path: /var/lib/grafana/dashboards/general orgId: 1 type: file +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/user-grafana-datasource-secret.yaml b/charts/user-monitoring/templates/_user-grafana-datasource-secret.yaml similarity index 87% rename from charts/user-monitoring/templates/user-grafana-datasource-secret.yaml rename to charts/user-monitoring/templates/_user-grafana-datasource-secret.yaml index 21becb8..103433f 100644 --- a/charts/user-monitoring/templates/user-grafana-datasource-secret.yaml +++ b/charts/user-monitoring/templates/_user-grafana-datasource-secret.yaml @@ -1,3 +1,4 @@ +{{- define "grafana.datasource" }} apiVersion: v1 kind: Secret type: Opaque @@ -16,3 +17,4 @@ stringData: type: prometheus url: http://thanos-query.{{ .Values.user }}-monitoring.svc.cluster.local:10902 version: 1 +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/user-grafana-deploy.yaml b/charts/user-monitoring/templates/_user-grafana-deploy.yaml similarity index 94% rename from charts/user-monitoring/templates/user-grafana-deploy.yaml rename to charts/user-monitoring/templates/_user-grafana-deploy.yaml index 5714c39..1f86203 100644 --- a/charts/user-monitoring/templates/user-grafana-deploy.yaml +++ b/charts/user-monitoring/templates/_user-grafana-deploy.yaml @@ -1,3 +1,4 @@ +{{- define "grafana.deploy" }} apiVersion: apps/v1 kind: Deployment metadata: @@ -110,4 +111,5 @@ spec: - emptyDir: {} name: dashboard-volume - emptyDir: {} - name: datasource-volume \ No newline at end of file + name: datasource-volume +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/user-grafana-ingress.yaml b/charts/user-monitoring/templates/_user-grafana-ingress.yaml similarity index 90% rename from charts/user-monitoring/templates/user-grafana-ingress.yaml rename to charts/user-monitoring/templates/_user-grafana-ingress.yaml index f1be4c6..d361f00 100644 --- a/charts/user-monitoring/templates/user-grafana-ingress.yaml +++ b/charts/user-monitoring/templates/_user-grafana-ingress.yaml @@ -1,3 +1,4 @@ +{{- define "grafana.ingress" }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: @@ -23,3 +24,4 @@ spec: - hosts: - {{ .Values.user }}-grafana.training.cluster.acend.ch secretName: acend-wildcard +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/user-grafana-rolebinding.yaml b/charts/user-monitoring/templates/_user-grafana-rolebinding.yaml similarity index 83% rename from charts/user-monitoring/templates/user-grafana-rolebinding.yaml rename to charts/user-monitoring/templates/_user-grafana-rolebinding.yaml index 9ae0ed3..43612b2 100644 --- a/charts/user-monitoring/templates/user-grafana-rolebinding.yaml +++ b/charts/user-monitoring/templates/_user-grafana-rolebinding.yaml @@ -1,3 +1,4 @@ +{{- define "grafana.rolebinding" }} apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: @@ -11,3 +12,4 @@ roleRef: subjects: - kind: ServiceAccount name: grafana +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/user-grafana-sa.yaml b/charts/user-monitoring/templates/_user-grafana-sa.yaml similarity index 71% rename from charts/user-monitoring/templates/user-grafana-sa.yaml rename to charts/user-monitoring/templates/_user-grafana-sa.yaml index 480ae36..54ce82d 100644 --- a/charts/user-monitoring/templates/user-grafana-sa.yaml +++ b/charts/user-monitoring/templates/_user-grafana-sa.yaml @@ -1,6 +1,8 @@ +{{- define "grafana.sa" }} apiVersion: v1 kind: ServiceAccount metadata: labels: app.kubernetes.io/name: grafana name: grafana +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/user-grafana-svc.yaml b/charts/user-monitoring/templates/_user-grafana-svc.yaml similarity index 82% rename from charts/user-monitoring/templates/user-grafana-svc.yaml rename to charts/user-monitoring/templates/_user-grafana-svc.yaml index 3f7e113..043dd29 100644 --- a/charts/user-monitoring/templates/user-grafana-svc.yaml +++ b/charts/user-monitoring/templates/_user-grafana-svc.yaml @@ -1,3 +1,4 @@ +{{- define "grafana.svc" }} apiVersion: v1 kind: Service metadata: @@ -13,3 +14,4 @@ spec: selector: app.kubernetes.io/name: grafana type: ClusterIP +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/user-prom-ingress.yaml b/charts/user-monitoring/templates/_user-prom-ingress.yaml similarity index 90% rename from charts/user-monitoring/templates/user-prom-ingress.yaml rename to charts/user-monitoring/templates/_user-prom-ingress.yaml index e47d8ff..c9d1548 100644 --- a/charts/user-monitoring/templates/user-prom-ingress.yaml +++ b/charts/user-monitoring/templates/_user-prom-ingress.yaml @@ -1,3 +1,4 @@ +{{- define "prometheus.ingress" }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: @@ -25,3 +26,4 @@ spec: - hosts: - {{ .Values.user }}-prometheus.training.cluster.acend.ch secretName: acend-wildcard +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/user-prom-role.yaml b/charts/user-monitoring/templates/_user-prom-role.yaml similarity index 87% rename from charts/user-monitoring/templates/user-prom-role.yaml rename to charts/user-monitoring/templates/_user-prom-role.yaml index 3728082..7c80785 100644 --- a/charts/user-monitoring/templates/user-prom-role.yaml +++ b/charts/user-monitoring/templates/_user-prom-role.yaml @@ -1,3 +1,4 @@ +{{- define "prometheus.role" }} apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: @@ -20,3 +21,4 @@ rules: resources: - ingresses verbs: ["get", "list", "watch"] +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/user-prom-rolebinding.yaml b/charts/user-monitoring/templates/_user-prom-rolebinding.yaml similarity index 82% rename from charts/user-monitoring/templates/user-prom-rolebinding.yaml rename to charts/user-monitoring/templates/_user-prom-rolebinding.yaml index d9031c9..dbba82e 100644 --- a/charts/user-monitoring/templates/user-prom-rolebinding.yaml +++ b/charts/user-monitoring/templates/_user-prom-rolebinding.yaml @@ -1,3 +1,4 @@ +{{- define "prometheus.rolebinding" }} apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: @@ -11,3 +12,4 @@ roleRef: subjects: - kind: ServiceAccount name: prometheus-{{ .Values.user }} +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/user-prom-sa.yaml b/charts/user-monitoring/templates/_user-prom-sa.yaml similarity index 76% rename from charts/user-monitoring/templates/user-prom-sa.yaml rename to charts/user-monitoring/templates/_user-prom-sa.yaml index 7496030..65dfa44 100644 --- a/charts/user-monitoring/templates/user-prom-sa.yaml +++ b/charts/user-monitoring/templates/_user-prom-sa.yaml @@ -1,7 +1,8 @@ +{{- define "prometheus.sa" }} apiVersion: v1 kind: ServiceAccount metadata: labels: app.kubernetes.io/name: prometheus-{{ .Values.user }} name: prometheus-{{ .Values.user }} - +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/user-prometheus.yaml b/charts/user-monitoring/templates/_user-prometheus.yaml similarity index 89% rename from charts/user-monitoring/templates/user-prometheus.yaml rename to charts/user-monitoring/templates/_user-prometheus.yaml index f4c13b0..6e518f3 100644 --- a/charts/user-monitoring/templates/user-prometheus.yaml +++ b/charts/user-monitoring/templates/_user-prometheus.yaml @@ -1,3 +1,4 @@ +{{- define "prometheus.prometheus" }} apiVersion: monitoring.coreos.com/v1 kind: Prometheus metadata: @@ -25,3 +26,4 @@ spec: enableAdminAPI: true externalLabels: monitoring: {{ .Values.user }} +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/user-pushgateway-deploy.yaml b/charts/user-monitoring/templates/_user-pushgateway-deploy.yaml similarity index 90% rename from charts/user-monitoring/templates/user-pushgateway-deploy.yaml rename to charts/user-monitoring/templates/_user-pushgateway-deploy.yaml index cbf08bd..4e07ffd 100644 --- a/charts/user-monitoring/templates/user-pushgateway-deploy.yaml +++ b/charts/user-monitoring/templates/_user-pushgateway-deploy.yaml @@ -1,3 +1,4 @@ +{{- define "pushgateway.deploy" }} apiVersion: apps/v1 kind: Deployment metadata: @@ -28,3 +29,4 @@ spec: httpGet: path: /-/ready port: web +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/user-pushgateway-servicemonitor.yaml b/charts/user-monitoring/templates/_user-pushgateway-servicemonitor.yaml similarity index 81% rename from charts/user-monitoring/templates/user-pushgateway-servicemonitor.yaml rename to charts/user-monitoring/templates/_user-pushgateway-servicemonitor.yaml index faa424d..0239896 100644 --- a/charts/user-monitoring/templates/user-pushgateway-servicemonitor.yaml +++ b/charts/user-monitoring/templates/_user-pushgateway-servicemonitor.yaml @@ -1,3 +1,4 @@ +{{- define "pushgateway.servicemonitor" }} apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: @@ -13,3 +14,4 @@ spec: selector: matchLabels: app.kubernetes.io/name: pushgateway +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/user-pushgateway-svc.yaml b/charts/user-monitoring/templates/_user-pushgateway-svc.yaml similarity index 81% rename from charts/user-monitoring/templates/user-pushgateway-svc.yaml rename to charts/user-monitoring/templates/_user-pushgateway-svc.yaml index 697d6f2..00eff61 100644 --- a/charts/user-monitoring/templates/user-pushgateway-svc.yaml +++ b/charts/user-monitoring/templates/_user-pushgateway-svc.yaml @@ -1,3 +1,4 @@ +{{- define "pushgateway.svc" }} apiVersion: v1 kind: Service metadata: @@ -13,3 +14,4 @@ spec: selector: app.kubernetes.io/name: pushgateway type: ClusterIP +{{- end }} diff --git a/charts/user-monitoring/templates/user-thanos-query-deploy.yaml b/charts/user-monitoring/templates/_user-thanos-query-deploy.yaml similarity index 91% rename from charts/user-monitoring/templates/user-thanos-query-deploy.yaml rename to charts/user-monitoring/templates/_user-thanos-query-deploy.yaml index 4e8f1bd..3c72e4f 100644 --- a/charts/user-monitoring/templates/user-thanos-query-deploy.yaml +++ b/charts/user-monitoring/templates/_user-thanos-query-deploy.yaml @@ -1,3 +1,4 @@ +{{- define "query.deploy" }} apiVersion: apps/v1 kind: Deployment metadata: @@ -31,4 +32,5 @@ spec: - containerPort: 10902 name: http - containerPort: 10901 - name: grpc \ No newline at end of file + name: grpc +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/user-thanos-query-ingress.yaml b/charts/user-monitoring/templates/_user-thanos-query-ingress.yaml similarity index 91% rename from charts/user-monitoring/templates/user-thanos-query-ingress.yaml rename to charts/user-monitoring/templates/_user-thanos-query-ingress.yaml index e88de68..bbf8db4 100644 --- a/charts/user-monitoring/templates/user-thanos-query-ingress.yaml +++ b/charts/user-monitoring/templates/_user-thanos-query-ingress.yaml @@ -1,3 +1,4 @@ +{{- define "query.ingress" }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: @@ -25,3 +26,4 @@ spec: - hosts: - {{ .Values.user }}-thanos-query.training.cluster.acend.ch secretName: acend-wildcard +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/user-thanos-query-svc.yaml b/charts/user-monitoring/templates/_user-thanos-query-svc.yaml similarity index 83% rename from charts/user-monitoring/templates/user-thanos-query-svc.yaml rename to charts/user-monitoring/templates/_user-thanos-query-svc.yaml index 8f3f3ab..6698a30 100644 --- a/charts/user-monitoring/templates/user-thanos-query-svc.yaml +++ b/charts/user-monitoring/templates/_user-thanos-query-svc.yaml @@ -1,3 +1,4 @@ +{{- define "query.svc" }} apiVersion: v1 kind: Service metadata: @@ -13,3 +14,4 @@ spec: selector: app.kubernetes.io/name: thanos-query type: ClusterIP +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/user-thanosruler-ingress.yaml b/charts/user-monitoring/templates/_user-thanosruler-ingress.yaml similarity index 67% rename from charts/user-monitoring/templates/user-thanosruler-ingress.yaml rename to charts/user-monitoring/templates/_user-thanosruler-ingress.yaml index 1fa226a..cdc4737 100644 --- a/charts/user-monitoring/templates/user-thanosruler-ingress.yaml +++ b/charts/user-monitoring/templates/_user-thanosruler-ingress.yaml @@ -1,3 +1,4 @@ +{{- define "ruler.ingress" }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: @@ -5,11 +6,11 @@ metadata: haproxy.org/auth-secret: basic-auth haproxy.org/auth-type: basic-auth haproxy.org/auth-realm: Authentication Required - name: user1-thanos-ruler + name: {{ .Values.user }}-thanos-ruler spec: ingressClassName: haproxy rules: - - host: user1-thanos-ruler.training.cluster.acend.ch + - host: {{ .Values.user }}-thanos-ruler.training.cluster.acend.ch http: paths: - backend: @@ -21,5 +22,6 @@ spec: pathType: ImplementationSpecific tls: - hosts: - - user1-thanos-ruler.training.cluster.acend.ch + - {{ .Values.user }}-thanos-ruler.training.cluster.acend.ch secretName: acend-wildcard +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/user-thanosruler.yaml b/charts/user-monitoring/templates/_user-thanosruler.yaml similarity index 82% rename from charts/user-monitoring/templates/user-thanosruler.yaml rename to charts/user-monitoring/templates/_user-thanosruler.yaml index 3adec0b..74c3623 100644 --- a/charts/user-monitoring/templates/user-thanosruler.yaml +++ b/charts/user-monitoring/templates/_user-thanosruler.yaml @@ -1,3 +1,4 @@ +{{- define "ruler.ruler" }} apiVersion: monitoring.coreos.com/v1 kind: ThanosRuler metadata: @@ -12,4 +13,5 @@ spec: ruleSelector: {} ruleNamespaceSelector: matchLabels: - user: {{ .Values.user }} \ No newline at end of file + user: {{ .Values.user }} +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/templates/monitoring.yaml b/charts/user-monitoring/templates/monitoring.yaml new file mode 100644 index 0000000..e570970 --- /dev/null +++ b/charts/user-monitoring/templates/monitoring.yaml @@ -0,0 +1,44 @@ +# alertmanager + +{{- if .Values.alertmanager.enabled }} + {{- template "alertmanager.alertmanager" . }} +{{- end }} + +# grafana +{{- if .Values.grafana.enabled }} + {{- template "grafana.datasource" . }} + {{- template "grafana.dashboardprovider" . }} + {{- template "grafana.rolebinding" . }} + {{- template "grafana.svc" . }} + {{- template "grafana.sa" . }} + {{- template "grafana.deploy" . }} + {{- template "grafana.ingress" . }} +{{- end }} + +# prometheus +{{- if .Values.prometheus.enabled }} + {{- template "prometheus.ingress" . }} + {{- template "prometheus.prometheus" . }} + {{- template "prometheus.role" . }} + {{- template "prometheus.rolebinding" . }} + {{- template "prometheus.sa" . }} +{{- end }} + +{{- if .Values.pushgateway.enabled }} + {{- template "pushgateway.deploy" . }} + {{- template "pushgateway.servicemonitor" . }} + {{- template "pushgateway.svc" . }} +{{- end }} + +# thanos-ruler +{{- if .Values.ruler.enabled }} + {{- template "ruler.ruler" . }} + {{- template "ruler.ingress" . }} +{{- end }} + +# thanos-query +{{- if .Values.query.enabled }} + {{- template "query.deploy" . }} + {{- template "query.ingress" . }} + {{- template "query.svc" . }} +{{- end }} \ No newline at end of file diff --git a/charts/user-monitoring/values.yaml b/charts/user-monitoring/values.yaml index b60785c..a247d2d 100644 --- a/charts/user-monitoring/values.yaml +++ b/charts/user-monitoring/values.yaml @@ -1 +1,25 @@ -user: user1 \ No newline at end of file +user: user1 + +# alertmanager +alertmanager: + enabled: true + +# grafana +grafana: + enabled: true + +# prometheus +prometheus: + enabled: true + +# pushgeitwey +pushgateway: + enabled: true + +# thanos-ruler +ruler: + enabled: true + +# thanos-query +query: + enabled: true \ No newline at end of file