Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/home-assistant] add support for additionalPorts and vseditor #21482

Merged
merged 2 commits into from
Mar 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions stable/home-assistant/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v1
appVersion: 0.103.3
appVersion: 0.106.6
description: Home Assistant
name: home-assistant
version: 0.12.1
version: 0.12.2
keywords:
- home-assistant
- hass
Expand Down
2 changes: 2 additions & 0 deletions stable/home-assistant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ The following tables lists the configurable parameters of the Home Assistant cha
| `service.type` | Kubernetes service type for the home-assistant GUI | `ClusterIP` |
| `service.port` | Kubernetes port where the home-assistant GUI is exposed| `8123` |
| `service.portName` | Kubernetes port name where the home-assistant GUI is exposed | `api` |
| `service.additionalPorts` | Add additional ports exposed by the home assistant container integrations. Example homematic needs to expose a proxy port | `{}` |
| `service.annotations` | Service annotations for the home-assistant GUI | `{}` |
| `service.clusterIP` | Cluster IP for the home-assistant GUI | `` |
| `service.externalIPs` | External IPs for the home-assistant GUI | `[]` |
| `service.loadBalancerIP` | Loadbalancer IP for the home-assistant GUI | `` |
| `service.loadBalancerSourceRanges` | Loadbalancer client IP restriction range for the home-assistant GUI | `[]` |
| `service.publishNotReadyAddresses` | Set to true if the editors (vscode or configurator) should be reachable when home assistant does not run | `false` |
| `hostNetwork` | Enable hostNetwork - might be needed for discovery to work | `false` |
| `service.nodePort` | nodePort to listen on for the home-assistant GUI | `` |
| `ingress.enabled` | Enables Ingress | `false` |
Expand Down
11 changes: 8 additions & 3 deletions stable/home-assistant/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ spec:
- name: api
containerPort: {{ .Values.service.port }}
protocol: TCP
{{- range .Values.service.additionalPorts }}
- name: {{ .name }}
containerPort: {{ .targetPort }}
{{- end }}
{{- if .Values.probes.liveness.enabled }}
livenessProbe:
httpGet:
Expand Down Expand Up @@ -223,10 +227,11 @@ spec:
imagePullPolicy: {{ .Values.vscode.image.pullPolicy }}
workingDir: {{ .Values.vscode.hassConfig }}
args:
- --allow-http
- --port={{ .Values.vscode.service.port }}
{{- if not (.Values.vscode.password) }}
- --no-auth
{{- if (.Values.vscode.password) }}
- --allow-http #Not supported without password
{{- else }}
- --auth=none
{{- end }}
{{- if .Values.vscode.vscodePath }}
- --extensions-dir={{ .Values.vscode.vscodePath }}
Expand Down
4 changes: 4 additions & 0 deletions stable/home-assistant/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ spec:
externalIPs:
{{ toYaml .Values.service.externalIPs | indent 4 }}
{{- end }}
publishNotReadyAddresses: {{ .Values.service.publishNotReadyAddresses }}
ports:
- name: {{ .Values.service.portName }}
port: {{ .Values.service.port }}
Expand All @@ -61,6 +62,9 @@ spec:
{{ if (and (eq .Values.vscode.service.type "NodePort") (not (empty .Values.vscode.service.nodePort))) }}
nodePort: {{.Values.vscode.service.nodePort}}
{{ end }}
{{- end }}
{{- if .Values.service.additionalPorts }}
{{- .Values.service.additionalPorts | toYaml | indent 4 }}
{{- end }}
selector:
app.kubernetes.io/name: {{ include "home-assistant.name" . }}
Expand Down
5 changes: 5 additions & 0 deletions stable/home-assistant/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ service:
type: ClusterIP
port: 8123
portName: api
additionalPorts: {}
# - name: homematicproxy
# port: 2001
# targetPort: 2001
annotations: {}
labels: {}
clusterIP: ""
Expand All @@ -44,6 +48,7 @@ service:
loadBalancerIP: ""
loadBalancerSourceRanges: []
# nodePort: 30000
publishNotReadyAddresses: false

ingress:
enabled: false
Expand Down