Add support for hostAliases (#154)

Co-authored-by: Jeff Billimek <jeff@billimek.com>
This commit is contained in:
coldfire84 2020-11-14 20:10:20 +00:00 committed by GitHub
parent bf1772a44e
commit ae45a4f962
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 3 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
appVersion: 0.116.1
description: Home Assistant
name: home-assistant
version: 2.6.0
version: 2.7.0
keywords:
- home-assistant
- hass

View File

@ -68,6 +68,7 @@ The following tables lists the configurable parameters of the Home Assistant cha
| `service.publishNotReadyAddresses` | Set to true if the editors (vscode or configurator) should be reachable when home assistant does not run | `false` |
| `service.externalTrafficPolicy` | Loadbalancer externalTrafficPolicy | `` |
| `hostNetwork` | Enable hostNetwork - might be needed for discovery to work | `false` |
| `hostAliases` | Define custom entries in /etc/hosts | `[]` |
| `service.nodePort` | nodePort to listen on for the home-assistant GUI | `` |
| `ingress.enabled` | Enables Ingress | `false` |
| `ingress.annotations` | Ingress annotations | `{}` |
@ -234,7 +235,7 @@ kubectl create secret generic git-creds --from-file=id_rsa=git/k8s_id_rsa --from
## git-crypt support
When using Git sync it is possible to specify a file called `git-crypt-key` in the secret referred to in `git.secret`. When this file is present, `git-crypt unlock` will automatically be executed after the repo has been synced.
When using Git sync it is possible to specify a file called `git-crypt-key` in the secret referred to in `git.secret`. When this file is present, `git-crypt unlock` will automatically be executed after the repo has been synced.
**Note:** `git-crypt` is not installed by default in the other images! If you wish to push changes from the VS Code or Configurator containers, you will have to make sure that it is installed.

View File

@ -37,6 +37,10 @@ spec:
{{- if .Values.hostNetwork }}
hostNetwork: {{ .Values.hostNetwork }}
dnsPolicy: ClusterFirstWithHostNet
{{- end }}
{{- if .Values.hostAliases }}
hostAliases:
{{ toYaml .Values.hostAliases | indent 8 }}
{{- end }}
initContainers:
{{- if .Values.git.enabled }}
@ -56,7 +60,7 @@ spec:
then
git -C "{{ .Values.git.syncPath }}" pull || true;
else
if [ "$(ls -A {{ .Values.git.syncPath }})" ];
if [ "$(ls -A {{ .Values.git.syncPath }})" ];
then
git clone --depth 2 "{{ .Values.git.repo }}" /tmp/repo;
cp -rf /tmp/repo/.git "{{ .Values.git.syncPath }}";

View File

@ -65,6 +65,14 @@ ingress:
hostNetwork: false
hostAliases: []
# Use hostAliases to add custom entries to /etc/hosts - mapping IP addresses to hostnames.
# ref: https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
# - ip: "192.168.1.100"
# hostnames:
# - "example.com"
# - "www.example.com"
persistence:
enabled: true
## home-assistant data Persistent Volume Storage Class