fix(home-assistant): add podmonitor (with given bearerTokenSecret)

This commit is contained in:
WrenIX 2024-10-16 19:10:01 +02:00
parent e22b40e8e4
commit 48c65fe19f
Signed by: wrenix
GPG key ID: 7AFDB012974B1BB5
6 changed files with 47 additions and 5 deletions

View file

@ -2,7 +2,7 @@ apiVersion: v2
name: home-assistant name: home-assistant
description: Home Assistant with tooling to run on an k3s pi description: Home Assistant with tooling to run on an k3s pi
type: application type: application
version: 0.1.31 version: 0.2.0
# renovate: image=ghcr.io/home-assistant/home-assistant # renovate: image=ghcr.io/home-assistant/home-assistant
appVersion: "2024.10.2" appVersion: "2024.10.2"
maintainers: maintainers:

View file

@ -2,7 +2,7 @@
= home-assistant = home-assistant
image::https://img.shields.io/badge/Version-0.1.31-informational?style=flat-square[Version: 0.1.31] image::https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square[Version: 0.2.0]
image::https://img.shields.io/badge/Version-application-informational?style=flat-square[Type: application] image::https://img.shields.io/badge/Version-application-informational?style=flat-square[Type: application]
image::https://img.shields.io/badge/AppVersion-2024.10.2-informational?style=flat-square[AppVersion: 2024.10.2] image::https://img.shields.io/badge/AppVersion-2024.10.2-informational?style=flat-square[AppVersion: 2024.10.2]
== Maintainers == Maintainers
@ -282,6 +282,21 @@ helm uninstall home-assistant-release
| `{}` | `{}`
| |
| prometheus.podmonitor.bearerTokenSecret
| object
| `{}`
|
| prometheus.podmonitor.enabled
| bool
| `false`
|
| prometheus.podmonitor.labels
| object
| `{}`
|
| readinessProbe.httpGet.path | readinessProbe.httpGet.path
| string | string
| `"/"` | `"/"`

View file

@ -11,7 +11,7 @@ spec:
selector: selector:
matchLabels: matchLabels:
{{- include "home-assistant.selectorLabels" . | nindent 6 }} {{- include "home-assistant.selectorLabels" . | nindent 6 }}
type: main app.kubernetes.io/component: home-assistant
template: template:
metadata: metadata:
{{- with .Values.podAnnotations }} {{- with .Values.podAnnotations }}
@ -20,7 +20,7 @@ spec:
{{- end }} {{- end }}
labels: labels:
{{- include "home-assistant.labels" . | nindent 8 }} {{- include "home-assistant.labels" . | nindent 8 }}
type: main app.kubernetes.io/component: home-assistant
{{- with .Values.podLabels }} {{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}

View file

@ -0,0 +1,21 @@
{{- if .Values.prometheus.podmonitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ include "home-assistant.fullname" . }}
labels:
{{- include "home-assistant.labels" . | nindent 4 }}
{{- with .Values.prometheus.podmonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
{{- include "home-assistant.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: home-assistant
podMetricsEndpoints:
- port: http
path: "/api/prometheus"
bearerTokenSecret:
{{- toYaml .Values.prometheus.podmonitor.bearerTokenSecret | nindent 8 }}
{{- end }}

View file

@ -8,7 +8,7 @@ spec:
type: {{ .Values.service.type }} type: {{ .Values.service.type }}
selector: selector:
{{- include "home-assistant.selectorLabels" . | nindent 4 }} {{- include "home-assistant.selectorLabels" . | nindent 4 }}
type: main app.kubernetes.io/component: home-assistant
ports: ports:
- port: {{ .Values.service.port }} - port: {{ .Values.service.port }}
targetPort: http targetPort: http

View file

@ -61,6 +61,12 @@ zigbee2mqtt:
serial: serial:
port: /dev/ttyACM0 port: /dev/ttyACM0
prometheus:
podmonitor:
enabled: false
labels: {}
bearerTokenSecret: {}
persistence: persistence:
enabled: false enabled: false
annotations: {} annotations: {}