From 92935198895b18811999c07c5fac524643d258f0 Mon Sep 17 00:00:00 2001 From: Hampus Carlsson Date: Tue, 13 Aug 2024 14:32:57 +0200 Subject: [PATCH] Move birdnet related values into birdnet.* --- .../templates/deployments/birdnet.yaml | 4 +- .../templates/ingresses/birdnet.yaml | 16 ++--- charts/birdnet-go/templates/pvcs/birdnet.yaml | 20 +++--- charts/birdnet-go/values.yaml | 72 +++++++++---------- 4 files changed, 56 insertions(+), 56 deletions(-) diff --git a/charts/birdnet-go/templates/deployments/birdnet.yaml b/charts/birdnet-go/templates/deployments/birdnet.yaml index a396bbc..2197649 100644 --- a/charts/birdnet-go/templates/deployments/birdnet.yaml +++ b/charts/birdnet-go/templates/deployments/birdnet.yaml @@ -52,9 +52,9 @@ spec: port: http volumes: - name: all - {{- if .Values.persistentVolumeClaim.enabled }} + {{- if .Values.birdnet.persistentVolumeClaim.enabled }} persistentVolumeClaim: - claimName: {{ if .Values.persistentVolumeClaim.existingClaim }}{{ .Values.persistentVolumeClaim.existingClaim }}{{- else }}{{ template "birdnet-go.fullname" . }}{{- end }} + claimName: {{ if .Values.birdnet.persistentVolumeClaim.existingClaim }}{{ .Values.birdnet.persistentVolumeClaim.existingClaim }}{{- else }}{{ template "birdnet-go.fullname" . }}{{- end }} {{- else }} emptyDir: {} {{- end }} diff --git a/charts/birdnet-go/templates/ingresses/birdnet.yaml b/charts/birdnet-go/templates/ingresses/birdnet.yaml index 0276350..beab6ff 100644 --- a/charts/birdnet-go/templates/ingresses/birdnet.yaml +++ b/charts/birdnet-go/templates/ingresses/birdnet.yaml @@ -1,5 +1,5 @@ -{{- if .Values.ingress.enabled -}} -{{- $ingressPath := .Values.ingress.path -}} +{{- if .Values.birdnet.ingress.enabled -}} +{{- $ingressPath := .Values.birdnet.ingress.path -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: @@ -9,20 +9,20 @@ metadata: chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} - {{- with .Values.ingress.annotations }} + {{- with .Values.birdnet.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: -{{- if .Values.ingress.ingressClassName }} - ingressClassName: {{ .Values.ingress.ingressClassName }} +{{- if .Values.birdnet.ingress.ingressClassName }} + ingressClassName: {{ .Values.birdnet.ingress.ingressClassName }} {{- end }} -{{- if .Values.ingress.tls }} +{{- if .Values.birdnet.ingress.tls }} tls: -{{ toYaml .Values.ingress.tls | indent 4 }} +{{ toYaml .Values.birdnet.ingress.tls | indent 4 }} {{- end }} rules: - {{- range .Values.ingress.hosts }} + {{- range .Values.birdnet.ingress.hosts }} - host: {{ . | quote }} http: paths: diff --git a/charts/birdnet-go/templates/pvcs/birdnet.yaml b/charts/birdnet-go/templates/pvcs/birdnet.yaml index 8dbaf3a..45180bc 100644 --- a/charts/birdnet-go/templates/pvcs/birdnet.yaml +++ b/charts/birdnet-go/templates/pvcs/birdnet.yaml @@ -1,31 +1,31 @@ -{{- if .Values.persistentVolumeClaim.enabled -}} -{{- if not .Values.persistentVolumeClaim.existingClaim -}} +{{- if .Values.birdnet.persistentVolumeClaim.enabled -}} +{{- if not .Values.birdnet.persistentVolumeClaim.existingClaim -}} apiVersion: "v1" kind: "PersistentVolumeClaim" metadata: -{{- if .Values.persistentVolumeClaim.annotations }} +{{- if .Values.birdnet.persistentVolumeClaim.annotations }} annotations: -{{ toYaml .Values.persistentVolumeClaim.annotations | indent 4 }} +{{ toYaml .Values.birdnet.persistentVolumeClaim.annotations | indent 4 }} {{- end }} labels: app: {{ template "birdnet-go.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version }} - component: "{{ .Values.persistentVolumeClaim.name }}" + component: "{{ .Values.birdnet.persistentVolumeClaim.name }}" heritage: {{ .Release.Service }} release: {{ .Release.Name }} name: {{ template "birdnet-go.fullname" . }} spec: accessModes: -{{ toYaml .Values.persistentVolumeClaim.accessModes | indent 4 }} -{{- if .Values.persistentVolumeClaim.storageClass }} -{{- if (eq "-" .Values.persistentVolumeClaim.storageClass) }} +{{ toYaml .Values.birdnet.persistentVolumeClaim.accessModes | indent 4 }} +{{- if .Values.birdnet.persistentVolumeClaim.storageClass }} +{{- if (eq "-" .Values.birdnet.persistentVolumeClaim.storageClass) }} storageClassName: "" {{- else }} - storageClassName: "{{ .Values.persistentVolumeClaim.storageClass }}" + storageClassName: "{{ .Values.birdnet.persistentVolumeClaim.storageClass }}" {{- end }} {{- end }} resources: requests: - storage: "{{ .Values.persistentVolumeClaim.size }}" + storage: "{{ .Values.birdnet.persistentVolumeClaim.size }}" {{- end -}} {{- end -}} \ No newline at end of file diff --git a/charts/birdnet-go/values.yaml b/charts/birdnet-go/values.yaml index 01f3bd9..f536e64 100644 --- a/charts/birdnet-go/values.yaml +++ b/charts/birdnet-go/values.yaml @@ -13,6 +13,42 @@ birdnet: image: ghcr.io/tphakala/birdnet-go:latest config: {} + service: + type: ClusterIP + port: 80 + + persistentVolumeClaim: + # -- set to true to use pvc + enabled: false + + # -- specify an existing `PersistentVolumeClaim` to use + # existingClaim: "" + + # -- Annotations for the `PersitentVolumeClaim` + annotations: {} + + accessModes: + - ReadWriteOnce + + # -- volume claim size + size: "500Mi" + + ingress: + enabled: false + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + microphones: - name: as udevRules: @@ -26,39 +62,3 @@ rtsp: image: bluenviron/mediamtx:1.8.5 timezone: Europe/Stockholm - -persistentVolumeClaim: - # -- set to true to use pvc - enabled: false - - # -- specify an existing `PersistentVolumeClaim` to use - # existingClaim: "" - - # -- Annotations for the `PersitentVolumeClaim` - annotations: {} - - accessModes: - - ReadWriteOnce - - # -- volume claim size - size: "500Mi" - -service: - type: ClusterIP - port: 80 - -ingress: - enabled: false - className: "" - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: - - path: / - pathType: ImplementationSpecific - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local