diff --git a/charts/uptime-kuma/Chart.yaml b/charts/uptime-kuma/Chart.yaml index 807c392..3a556a4 100644 --- a/charts/uptime-kuma/Chart.yaml +++ b/charts/uptime-kuma/Chart.yaml @@ -11,4 +11,4 @@ name: uptime-kuma sources: - https://github.com/louislam/uptime-kuma type: application -version: 2.12.2 +version: 2.13.2 diff --git a/charts/uptime-kuma/README.md b/charts/uptime-kuma/README.md index 91c1878..3bfa893 100644 --- a/charts/uptime-kuma/README.md +++ b/charts/uptime-kuma/README.md @@ -69,6 +69,7 @@ A self-hosted Monitoring tool like "Uptime-Robot". | serviceMonitor.scrapeTimeout | string | `"10s"` | Timeout if metrics can't be retrieved in given time interval | | serviceMonitor.selector | object | `{}` | Prometheus ServiceMonitor selector, only select Prometheus's with these labels (if not set, select any Prometheus) | | serviceMonitor.tlsConfig | object | `{}` | TLS configuration to use when scraping, only applicable for scheme https. | +| serviceMonitor.basicAuth | object | `{}` | BasicAuth configuration to use when scraping. | strategy.type | string | `"Recreate"` | | | tolerations | list | `[]` | | | useDeploy | bool | `true` | | diff --git a/charts/uptime-kuma/templates/servicemonitor.auth.secret.yaml b/charts/uptime-kuma/templates/servicemonitor.auth.secret.yaml new file mode 100644 index 0000000..c332bf4 --- /dev/null +++ b/charts/uptime-kuma/templates/servicemonitor.auth.secret.yaml @@ -0,0 +1,12 @@ +{{- if and .Values.serviceMonitor.enabled .Values.serviceMonitor.basicAuth }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "uptime-kuma.fullname" . }}-metrics-basic-auth + namespace: {{ default .Release.Namespace .Values.serviceMonitor.namespace }} +type: kubernetes.io/basic-auth +stringData: +{{- range $key, $value := .Values.serviceMonitor.basicAuth }} + {{ $key }}: {{ $value }} +{{- end }} +{{- end }} diff --git a/charts/uptime-kuma/templates/servicemonitor.yaml b/charts/uptime-kuma/templates/servicemonitor.yaml index a19e20e..4a98cf7 100644 --- a/charts/uptime-kuma/templates/servicemonitor.yaml +++ b/charts/uptime-kuma/templates/servicemonitor.yaml @@ -43,4 +43,12 @@ spec: metricRelabelings: {{- toYaml . | nindent 6 }} {{- end }} + {{- with .Values.serviceMonitor.basicAuth }} + basicAuth: + {{- range $key, $value := . }} + {{ $key }}: + name: {{ include "uptime-kuma.fullname" $ }}-metrics-basic-auth + key: {{ $key }} + {{- end }} + {{- end }} {{- end }} diff --git a/charts/uptime-kuma/values.yaml b/charts/uptime-kuma/values.yaml index a5ad984..a76ac6d 100644 --- a/charts/uptime-kuma/values.yaml +++ b/charts/uptime-kuma/values.yaml @@ -150,6 +150,11 @@ serviceMonitor: # -- Additional annotations to add to the ServiceMonitor annotations: {} + # -- BasicAuth credentials for scraping metrics, use API token + # basicAuth: + # # username: "" + # password: "" + # -- Use this option to set a custom DNS policy to the created deployment dnsPolicy: ""