mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-03 09:41:29 +03:00
Updated chart location, renamed yamls and hardcoded service name in ingress
This commit is contained in:
62
chart/templates/_helpers.tpl
Normal file
62
chart/templates/_helpers.tpl
Normal file
@@ -0,0 +1,62 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "youtubedl-material.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "youtubedl-material.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "youtubedl-material.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "youtubedl-material.labels" -}}
|
||||
helm.sh/chart: {{ include "youtubedl-material.chart" . }}
|
||||
{{ include "youtubedl-material.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "youtubedl-material.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "youtubedl-material.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "youtubedl-material.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "youtubedl-material.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
14
chart/templates/claim-appdata-persistentvolumeclaim.yaml
Normal file
14
chart/templates/claim-appdata-persistentvolumeclaim.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: ytdl-material-claim-appdata
|
||||
name: ytdl-material-claim-appdata
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ default "1Gi" .Values.appdataClaimSize }}
|
||||
status: {}
|
||||
14
chart/templates/claim-audio-persistentvolumeclaim.yaml
Normal file
14
chart/templates/claim-audio-persistentvolumeclaim.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: ytdl-material-claim-audio
|
||||
name: ytdl-material-claim-audio
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ default "50Gi" .Values.audioClaimSize }}
|
||||
status: {}
|
||||
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: ytdl-material-claim-subscriptions
|
||||
name: ytdl-material-claim-subscriptions
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ default "50Gi" .Values.subscriptionsClaimSize }}
|
||||
status: {}
|
||||
14
chart/templates/claim-users-persistentvolumeclaim.yaml
Normal file
14
chart/templates/claim-users-persistentvolumeclaim.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: ytdl-material-claim-users
|
||||
name: ytdl-material-claim-users
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ default "50Gi" .Values.usersClaimSize }}
|
||||
status: {}
|
||||
14
chart/templates/claim-video-persistentvolumeclaim.yaml
Normal file
14
chart/templates/claim-video-persistentvolumeclaim.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: ytdl-material-claim-video
|
||||
name: ytdl-material-claim-video
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ default "50Gi" .Values.videoClaimSize }}
|
||||
status: {}
|
||||
69
chart/templates/deployment.yaml
Normal file
69
chart/templates/deployment.yaml
Normal file
@@ -0,0 +1,69 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.cmd: C:\Users\tzahi\Documents\YoutubeDL-Material\kompose.exe --file .\docker-compose.yml
|
||||
convert -c
|
||||
kompose.version: 1.21.0 (992df58d8)
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: ytdl-material
|
||||
name: ytdl-material
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: ytdl-material
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.cmd: C:\Users\tzahi\Documents\YoutubeDL-Material\kompose.exe --file
|
||||
.\docker-compose.yml convert -c
|
||||
kompose.version: 1.21.0 (992df58d8)
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: ytdl-material
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: ALLOW_CONFIG_MUTATIONS
|
||||
value: "true"
|
||||
image: tzahi12345/youtubedl-material:latest
|
||||
imagePullPolicy: ""
|
||||
name: ytdl-material
|
||||
ports:
|
||||
- containerPort: 17442
|
||||
name: http
|
||||
resources: {}
|
||||
volumeMounts:
|
||||
- mountPath: /app/appdata
|
||||
name: ytdl-material-claim-appdata
|
||||
- mountPath: /app/audio
|
||||
name: ytdl-material-claim-audio
|
||||
- mountPath: /app/video
|
||||
name: ytdl-material-claim-video
|
||||
- mountPath: /app/subscriptions
|
||||
name: ytdl-material-claim-subscriptions
|
||||
- mountPath: /app/users
|
||||
name: ytdl-material-claim-users
|
||||
restartPolicy: Always
|
||||
serviceAccountName: ""
|
||||
volumes:
|
||||
- name: ytdl-material-claim-appdata
|
||||
persistentVolumeClaim:
|
||||
claimName: ytdl-material-claim-appdata
|
||||
- name: ytdl-material-claim-audio
|
||||
persistentVolumeClaim:
|
||||
claimName: ytdl-material-claim-audio
|
||||
- name: ytdl-material-claim-video
|
||||
persistentVolumeClaim:
|
||||
claimName: ytdl-material-claim-video
|
||||
- name: ytdl-material-claim-subscriptions
|
||||
persistentVolumeClaim:
|
||||
claimName: ytdl-material-claim-subscriptions
|
||||
- name: ytdl-material-claim-users
|
||||
persistentVolumeClaim:
|
||||
claimName: ytdl-material-claim-users
|
||||
status: {}
|
||||
41
chart/templates/ingress.yaml
Normal file
41
chart/templates/ingress.yaml
Normal file
@@ -0,0 +1,41 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $fullName := include "youtubedl-material.fullname" . -}}
|
||||
{{- $svcPort := .Values.service.port -}}
|
||||
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
labels:
|
||||
{{- include "youtubedl-material.labels" . | nindent 4 }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{- range .Values.ingress.tls }}
|
||||
- hosts:
|
||||
{{- range .hosts }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
secretName: {{ .secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ .host | quote }}
|
||||
http:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ .path }}
|
||||
backend:
|
||||
serviceName: ytdl-material
|
||||
servicePort: {{ $svcPort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
22
chart/templates/service.yaml
Normal file
22
chart/templates/service.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.cmd: C:\Users\tzahi\Documents\YoutubeDL-Material\kompose.exe --file .\docker-compose.yml
|
||||
convert -c
|
||||
kompose.version: 1.21.0 (992df58d8)
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: ytdl-material
|
||||
name: ytdl-material
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.service.port }}
|
||||
targetPort: 17442
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
io.kompose.service: ytdl-material
|
||||
status:
|
||||
loadBalancer: {}
|
||||
Reference in New Issue
Block a user