mirror of
https://github.com/shadoll/helm-charts.git
synced 2026-08-28 03:27:08 +00:00
chore: Update home-assistant-dev chart version to 0.1.22-dev and enhance init container for HTTP configuration
This commit is contained in:
@@ -4,7 +4,7 @@ description: Home Assistant development build - wraps home-assistant chart with
|
|||||||
type: application
|
type: application
|
||||||
annotations:
|
annotations:
|
||||||
version-source: dockerhub-dev:homeassistant/home-assistant:^[0-9]+\.[0-9]+\.[0-9]+\.dev[0-9]+$
|
version-source: dockerhub-dev:homeassistant/home-assistant:^[0-9]+\.[0-9]+\.[0-9]+\.dev[0-9]+$
|
||||||
version: 0.1.21-dev
|
version: 0.1.22-dev
|
||||||
appVersion: "2026.5.0.dev202603300315"
|
appVersion: "2026.5.0.dev202603300315"
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: home-assistant
|
- name: home-assistant
|
||||||
|
|||||||
@@ -34,24 +34,35 @@ spec:
|
|||||||
- |
|
- |
|
||||||
# Clean up old log files from PVC
|
# Clean up old log files from PVC
|
||||||
rm -f /config/home-assistant.log /config/home-assistant.log.1
|
rm -f /config/home-assistant.log /config/home-assistant.log.1
|
||||||
|
# Fix any corrupted \!include lines in configuration.yaml
|
||||||
|
if [ -f /config/configuration.yaml ]; then
|
||||||
|
sed -i 's/\\!/!/g' /config/configuration.yaml
|
||||||
|
fi
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config
|
- name: config
|
||||||
mountPath: /config
|
mountPath: /config
|
||||||
{{- if .Values.http.enabled }}
|
{{- if .Values.http.enabled }}
|
||||||
- name: init-http
|
- name: init-http
|
||||||
image: busybox:latest
|
image: busybox:latest
|
||||||
|
env:
|
||||||
|
- name: POD_IP
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: status.podIP
|
||||||
command:
|
command:
|
||||||
- /bin/sh
|
- /bin/sh
|
||||||
- -c
|
- -c
|
||||||
- |
|
- |
|
||||||
# Build http.yaml — auto-detect pod/service CIDRs from environment
|
# Auto-detect pod and service CIDRs
|
||||||
POD_CIDR=$(echo $KUBERNETES_SERVICE_HOST | sed 's/\.[0-9]*$/\.0\/16/')
|
SVC_CIDR=$(echo $KUBERNETES_SERVICE_HOST | sed 's/\.[0-9]*$/\.0\/16/')
|
||||||
|
POD_CIDR=$(echo $POD_IP | sed 's/\.[0-9]*$/\.0\/16/')
|
||||||
cat > /config/http.yaml << EOF
|
cat > /config/http.yaml << EOF
|
||||||
server_port: {{ .Values.http.server_port }}
|
server_port: {{ .Values.http.server_port }}
|
||||||
ip_ban_enabled: {{ .Values.http.ip_ban_enabled }}
|
ip_ban_enabled: {{ .Values.http.ip_ban_enabled }}
|
||||||
login_attempts_threshold: {{ .Values.http.login_attempts_threshold }}
|
login_attempts_threshold: {{ .Values.http.login_attempts_threshold }}
|
||||||
use_x_forwarded_for: true
|
use_x_forwarded_for: true
|
||||||
trusted_proxies:
|
trusted_proxies:
|
||||||
|
- ${SVC_CIDR}
|
||||||
- ${POD_CIDR}
|
- ${POD_CIDR}
|
||||||
- 127.0.0.1
|
- 127.0.0.1
|
||||||
- "::1"
|
- "::1"
|
||||||
|
|||||||
Reference in New Issue
Block a user