mirror of
https://github.com/TeamPiped/Piped-Kubernetes.git
synced 2024-08-14 23:57:15 +00:00
Major version release of Chart
This commit is contained in:
parent
47f493949d
commit
3c9966560d
18 changed files with 524 additions and 117 deletions
|
|
@ -3,35 +3,49 @@ apiVersion: v1
|
|||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "backend.names.fullname" . }}-config
|
||||
{{- with (merge (.Values.backend.labels | default dict) (include "common.labels" $ | fromYaml)) }}
|
||||
{{- with (merge (.Values.backend.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
|
||||
labels: {{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with (merge (.Values.backend.annotations | default dict) (include "common.annotations" $ | fromYaml)) }}
|
||||
{{- with (merge (.Values.backend.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | 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.PORT }}
|
||||
PORT: {{ .Values.backend.config.PORT }}
|
||||
{{- else }}
|
||||
PORT: 8080
|
||||
{{ end }}
|
||||
{{- if .Values.backend.config.HTTP_WORKERS }}
|
||||
HTTP_WORKERS: {{ .Values.backend.config.HTTP_WORKERS }}
|
||||
{{- else }}
|
||||
HTTP_WORKERS: 2
|
||||
{{ end }}
|
||||
{{- 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 and .Values.ingress.ytproxy.tls }}
|
||||
{{- else if (and .Values.ingress.ytproxy.enabled .Values.ingress.ytproxy.tls) }}
|
||||
PROXY_PART: https://{{ index (index .Values.ingress.ytproxy.hosts 0) "host" }}
|
||||
{{- else if .Values.ingress.ytproxy.enabled }}
|
||||
PROXY_PART: http://{{ 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 (and .Values.ingress.backend.enabled .Values.ingress.backend.tls) }}
|
||||
API_URL: https://{{ index (index .Values.ingress.backend.hosts 0) "host" }}
|
||||
{{- else if .Values.ingress.backend.enabled }}
|
||||
API_URL: {{ index (index .Values.ingress.backend.hosts 0) "host" }}
|
||||
API_URL: http://{{ 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 (and .Values.ingress.main.enabled .Values.ingress.main.tls) }}
|
||||
FRONTEND_URL: https://{{ index (index .Values.ingress.main.hosts 0) "host" }}
|
||||
{{- else if .Values.ingress.main.enabled }}
|
||||
FRONTEND_URL: {{ index (index .Values.ingress.main.hosts 0) "host" }}
|
||||
{{- else }}
|
||||
|
|
@ -52,5 +66,5 @@ data:
|
|||
hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect
|
||||
hibernate.connection.username: {{.Values.postgresql.auth.username }}
|
||||
hibernate.connection.password: {{.Values.postgresql.auth.password }}
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
SENTRY_DSN:
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ apiVersion: apps/v1
|
|||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "backend.names.fullname" . }}
|
||||
{{- with (merge (.Values.backend.labels | default dict) (include "common.labels" $ | fromYaml)) }}
|
||||
{{- with (merge (.Values.backend.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
|
||||
labels: {{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with (merge (.Values.backend.annotations | default dict) (include "common.annotations" $ | fromYaml)) }}
|
||||
{{- with (merge (.Values.backend.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)) }}
|
||||
annotations: {{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
|
|
|
|||
|
|
@ -16,21 +16,20 @@
|
|||
|
||||
{{- $primaryService := .Values.backend.service.main -}}
|
||||
{{- $defaultServiceName := "piped-backend" -}}
|
||||
{{- $defaultServicePort := get $primaryService.ports (include "common.classes.service.ports.primary" (dict "values" $primaryService)) -}}
|
||||
{{- $isStable := include "common.capabilities.ingress.isStable" . }}
|
||||
{{- $defaultServicePort := get $primaryService.ports (include "bjw-s.common.lib.service.primaryPort" (dict "values" $primaryService)) -}}
|
||||
---
|
||||
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $ingressName }}-backend
|
||||
{{- with (merge ($values.labels | default dict) (include "common.labels" $ | fromYaml)) }}
|
||||
{{- with (merge ($values.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
|
||||
labels: {{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with (merge ($values.annotations | default dict) (include "common.annotations" $ | fromYaml)) }}
|
||||
{{- end }}
|
||||
{{- with (merge ($values.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)) }}
|
||||
annotations: {{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if and $isStable $values.ingressClassName }}
|
||||
{{- if $values.ingressClassName }}
|
||||
ingressClassName: {{ $values.ingressClassName }}
|
||||
{{- end }}
|
||||
{{- if $values.tls }}
|
||||
|
|
@ -58,19 +57,12 @@ spec:
|
|||
{{- $port = default $port .service.port -}}
|
||||
{{- end }}
|
||||
- path: {{ tpl .path $ | quote }}
|
||||
{{- if $isStable }}
|
||||
pathType: {{ default "Prefix" .pathType }}
|
||||
{{- end }}
|
||||
backend:
|
||||
{{- if $isStable }}
|
||||
service:
|
||||
name: {{ $service }}
|
||||
port:
|
||||
number: {{ $port }}
|
||||
{{- else }}
|
||||
serviceName: {{ $service }}
|
||||
servicePort: {{ $port }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
{{- include "common.values.setup" . }}
|
||||
{{- include "bjw-s.common.values.init" . }}
|
||||
|
||||
{{- define "app-template.hardcodedValues" -}}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ apiVersion: apps/v1
|
|||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "frontend.names.fullname" . }}
|
||||
{{- with (merge (.Values.frontend.labels | default dict) (include "common.labels" $ | fromYaml)) }}
|
||||
{{- with (merge (.Values.frontend.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
|
||||
labels: {{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with (merge (.Values.frontend.annotations | default dict) (include "common.annotations" $ | fromYaml)) }}
|
||||
{{- with (merge (.Values.frontend.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)) }}
|
||||
annotations: {{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
|
|
|
|||
|
|
@ -16,61 +16,53 @@
|
|||
|
||||
{{- $primaryService := .Values.frontend.service.main -}}
|
||||
{{- $defaultServiceName := "piped-frontend" -}}
|
||||
{{- $defaultServicePort := get $primaryService.ports (include "common.classes.service.ports.primary" (dict "values" $primaryService)) -}}
|
||||
{{- $isStable := include "common.capabilities.ingress.isStable" . }}
|
||||
{{- $defaultServicePort := get $primaryService.ports (include "bjw-s.common.lib.service.primaryPort" (dict "values" $primaryService)) -}}
|
||||
---
|
||||
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $ingressName }}
|
||||
{{- with (merge ($values.labels | default dict) (include "common.labels" $ | fromYaml)) }}
|
||||
{{- with (merge ($values.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
|
||||
labels: {{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with (merge ($values.annotations | default dict) (include "common.annotations" $ | fromYaml)) }}
|
||||
{{- with (merge ($values.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)) }}
|
||||
annotations: {{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if and $isStable $values.ingressClassName }}
|
||||
{{- if $values.ingressClassName }}
|
||||
ingressClassName: {{ $values.ingressClassName }}
|
||||
{{- end }}
|
||||
{{- if $values.tls }}
|
||||
{{- end }}
|
||||
{{- if $values.tls }}
|
||||
tls:
|
||||
{{- range $values.tls }}
|
||||
{{- range $values.tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
{{- range .hosts }}
|
||||
- {{ tpl . $ | quote }}
|
||||
{{- end }}
|
||||
{{- if .secretName }}
|
||||
{{- end }}
|
||||
{{- if .secretName }}
|
||||
secretName: {{ tpl .secretName $ | quote}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range $values.hosts }}
|
||||
{{- range $values.hosts }}
|
||||
- host: {{ tpl .host $ | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
{{- $service := $defaultServiceName -}}
|
||||
{{- $port := $defaultServicePort.port -}}
|
||||
{{- if .service -}}
|
||||
{{- $service = default $service .service.name -}}
|
||||
{{- $port = default $port .service.port -}}
|
||||
{{- end }}
|
||||
- path: {{ tpl .path $ | quote }}
|
||||
{{- if $isStable }}
|
||||
pathType: {{ default "Prefix" .pathType }}
|
||||
{{- range .paths }}
|
||||
{{- $service := $defaultServiceName -}}
|
||||
{{- $port := $defaultServicePort.port -}}
|
||||
{{- if .service -}}
|
||||
{{- $service = default $service .service.name -}}
|
||||
{{- $port = default $port .service.port -}}
|
||||
{{- end }}
|
||||
- path: {{ tpl .path $ | quote }}
|
||||
pathType: {{ default "Prefix" .pathType }}
|
||||
backend:
|
||||
{{- if $isStable }}
|
||||
service:
|
||||
name: {{ $service }}
|
||||
port:
|
||||
number: {{ $port }}
|
||||
{{- else }}
|
||||
serviceName: {{ $service }}
|
||||
servicePort: {{ $port }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
@ -4,10 +4,10 @@ apiVersion: apps/v1
|
|||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "ytproxy.names.fullname" . }}
|
||||
{{- with (merge (.Values.ytproxy.labels | default dict) (include "common.labels" $ | fromYaml)) }}
|
||||
{{- with (merge (.Values.ytproxy.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
|
||||
labels: {{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with (merge (.Values.ytproxy.annotations | default dict) (include "common.annotations" $ | fromYaml)) }}
|
||||
{{- with (merge (.Values.ytproxy.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)) }}
|
||||
annotations: {{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
|
|
|
|||
|
|
@ -16,61 +16,53 @@
|
|||
|
||||
{{- $primaryService := .Values.ytproxy.service.main -}}
|
||||
{{- $defaultServiceName := "piped-ytproxy" -}}
|
||||
{{- $defaultServicePort := get $primaryService.ports (include "common.classes.service.ports.primary" (dict "values" $primaryService)) -}}
|
||||
{{- $isStable := include "common.capabilities.ingress.isStable" . }}
|
||||
{{- $defaultServicePort := get $primaryService.ports (include "bjw-s.common.lib.service.primaryPort" (dict "values" $primaryService)) -}}
|
||||
---
|
||||
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $ingressName }}-ytproxy
|
||||
{{- with (merge ($values.labels | default dict) (include "common.labels" $ | fromYaml)) }}
|
||||
{{- with (merge ($values.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $ | fromYaml)) }}
|
||||
labels: {{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with (merge ($values.annotations | default dict)) }}
|
||||
{{- with (merge ($values.annotations | default dict) (include "bjw-s.common.lib.metadata.globalAnnotations" $ | fromYaml)) }}
|
||||
annotations: {{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if and $isStable $values.ingressClassName }}
|
||||
{{- if $values.ingressClassName }}
|
||||
ingressClassName: {{ $values.ingressClassName }}
|
||||
{{- end }}
|
||||
{{- if $values.tls }}
|
||||
{{- end }}
|
||||
{{- if $values.tls }}
|
||||
tls:
|
||||
{{- range $values.tls }}
|
||||
{{- range $values.tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
{{- range .hosts }}
|
||||
- {{ tpl . $ | quote }}
|
||||
{{- end }}
|
||||
{{- if .secretName }}
|
||||
{{- end }}
|
||||
{{- if .secretName }}
|
||||
secretName: {{ tpl .secretName $ | quote}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range $values.hosts }}
|
||||
{{- range $values.hosts }}
|
||||
- host: {{ tpl .host $ | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
{{- $service := $defaultServiceName -}}
|
||||
{{- $port := $defaultServicePort.port -}}
|
||||
{{- if .service -}}
|
||||
{{- $service = default $service .service.name -}}
|
||||
{{- $port = default $port .service.port -}}
|
||||
{{- end }}
|
||||
- path: {{ tpl .path $ | quote }}
|
||||
{{- if $isStable }}
|
||||
pathType: {{ default "Prefix" .pathType }}
|
||||
{{- range .paths }}
|
||||
{{- $service := $defaultServiceName -}}
|
||||
{{- $port := $defaultServicePort.port -}}
|
||||
{{- if .service -}}
|
||||
{{- $service = default $service .service.name -}}
|
||||
{{- $port = default $port .service.port -}}
|
||||
{{- end }}
|
||||
- path: {{ tpl .path $ | quote }}
|
||||
pathType: {{ default "Prefix" .pathType }}
|
||||
backend:
|
||||
{{- if $isStable }}
|
||||
service:
|
||||
name: {{ $service }}
|
||||
port:
|
||||
number: {{ $port }}
|
||||
{{- else }}
|
||||
serviceName: {{ $service }}
|
||||
servicePort: {{ $port }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue