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/ /.idea/
apps/*/*/charts/

View File

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

View File

@ -1,6 +1,6 @@
# piped # 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. 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 ## Changelog
### Version 2.0.0 ### Version 2.0.1
#### Added #### Added
@ -168,11 +168,11 @@ N/A
#### Changed #### Changed
* The backend uses the CMD line from the Dockerfile. N/A
#### Fixed #### Fixed
N/A - The backend configmap generation (GH issue: https://github.com/TeamPiped/Piped-Kubernetes/issues/2)
## Support ## 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 }} COMPROMISED_PASSWORD_CHECK: {{ .Values.backend.config.COMPROMISED_PASSWORD_CHECK | default true }}
DISABLE_REGISTRATION: {{ .Values.backend.config.DISABLE_REGISTRATION | default false }} DISABLE_REGISTRATION: {{ .Values.backend.config.DISABLE_REGISTRATION | default false }}
FEED_RETENTION: {{ .Values.backend.config.DISABLE_REGISTRATION | int | default 30 }} 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.url: {{.Values.backend.config.database.connection_url }}
hibernate.connection.driver_class: {{.Values.backend.config.database.driver_class }} hibernate.connection.driver_class: {{.Values.backend.config.database.driver_class }}
hibernate.dialect: {{.Values.backend.config.database.dialect }} 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 }} {{- 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.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") -}} 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.dialect: org.hibernate.dialect.PostgreSQLDialect
hibernate.connection.username: {{.Values.postgresql.auth.username }} hibernate.connection.username: {{.Values.postgresql.auth.username }}
hibernate.connection.password: {{.Values.postgresql.auth.password }} 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 }} {{- else }}
{{- fail "Unable to figure out database configuration for backend configmap."}} {{- fail "Unable to figure out database configuration for backend configmap."}}
{{- end }} {{- end }}