Skip to content

Commit

Permalink
Fix the backend configmap generation
Browse files Browse the repository at this point in the history
Closes #2
  • Loading branch information
samip5 committed Apr 17, 2023
1 parent 7db1bbb commit a490a33
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/.idea/
apps/*/*/charts/
6 changes: 3 additions & 3 deletions charts/apps/piped/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
8 changes: 4 additions & 4 deletions charts/apps/piped/README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -160,19 +160,19 @@ helm install piped TeamPiped/piped -f values.yaml

## Changelog

### Version 2.0.0
### Version 2.0.1

#### Added

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

Expand Down
Binary file added charts/apps/piped/charts/common-1.3.2.tgz
Binary file not shown.
Binary file added charts/apps/piped/charts/postgresql-12.2.0.tgz
Binary file not shown.
7 changes: 3 additions & 4 deletions charts/apps/piped/templates/backend/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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") -}}
Expand All @@ -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 }}
Expand Down

0 comments on commit a490a33

Please sign in to comment.