Skip to content

Commit

Permalink
add support for additionalPorts and vseditor (helm#21482)
Browse files Browse the repository at this point in the history
- support additionalPorts
- vseditor changed logic for no passwords
- support to enable access to editor when home assistant does not start

Signed-off-by: Vegetto <git@angelnu.com>
  • Loading branch information
angelnu authored Mar 17, 2020
1 parent 15b6b53 commit dd8536d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
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

0 comments on commit dd8536d

Please sign in to comment.