Release version 0.2.0
This commit is contained in:
parent
d6a569fa0a
commit
68df02b47a
@ -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
|
||||
|
@ -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 }}
|
@ -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 }}
|
@ -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 }}
|
@ -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 }}
|
@ -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 }}
|
@ -1,3 +1,4 @@
|
||||
{{- define "grafana.deploy" }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
@ -111,3 +112,4 @@ spec:
|
||||
name: dashboard-volume
|
||||
- emptyDir: {}
|
||||
name: datasource-volume
|
||||
{{- end }}
|
@ -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 }}
|
@ -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 }}
|
@ -1,6 +1,8 @@
|
||||
{{- define "grafana.sa" }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: grafana
|
||||
name: grafana
|
||||
{{- end }}
|
@ -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 }}
|
@ -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 }}
|
@ -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 }}
|
@ -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 }}
|
@ -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 }}
|
@ -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 }}
|
@ -1,3 +1,4 @@
|
||||
{{- define "pushgateway.deploy" }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
@ -28,3 +29,4 @@ spec:
|
||||
httpGet:
|
||||
path: /-/ready
|
||||
port: web
|
||||
{{- end }}
|
@ -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 }}
|
@ -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 }}
|
@ -1,3 +1,4 @@
|
||||
{{- define "query.deploy" }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
@ -32,3 +33,4 @@ spec:
|
||||
name: http
|
||||
- containerPort: 10901
|
||||
name: grpc
|
||||
{{- end }}
|
@ -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 }}
|
@ -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 }}
|
@ -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 }}
|
@ -1,3 +1,4 @@
|
||||
{{- define "ruler.ruler" }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ThanosRuler
|
||||
metadata:
|
||||
@ -13,3 +14,4 @@ spec:
|
||||
ruleNamespaceSelector:
|
||||
matchLabels:
|
||||
user: {{ .Values.user }}
|
||||
{{- end }}
|
44
charts/user-monitoring/templates/monitoring.yaml
Normal file
44
charts/user-monitoring/templates/monitoring.yaml
Normal file
@ -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 }}
|
@ -1 +1,25 @@
|
||||
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
|
Loading…
x
Reference in New Issue
Block a user