Files
auricom-home-cluster/cluster/apps/home-automation/home-assistant/helm-release.yaml

143 lines
3.9 KiB
YAML

---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: home-assistant
namespace: home-automation
spec:
interval: 5m
chart:
spec:
# renovate: registryUrl=https://k8s-at-home.com/charts/
chart: home-assistant
version: 11.2.0
sourceRef:
kind: HelmRepository
name: k8s-at-home-charts
namespace: flux-system
interval: 5m
values:
image:
repository: ghcr.io/home-assistant/home-assistant
tag: 2021.12.3
env:
TZ: "Europe/Paris"
HASS_SECRET_URL: https://home-assistant.${SECRET_CLUSTER_DOMAIN}
HASS_SECRET_LATITUDE: ${SECRET_HASS_LATITUDE}
HASS_SECRET_LONGITUDE: ${SECRET_HASS_LONGITUDE}
HASS_SECRET_ELEVATION: ${SECRET_HASS_ELEVATION}
HASS_SECRET_MQTT_USERNAME: ${SECRET_MQTT_USERNAME}
HASS_SECRET_MQTT_PASSWORD: ${SECRET_MQTT_PASSWORD}
HASS_SECRET_DB_URL: ${SECRET_HASS_DB_URL}
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
securityContext:
privileged: true
service:
main:
annotations:
prometheus.io/probe: "true"
prometheus.io/protocol: tcp
type: LoadBalancer
externalIPs:
- ${CLUSTER_LB_HASS}
externalTrafficPolicy: Local
ingress:
main:
enabled: true
ingressClassName: "nginx"
# annotations:
# traefik.ingress.kubernetes.io/router.entrypoints: "websecure"
hosts:
- host: "hass.${SECRET_CLUSTER_DOMAIN}"
paths:
- path: /
pathType: Prefix
- host: "home-assistant.${SECRET_CLUSTER_DOMAIN}"
paths:
- path: /
pathType: Prefix
tls:
- hosts:
- "hass.${SECRET_CLUSTER_DOMAIN}"
- "home-assistant.${SECRET_CLUSTER_DOMAIN}"
secretName: "${SECRET_CLUSTER_CERTIFICATE_DEFAULT}"
prometheus:
serviceMonitor:
enabled: false
probes:
liveness:
enabled: false
readiness:
enabled: false
startup:
enabled: false
postgresql:
enabled: false
persistence:
config:
enabled: true
existingClaim: hass-config
usb:
enabled: true
type: hostPath
hostPath: /dev/serial/by-id/usb-Arduino__www.arduino.cc__0042_5503731323735171A241-if00
hostPathType: CharDevice
mountPath: /dev/ttyUSB0
addons:
codeserver:
enabled: true
image:
repository: ghcr.io/k8s-at-home/code-server
tag: v3.12.0
workingDir: "/config"
args:
- --auth
- "none"
- --user-data-dir
- "/config/.vscode"
- --extensions-dir
- "/config/.vscode"
ingress:
enabled: true
ingressClassName: "nginx"
annotations:
nginx.ingress.kubernetes.io/auth-url: "http://authelia.networking.svc.cluster.local/api/verify"
nginx.ingress.kubernetes.io/auth-signin: "https://login.${SECRET_CLUSTER_DOMAIN}"
# traefik.ingress.kubernetes.io/router.entrypoints: "websecure"
# traefik.ingress.kubernetes.io/router.middlewares: networking-forward-auth@kubernetescrd
hosts:
- host: "hass-config.${SECRET_CLUSTER_DOMAIN}"
paths:
- path: /
pathType: Prefix
tls:
- hosts:
- "hass-config.${SECRET_CLUSTER_DOMAIN}"
secretName: "${SECRET_CLUSTER_CERTIFICATE_DEFAULT}"
volumeMounts:
- name: config
mountPath: /config
resources:
requests:
cpu: 500m
memory: 1000Mi
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- { key: "feature.node.kubernetes.io/custom-rflink", operator: In, values: ["true"] }