Fix the backend configmap generation

Closes https://github.com/TeamPiped/Piped-Kubernetes/issues/2
This commit is contained in:
Skyler Mäntysaari 2023-04-17 20:38:50 +03:00
parent 7db1bbb7d1
commit a490a33621
6 changed files with 11 additions and 11 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
/.idea/
apps/*/*/charts/

View file

@ -9,7 +9,7 @@ sources:
- https://github.com/TeamPiped/piped-proxy
keywords:
- streaming
version: 2.0.0
version: 2.0.1
appVersion: latest
kubeVersion: ">=1.22.0-0"
maintainers:
@ -26,5 +26,5 @@ dependencies:
condition: postgresql.enabled
annotations:
artifacthub.io/changes: |-
- kind: changed
description: The backend uses the CMD line from the Dockerfile.
- kind: fixed
description: The backend configmap generation (GH issue: https://github.com/TeamPiped/Piped-Kubernetes/issues/2)

View file

@ -1,6 +1,6 @@
# piped
![Version: 2.0.0](https://img.shields.io/badge/Version-2.0.0-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
![Version: 2.0.1](https://img.shields.io/badge/Version-2.0.1-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
Piped is an alternative privacy-friendly YouTube frontend which is efficient by design.
@ -160,7 +160,7 @@ helm install piped TeamPiped/piped -f values.yaml
## Changelog
### Version 2.0.0
### Version 2.0.1
#### Added
@ -168,11 +168,11 @@ N/A
#### Changed
* The backend uses the CMD line from the Dockerfile.
N/A
#### Fixed
N/A
- The backend configmap generation (GH issue: https://github.com/TeamPiped/Piped-Kubernetes/issues/2)
## Support

Binary file not shown.

Binary file not shown.

View file

@ -54,10 +54,12 @@ data:
COMPROMISED_PASSWORD_CHECK: {{ .Values.backend.config.COMPROMISED_PASSWORD_CHECK | default true }}
DISABLE_REGISTRATION: {{ .Values.backend.config.DISABLE_REGISTRATION | default false }}
FEED_RETENTION: {{ .Values.backend.config.DISABLE_REGISTRATION | int | default 30 }}
{{- if .Values.backend.config.database }}
{{- if and (.Values.backend.config.database) (not .Values.postgresql.enabled) }}
hibernate.connection.url: {{.Values.backend.config.database.connection_url }}
hibernate.connection.driver_class: {{.Values.backend.config.database.driver_class }}
hibernate.dialect: {{.Values.backend.config.database.dialect }}
hibernate.connection.username: {{.Values.backend.config.database.username }}
hibernate.connection.password: {{.Values.backend.config.database.password }}
{{- if .Values.backend.config.database.secret }}
hibernate.connection.username: {{ include "common.getValueFromSecret" (dict "Namespace" .Release.Namespace "Name" .Values.backend.config.database.secret "Key" "database.username" ) -}}
hibernate.connection.password: {{ include "common.getValueFromSecret" (dict "Namespace" .Release.Namespace "Name" .Values.backend.config.database.secret "Key" "database.password") -}}
@ -68,9 +70,6 @@ data:
hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect
hibernate.connection.username: {{.Values.postgresql.auth.username }}
hibernate.connection.password: {{.Values.postgresql.auth.password }}
{{- else if not (.Values.postgresql.enabled .Values.backend.config.database.secret) }}
hibernate.connection.username: {{.Values.backend.config.database.username }}
hibernate.connection.password: {{.Values.backend.config.database.password }}
{{- else }}
{{- fail "Unable to figure out database configuration for backend configmap."}}
{{- end }}