Skip to content

Commit

Permalink
feat(kyoo): Add Path Prefix and remove deprecated route component (#249)
Browse files Browse the repository at this point in the history
* feat(kyoo): No need url_rewrite anymore; configure new path prefix and remove deprecated route component

* chore(kyoo): bump version to 0.1.5 and remove deprecated rewrite_url component

* Update tag to 4.7.1
  • Loading branch information
qjoly authored Jan 13, 2025
1 parent 1e7175a commit a004288
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 158 deletions.
2 changes: 1 addition & 1 deletion charts/kyoo/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v2
type: application
name: kyoo
description: Kyoo is a media manager and transcoder for your media files.
version: 0.1.4
version: 0.1.5
appVersion: "4.7.0"
icon: https://github.com/zoriya/Kyoo/blob/master/icons/icon-256x256.png?raw=true
# Maintainer of the Chart
Expand Down
33 changes: 18 additions & 15 deletions charts/kyoo/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
{{- if and (.Values.route.enabled) ( .Values.route.ingress.enabled) }}
{{- if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Release.Name }}-route
name: {{ .Release.Name }}
labels:
app: {{ .Release.Name }}-route
{{- if .Values.route.ingress.annotations }}
app: {{ .Release.Name }}
{{- if .Values.ingress.annotations }}
annotations:
{{ toYaml .Values.route.ingress.annotations | indent 4 }}
{{ toYaml .Values.ingress.annotations | indent 4 }}
{{- end }}
spec:
{{- if .Values.route.ingress.ingressClassName }}
ingressClassName: {{ .Values.route.ingress.ingressClassName }}
{{- if .Values.ingress.ingressClassName }}
ingressClassName: {{ .Values.ingress.ingressClassName }}
{{ end }}
rules:
- host: {{ required "A variable 'hostName' is required!" .Values.route.ingress.hostName }}
- host: {{ required "A variable 'hostName' is required!" .Values.ingress.hostName }}
http:
paths:
- path: /
pathType: Prefix
{{- range .Values.ingress.paths }}
- path: {{ .path }}
pathType: {{ .pathType }}
backend:
service:
name: {{ .Release.Name }}-route
name: {{ .backend.service.name }}
port:
number: 80
{{- if .Values.route.ingress.tls.enabled }}
number: {{ .backend.service.port.number }}
{{- end }}

{{- if .Values.ingress.tls.enabled }}
tls:
- secretName: {{ .Values.route.ingress.tls.secretName }}
- secretName: {{ .Values.ingress.tls.secretName }}
hosts:
- {{ .Values.route.ingress.hostName }}
- {{ .Values.ingress.hostName }}
{{- end }}
{{ end }}
35 changes: 0 additions & 35 deletions charts/kyoo/templates/route/configMap.yaml

This file was deleted.

54 changes: 0 additions & 54 deletions charts/kyoo/templates/route/deployment.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions charts/kyoo/templates/route/service.yaml

This file was deleted.

76 changes: 40 additions & 36 deletions charts/kyoo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ front:
extraLabels: {}
image:
repository: "ghcr.io/zoriya/kyoo_front"
tag: "4.7.0"
tag: "4.7.1"
pullPolicy: "IfNotPresent"
variables:
nonSecret:
# Match back service name (see .back.name)
KYOO_URL: "http://back:5000"
KYOO_URL: "http://back:5000/api"

back:
name: "back"
Expand All @@ -69,11 +69,14 @@ back:
value: kyoo-postgresql
- name: POSTGRES_PORT
value: "5432"
- name: KYOO_URL
value: "http://back:5000/api"
image: "ghcr.io/zoriya/kyoo_migrations:4.7.0"
name: migrations
variables:
nonSecret:
TRANSCODER_URL: http://transcoder:7666
TRANSCODER_URL: http://transcoder:7666/video
KYOO_PREFIX: /api
PUBLIC_URL: https://kyoo.mydomain.com
REQUIRE_ACCOUNT_VERIFICATION: "true"
DEFAULT_PERMISSIONS: "overall.read,overall.play"
Expand Down Expand Up @@ -111,13 +114,13 @@ back:
containerPort: 5000
image:
repository: "ghcr.io/zoriya/kyoo_back"
tag: "4.7.0"
tag: "4.7.1"
pullPolicy: "IfNotPresent"
persistence:
enabled: true
volumes:
- name: back
storageClassName: "longhorn"
storageClassName: ""
size: "5Gi"
pvcClaim: ""
containerMount: "/metadata"
Expand All @@ -140,7 +143,7 @@ transcoder:
extraLabels: {}
image:
repository: "ghcr.io/zoriya/kyoo_transcoder"
tag: "4.7.0"
tag: "4.7.1"
pullPolicy: "IfNotPresent"
persistence:
enabled: true
Expand Down Expand Up @@ -196,7 +199,7 @@ scanner:
memoryLimit: "300Mi"
image:
repository: "ghcr.io/zoriya/kyoo_scanner"
tag: "4.7.0"
tag: "4.7.1"
pullPolicy: "IfNotPresent"
variables:
configMap:
Expand All @@ -206,7 +209,7 @@ scanner:
# Should match .postgresql.back.database
SCANNER_LIBRARY_ROOT: /data
POSTGRES_PORT: "5432"
KYOO_URL: http://back:5000
KYOO_URL: http://back:5000/api
RABBITMQ_HOST: kyoo-rabbitmq
RABBITMQ_PORT: "5672"
secret:
Expand Down Expand Up @@ -242,7 +245,7 @@ autosync:
memoryLimit: "300Mi"
image:
repository: "ghcr.io/zoriya/kyoo_autosync"
tag: "4.7.0"
tag: "4.7.1"
pullPolicy: "IfNotPresent"
variables:
nonSecret:
Expand All @@ -269,7 +272,7 @@ matcher:
# matcher uses the same image as the scanner
# Only the args are different
repository: "ghcr.io/zoriya/kyoo_scanner"
tag: "4.7.0"
tag: "4.7.1"
pullPolicy: "IfNotPresent"
variables:
configMap:
Expand All @@ -279,9 +282,10 @@ matcher:
RABBITMQ_HOST: kyoo-rabbitmq
RABBITMQ_PORT: "5672"
# Match back service name (see .back.name)
KYOO_URL: "http://back:5000"
KYOO_URL: "http://back:5000/api"
secret:
data: {}
data:
{}
# THEMOVIEDB_APIKEY: your-tmdb-api
#TVDB_APIKEY: your-tvdb-api
#TVDB_PIN:
Expand All @@ -305,32 +309,32 @@ matcher:
# key: "THEMOVIEDB_APIKEY"
# envName: "THEMOVIEDB_APIKEY"

# Temporary component to use Kyoo v4, will be removed in the next v5 version
# This component handle the rewrite_url necessary for the front
# To avoid having a dependency on the ingress-controller (not all of them support rewrite_url)
# Otherwise, you can still configure ingress for front and back directly by setting .front.ingress.enabled and .back.ingress.enabled to true
route:
ingress:
enabled: true
# You can set this to LoadBalancer and NodePort if you want to directly expose the route
# Otherwise, you can use an ingress controller below
serviceType: ClusterIP
image:
repository: "haproxy"
tag: "latest"
deployment:
replicaCount: 1
annotations: {}
extraLabels: {}
ingress:
hostName: "kyoo.mydomain.com"
ingressClassName: ""
extraLabels: {}
paths:
- path: /
pathType: Prefix
backend:
service:
name: front
port:
number: 8901
- path: /api
pathType: Prefix
backend:
service:
name: back
port:
number: 5000
annotations:
{}
# cert-manager.io/cluster-issuer: cloudflare
tls:
enabled: true
hostName: kyoo.mydomain.com
extraLabels: {}
annotations: {}
# cert-manager.io/cluster-issuer: infomaniak
tls:
enabled: false
secretName: "kyoo-tls"
ingressClassName: nginx
secretName: "kyoo-tls"

config:
name: "kyoo-config"
Expand Down

0 comments on commit a004288

Please sign in to comment.