mirror of
https://github.com/TeamPiped/Piped-Kubernetes.git
synced 2024-12-13 13:50:40 +05:30
57 lines
2.9 KiB
YAML
57 lines
2.9 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: {{ include "backend.names.fullname" . }}-config
|
|
{{- with (merge (.Values.backend.labels | default dict) (include "common.labels" $ | fromYaml)) }}
|
|
labels: {{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- with (merge (.Values.backend.annotations | default dict) (include "common.annotations" $ | fromYaml)) }}
|
|
annotations: {{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
data:
|
|
config.properties: |
|
|
PORT: {{ .Values.backend.config.PORT | default 8080 }}
|
|
HTTP_WORKERS: {{ .Values.backend.config.HTTP_WORKERS | default 2 }}
|
|
{{- if .Values.backend.config.HTTP_PROXY }}
|
|
HTTP_PROXY: {{ .Values.backend.config.HTTP_PROXY }}
|
|
{{ end }}
|
|
{{- if .Values.backend.config.PROXY_PART }}
|
|
PROXY_PART: {{.Values.backend.config.PROXY_PART }}
|
|
{{- else if .Values.ingress.ytproxy.enabled}}
|
|
PROXY_PART: {{ index (index .Values.ingress.ytproxy.hosts 0) "host" }}
|
|
{{- else }}
|
|
{{- fail "PROXY_PART needs to be set in config values or ytproxy ingress must be enabled."}}
|
|
{{ end }}
|
|
{{- if .Values.backend.config.API_URL }}
|
|
API_URL: {{ .Values.backend.config.API_URL }}
|
|
{{- else if .Values.ingress.backend.enabled }}
|
|
API_URL: {{ index (index .Values.ingress.backend.hosts 0) "host" }}
|
|
{{- else }}
|
|
{{- fail "API_URL needs to be set in config values or backend ingress must be enabled."}}
|
|
{{ end }}
|
|
{{- if .Values.backend.config.FRONTEND_URL }}
|
|
FRONTEND_URL: {{.Values.backend.config.FRONTEND_URL }}
|
|
{{- else if .Values.ingress.main.enabled }}
|
|
FRONTEND_URL: {{ index (index .Values.ingress.main.hosts 0) "host" }}
|
|
{{- else }}
|
|
{{- fail "FRONTEND_URL needs to be set in config values or main ingress must be enabled."}}
|
|
{{ end }}
|
|
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 }}
|
|
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 }}
|
|
{{- else if .Values.postgresql.enabled }}
|
|
hibernate.connection.url: jdbc:postgresql://piped-postgresql/{{ .Values.postgresql.auth.database}}
|
|
hibernate.connection.driver_class: org.postgresql.Driver
|
|
hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect
|
|
hibernate.connection.username: {{.Values.postgresql.auth.username }}
|
|
hibernate.connection.password: {{.Values.postgresql.auth.password }}
|
|
{{ end }}
|
|
SENTRY_DSN:
|