chore(backend): Fix the configmap generation for databases.

It shouldn't require dialect and driver_class and instead default to using them but allow customization.
This commit is contained in:
Skyler Mäntysaari 2023-07-21 04:45:16 +03:00
parent 6355d40bbd
commit ecdbe79880
3 changed files with 13 additions and 9 deletions

View file

@ -9,7 +9,7 @@ sources:
- https://github.com/TeamPiped/piped-proxy
keywords:
- streaming
version: 2.7.1
version: 2.8.0
appVersion: latest
kubeVersion: ">=1.22.0-0"
maintainers:
@ -26,5 +26,5 @@ dependencies:
condition: postgresql.enabled
annotations:
artifacthub.io/changes: |-
- kind: fixed
description: Made frontend nginx entrypoint run docker-entrypoint.d scripts
- kind: changed
description: Backend configmap was changed to not require driver_class nor dialect but rather specify them by default.

View file

@ -1,6 +1,6 @@
# piped
![Version: 2.6.2](https://img.shields.io/badge/Version-2.6.2-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
![Version: 2.8.0](https://img.shields.io/badge/Version-2.8.0-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.
@ -21,7 +21,7 @@ Kubernetes: `>=1.22.0-0`
| Repository | Name | Version |
|------------|------|---------|
| https://bjw-s.github.io/helm-charts | common | 1.5.1 |
| https://charts.bitnami.com/bitnami | postgresql | 12.5.6 |
| https://charts.bitnami.com/bitnami | postgresql | 12.6.0 |
## TL;DR
@ -91,7 +91,7 @@ helm install piped TeamPiped/piped -f values.yaml
| backend.service.main.type | string | `"ClusterIP"` | |
| controller.enabled | bool | `false` | enable the controller. |
| frontend.args[0] | string | `"-c"` | |
| frontend.args[1] | string | `"sed -i s/pipedapi.kavin.rocks/$BACKEND_HOSTNAME/g /usr/share/nginx/html/assets/* && /docker-entrypoint.sh && nginx -g 'daemon off;'"` | |
| frontend.args[1] | string | `"sed -i s/pipedapi.kavin.rocks/$BACKEND_HOSTNAME/g /usr/share/nginx/html/assets/* && /docker-entrypoint.sh nginx -g 'daemon off;'"` | |
| frontend.command | string | `"/bin/ash"` | BACKEND_HOSTNAME: pipedapi.example.org |
| frontend.enabled | bool | `true` | |
| frontend.image.pullPolicy | string | `"IfNotPresent"` | image pull policy |
@ -160,7 +160,7 @@ helm install piped TeamPiped/piped -f values.yaml
## Changelog
### Version 2.6.2
### Version 2.8.0
#### Added
@ -168,11 +168,11 @@ N/A
#### Changed
N/A
* Backend configmap was changed to not require driver_class nor dialect but rather specify them by default.
#### Fixed
* ytproxy ingress, GH issue 29
N/A
## Support

View file

@ -56,10 +56,14 @@ data:
FEED_RETENTION: {{ .Values.backend.config.DISABLE_REGISTRATION | int | default 30 }}
{{- if and (.Values.backend.config.database) (not .Values.postgresql.enabled) }}
hibernate.connection.url: {{.Values.backend.config.database.connection_url }}
{{- else if and (.Values.backend.config.database.driver_class) (.Values.backend.config.database.dialect)}}
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 }}
{{- else if (not .Values.backend.config.database.driver_class) (not .Values.backend.config.database.dialect) }}
hibernate.connection.driver_class: org.postgresql.Driver
hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect
{{- 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") -}}