apiVersion: apps/v1 kind: Deployment metadata: name: homeassistant namespace: {{ homeassistant_namespace }} labels: app.kubernetes.io/name: homeassistant app.kubernetes.io/instance: {{ homeassistant_release_name }} spec: replicas: {{ homeassistant_replica_count }} selector: matchLabels: app.kubernetes.io/name: homeassistant app.kubernetes.io/instance: {{ homeassistant_release_name }} template: metadata: labels: app.kubernetes.io/name: homeassistant app.kubernetes.io/instance: {{ homeassistant_release_name }} spec: securityContext: runAsUser: 2000 runAsGroup: 2000 fsGroup: 2000 containers: - name: homeassistant image: {{ homeassistant_home_assistant.repository }}:{{ homeassistant_home_assistant.tag }} imagePullPolicy: {{ homeassistant_home_assistant.pullPolicy }} ports: - containerPort: 8123 name: http volumeMounts: - name: config mountPath: /config - name: config-map mountPath: /config/configuration.yaml subPath: configuration.yaml readOnly: true resources: limits: cpu: {{ homeassistant_resources.limits.cpu }} memory: {{ homeassistant_resources.limits.memory }} requests: cpu: {{ homeassistant_resources.requests.cpu }} memory: {{ homeassistant_resources.requests.memory }} securityContext: privileged: true volumes: - name: config persistentVolumeClaim: claimName: homeassistant-pvc - name: config-map configMap: name: homeassistant-config nodeSelector: {} tolerations: [] affinity: {}