Skip to content

Commit

Permalink
Move birdnet related values into birdnet.*
Browse files Browse the repository at this point in the history
  • Loading branch information
isZumpo committed Aug 13, 2024
1 parent 31d0489 commit 9293519
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 56 deletions.
4 changes: 2 additions & 2 deletions charts/birdnet-go/templates/deployments/birdnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
16 changes: 8 additions & 8 deletions charts/birdnet-go/templates/ingresses/birdnet.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand Down
20 changes: 10 additions & 10 deletions charts/birdnet-go/templates/pvcs/birdnet.yaml
Original file line number Diff line number Diff line change
@@ -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 -}}
72 changes: 36 additions & 36 deletions charts/birdnet-go/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

0 comments on commit 9293519

Please sign in to comment.