prometheus
This commit is contained in:
1 parent
a74bf61b18
commit
147787d4f6
1 file changed
+85
-80
@@ -1,81 +1,86 @@
|
||||
# {{- $prometheusHost := "monitor.core" -}}
|
||||
# {{ if .Values.global.tls.enabled }}
|
||||
# ---
|
||||
# apiVersion: cert-manager.io/v1
|
||||
# kind: Certificate
|
||||
# metadata:
|
||||
# name: "tls-{{$prometheusHost}}.{{.Values.global.domain}}"
|
||||
# namespace: {{ .namespace }}
|
||||
# spec:
|
||||
# secretName: "tls-{{$prometheusHost}}.{{.Values.global.domain}}"
|
||||
# issuerRef:
|
||||
# kind: ClusterIssuer
|
||||
# name: "{{ .Values.global.tls.issuer }}"
|
||||
# commonName: "{{$prometheusHost}}.{{.Values.global.domain}}"
|
||||
# dnsNames:
|
||||
# - "{{$prometheusHost}}.{{.Values.global.domain}}"
|
||||
# {{ end }}
|
||||
{{- $prometheusHost := "monitor.core" -}}
|
||||
{{- $prometheusNamespace := "monitor" -}}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: {{ $prometheusNamespace }}
|
||||
|
||||
# ---
|
||||
# apiVersion: argoproj.io/v1alpha1
|
||||
# kind: Application
|
||||
# metadata:
|
||||
# name: "monitoring-prometheus"
|
||||
# namespace: "{{ .Release.Namespace }}"
|
||||
# spec:
|
||||
# project: meta-infrastructure
|
||||
# source:
|
||||
# chart: prometheus
|
||||
# repoURL: "https://prometheus-community.github.io/helm-charts"
|
||||
# targetRevision: "{{ .Values.chartVersions.prometheus }}"
|
||||
# helm:
|
||||
# releaseName: prometheus
|
||||
# values: |-
|
||||
# alertmanager:
|
||||
# persistence:
|
||||
# enabled: true
|
||||
# size: 8Gi
|
||||
# storageClass: "{{ .Values.global.nfsStorageClass }}"
|
||||
# ingress:
|
||||
# enabled: true
|
||||
# ingressClassName: traefik
|
||||
# annotations: {}
|
||||
# hosts:
|
||||
# - host: "{{$prometheusHost}}.{{ .Values.global.domain }}"
|
||||
# paths:
|
||||
# - path: /alertmanager
|
||||
# pathType: Prefix
|
||||
# {{ if .Values.global.tls.enabled }}
|
||||
# tls:
|
||||
# - secretName: "tls-{{$prometheusHost}}.{{.Values.global.domain}}"
|
||||
# hosts:
|
||||
# - "{{$prometheusHost}}.{{ .Values.global.domain }}"
|
||||
# {{ end }}
|
||||
# server:
|
||||
# baseURL: "{{$prometheusHost}}.{{ .Values.global.domain }}"
|
||||
# persistentVolume:
|
||||
# enabled: true
|
||||
# size: 8Gi
|
||||
# storageClass: "{{ .Values.global.nfsStorageClass }}"
|
||||
# ingress:
|
||||
# enabled: true
|
||||
# ingressClassName: traefik
|
||||
# annotations: {}
|
||||
# hosts:
|
||||
# - "{{$prometheusHost}}.{{ .Values.global.domain }}"
|
||||
# path: /prometheus
|
||||
# pathType: Prefix
|
||||
# {{ if .Values.global.tls.enabled }}
|
||||
# tls:
|
||||
# - secretName: "tls-{{$prometheusHost}}.{{.Values.global.domain}}"
|
||||
# hosts:
|
||||
# - "{{$prometheusHost}}.{{ .Values.global.domain }}"
|
||||
# {{ end }}
|
||||
# destination:
|
||||
# server: https://kubernetes.default.svc
|
||||
# namespace: "monitoring"
|
||||
# syncPolicy:
|
||||
# automated:
|
||||
# selfHeal: true
|
||||
# syncOptions:
|
||||
# - CreateNamespace=true
|
||||
{{ if .Values.global.tls.enabled }}
|
||||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: "tls-{{$prometheusHost}}.{{.Values.global.domain}}"
|
||||
namespace: "{{ $prometheusNamespace }}"
|
||||
spec:
|
||||
secretName: "tls-{{$prometheusHost}}.{{.Values.global.domain}}"
|
||||
issuerRef:
|
||||
kind: ClusterIssuer
|
||||
name: "{{ .Values.global.tls.issuer }}"
|
||||
commonName: "{{$prometheusHost}}.{{.Values.global.domain}}"
|
||||
dnsNames:
|
||||
- "{{$prometheusHost}}.{{.Values.global.domain}}"
|
||||
{{ end }}
|
||||
|
||||
---
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: "monitoring-prometheus"
|
||||
namespace: "{{ .Release.Namespace }}"
|
||||
spec:
|
||||
project: meta-infrastructure
|
||||
source:
|
||||
chart: prometheus
|
||||
repoURL: "https://prometheus-community.github.io/helm-charts"
|
||||
targetRevision: "{{ .Values.chartVersions.prometheus }}"
|
||||
helm:
|
||||
releaseName: prometheus
|
||||
values: |-
|
||||
alertmanager:
|
||||
persistence:
|
||||
enabled: true
|
||||
size: 8Gi
|
||||
storageClass: "{{ .Values.global.nfsStorageClass }}"
|
||||
ingress:
|
||||
enabled: true
|
||||
ingressClassName: traefik
|
||||
annotations: {}
|
||||
hosts:
|
||||
- host: "{{$prometheusHost}}.{{ .Values.global.domain }}"
|
||||
paths:
|
||||
- path: /alertmanager
|
||||
pathType: Prefix
|
||||
{{ if .Values.global.tls.enabled }}
|
||||
tls:
|
||||
- secretName: "tls-{{$prometheusHost}}.{{.Values.global.domain}}"
|
||||
hosts:
|
||||
- "{{$prometheusHost}}.{{ .Values.global.domain }}"
|
||||
{{ end }}
|
||||
server:
|
||||
baseURL: "{{$prometheusHost}}.{{ .Values.global.domain }}"
|
||||
persistentVolume:
|
||||
enabled: true
|
||||
size: 8Gi
|
||||
storageClass: "{{ .Values.global.nfsStorageClass }}"
|
||||
ingress:
|
||||
enabled: true
|
||||
ingressClassName: traefik
|
||||
annotations: {}
|
||||
hosts:
|
||||
- "{{$prometheusHost}}.{{ .Values.global.domain }}"
|
||||
path: /prometheus
|
||||
pathType: Prefix
|
||||
{{ if .Values.global.tls.enabled }}
|
||||
tls:
|
||||
- secretName: "tls-{{$prometheusHost}}.{{.Values.global.domain}}"
|
||||
hosts:
|
||||
- "{{$prometheusHost}}.{{ .Values.global.domain }}"
|
||||
{{ end }}
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: {{ $prometheusNamespace }}
|
||||
syncPolicy:
|
||||
automated:
|
||||
selfHeal: true
|
||||
Reference in new issue
Block a user