[antennas] New Chart (#34)

* [antennas] New Chart

* [antennas] Add options for host networking

* [antennas] Version 1.0.0

* [antennas] Fix lint issues
This commit is contained in:
2022-01-07 17:56:07 +00:00
committed by GitHub
parent e6f88c5ddd
commit 0f3d646141
11 changed files with 439 additions and 0 deletions

View File

@@ -0,0 +1 @@
{{- include "common.notes.defaultNotes" . -}}

View File

@@ -0,0 +1,18 @@
{{/* Make sure all variables are set properly */}}
{{- include "common.values.setup" . }}
{{/* Append the hardcoded settings */}}
{{- define "antennas.harcodedValues" -}}
{{/* Append the configMap volume to the volumes */}}
persistence:
antennas-config:
enabled: true
type: "configMap"
name: "{{ include "common.names.fullname" . }}-config"
mountPath: "/antennas/config/config.yml"
subPath: "config.yml"
{{- end -}}
{{- $_ := mergeOverwrite .Values (include "antennas.harcodedValues" . | fromYaml) -}}
{{ include "common.all" . }}

View File

@@ -0,0 +1,21 @@
{{- $values := .Values.service -}}
{{- $serviceName := include "common.names.fullname" . -}}
{{- if and (hasKey $values "nameOverride") $values.nameOverride -}}
{{- $serviceName = printf "%v-%v" $serviceName $values.nameOverride -}}
{{ end -}}
{{- $defaultAntennasURL := printf "http://%v:%v" $serviceName .Values.service.main.ports.http.port -}}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.names.fullname" . }}-config
labels:
{{- include "common.labels" . | nindent 4 }}
data:
config.yml: |-
tvheadend_url: {{ required "A TVHeadend URL is required!" .Values.antennas.tvheadend_url }}
antennas_url: {{ .Values.antennas.antennas_url | default $defaultAntennasURL }}
tuner_count: {{ .Values.antennas.tuner_count }}
{{ if .Values.antennas.stream_url }}
stream_url: {{ .Values.antennas.stream_url }}
{{ end }}