WIP feat(invidious) add invidious (#5103)
* wip feat(invidious) add invidious * Update charts/incubator/invidious/templates/_config.tpl Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com> * Update charts/incubator/invidious/templates/_config.tpl Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com> * INVIDIOUS_CONFIG variable * Update charts/incubator/invidious/templates/_config.tpl Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com> * Update charts/incubator/invidious/templates/_config.tpl Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com> * Update charts/incubator/invidious/templates/_config.tpl Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com> * formatted config * indent * fixes * Update charts/incubator/invidious/values.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Update charts/incubator/invidious/values.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Update charts/incubator/invidious/values.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Update charts/incubator/invidious/values.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Update charts/incubator/invidious/questions.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * fixes * add installContainers seeddb * add dbseed * dont run upgrade * fix vars * whops * simplify secret * meh upstream config is a single level everything * user accs * bg jobs * jobs * jobs * misc * moar * more * more * all * remoev todo * fix questions Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com> Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Stavros kois <s.kois@outlook.com>
This commit is contained in:
co-authored by
Stavros Kois
Stavros kois
parent
c3a2520279
commit
5b2121418f
@@ -0,0 +1,30 @@
|
|||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
||||||
|
.vscode/
|
||||||
|
# OWNERS file for Kubernetes
|
||||||
|
OWNERS
|
||||||
|
# helm-docs templates
|
||||||
|
*.gotmpl
|
||||||
|
# docs folder
|
||||||
|
/docs
|
||||||
|
# icon
|
||||||
|
icon.png
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# invidious
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
appVersion: "latest"
|
||||||
|
dependencies:
|
||||||
|
- name: common
|
||||||
|
repository: https://library-charts.truecharts.org
|
||||||
|
version: 11.0.4
|
||||||
|
- condition: postgresql.enabled
|
||||||
|
name: postgresql
|
||||||
|
repository: https://charts.truecharts.org/
|
||||||
|
version: 11.0.5
|
||||||
|
description: Open source alternative front-end to YouTube.
|
||||||
|
home: https://truecharts.org/docs/charts/incubator/invidious
|
||||||
|
icon: https://truecharts.org/img/hotlink-ok/chart-icons/invidious.png
|
||||||
|
keywords:
|
||||||
|
- invidious
|
||||||
|
- youtube
|
||||||
|
- media
|
||||||
|
kubeVersion: ">=1.16.0-0"
|
||||||
|
maintainers:
|
||||||
|
- email: info@truecharts.org
|
||||||
|
name: TrueCharts
|
||||||
|
url: https://truecharts.org
|
||||||
|
name: invidious
|
||||||
|
sources:
|
||||||
|
- https://github.com/truecharts/charts/tree/master/charts/incubator/invidious
|
||||||
|
- https://github.com/iv-org/invidious
|
||||||
|
- https://docs.invidious.io/installation/#docker
|
||||||
|
version: 1.0.0
|
||||||
|
annotations:
|
||||||
|
truecharts.org/catagories: |
|
||||||
|
- media
|
||||||
|
truecharts.org/SCALE-support: "true"
|
||||||
|
truecharts.org/grade: U
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
# invidious
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# Input Validation
|
||||||
|
|
||||||
|
**`Speed`**
|
||||||
|
Accepted formats are:
|
||||||
|
|
||||||
|
- Integers (eg `1`, `2`)
|
||||||
|
- Floats (eg `1.25`, `1.50`)
|
||||||
|
|
||||||
|
Regex used to match those: `^[0-9]+(\.[0-9]*)?$`
|
||||||
|
You can try live [here](https://regex101.com/r/jnZ19W/1)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
_If you find a field that you think it needs validation, please open an issue on github_
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,182 @@
|
|||||||
|
{{/* Define the configmap */}}
|
||||||
|
{{- define "invidious.config" -}}
|
||||||
|
|
||||||
|
{{- $configName := printf "%s-invidious-config" (include "tc.common.names.fullname" .) }}
|
||||||
|
{{- $vNet := .Values.invidious.network }}
|
||||||
|
{{- $vLog := .Values.invidious.logging }}
|
||||||
|
{{- $vFeat := .Values.invidious.features }}
|
||||||
|
{{- $vUserAcc := .Values.invidious.users_accounts }}
|
||||||
|
{{- $vBgJobs := .Values.invidious.background_jobs }}
|
||||||
|
{{- $vJobs := .Values.invidious.jobs }}
|
||||||
|
{{- $vCaptca := .Values.invidious.captcha }}
|
||||||
|
{{- $vMisc := .Values.invidious.miscellaneous }}
|
||||||
|
{{- $vLoc := .Values.invidious.default_user_preferences.internationalization }}
|
||||||
|
{{- $vUI := .Values.invidious.default_user_preferences.interface }}
|
||||||
|
{{- $vVidBeh := .Values.invidious.default_user_preferences.video_player_behavior }}
|
||||||
|
{{- $vVidPlay := .Values.invidious.default_user_preferences.video_playback_settings }}
|
||||||
|
{{- $vSubFeed := .Values.invidious.default_user_preferences.subscription_feed }}
|
||||||
|
{{- $vUserMisc := .Values.invidious.default_user_preferences.miscellaneous }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ $configName }}
|
||||||
|
labels:
|
||||||
|
{{- include "tc.common.labels" . | nindent 4 }}
|
||||||
|
stringData:
|
||||||
|
INVIDIOUS_CONFIG: |
|
||||||
|
# Database
|
||||||
|
check_tables: true
|
||||||
|
db:
|
||||||
|
user: {{ .Values.postgresql.postgresqlUsername }}
|
||||||
|
dbname: {{ .Values.postgresql.postgresqlDatabase }}
|
||||||
|
password: {{ .Values.postgresql.postgresqlPassword | trimAll "\"" }}
|
||||||
|
host: {{ .Values.postgresql.url.plain | trimAll "\"" }}
|
||||||
|
port: 5432
|
||||||
|
|
||||||
|
# Network
|
||||||
|
host_binding: 0.0.0.0
|
||||||
|
port: {{ .Values.service.main.ports.main.port }}
|
||||||
|
external_port: {{ $vNet.inbound.external_port }}
|
||||||
|
https_only: {{ $vNet.inbound.https_only }}
|
||||||
|
domain: {{ $vNet.inbound.domain }}
|
||||||
|
hsts: {{ $vNet.inbound.hsts }}
|
||||||
|
disable_proxy: {{ $vNet.outbound.disable_proxy }}
|
||||||
|
pool_size: {{ $vNet.outbound.pool_size }}
|
||||||
|
use_quic: {{ $vNet.outbound.use_quic }}
|
||||||
|
cookies: {{ join "; " $vNet.outbound.cookies }}
|
||||||
|
force_resolve: {{ $vNet.outbound.force_resolve }}
|
||||||
|
|
||||||
|
# Logging
|
||||||
|
output: {{ $vLog.output }}
|
||||||
|
log_level: {{ $vLog.log_level }}
|
||||||
|
|
||||||
|
# Features
|
||||||
|
popular_enabled: {{ $vFeat.popular_enabled }}
|
||||||
|
statistics_enabled: {{ $vFeat.statistics_enabled }}
|
||||||
|
|
||||||
|
# Users and Accounts
|
||||||
|
registration_enabled: {{ $vUserAcc.registration_enabled }}
|
||||||
|
login_enabled: {{ $vUserAcc.login_enabled }}
|
||||||
|
captcha_enabled: {{ $vUserAcc.captcha_enabled }}
|
||||||
|
{{- if $vUserAcc.admins -}}
|
||||||
|
admins:
|
||||||
|
{{- range $vUserAcc.admins }}
|
||||||
|
- {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
admins: [""]
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
# Background Jobs
|
||||||
|
channel_threads: {{ $vBgJobs.channel_threads }}
|
||||||
|
channel_refresh_interval: {{ $vBgJobs.channel_refresh_interval }}
|
||||||
|
full_refresh: {{ $vBgJobs.full_refresh }}
|
||||||
|
feed_threads: {{ $vBgJobs.feed_threads }}
|
||||||
|
decrypt_polling: {{ $vBgJobs.decrypt_polling }}
|
||||||
|
|
||||||
|
# Jobs
|
||||||
|
jobs:
|
||||||
|
clear_expired_items:
|
||||||
|
enable: {{ $vJobs.clear_expired_items.enable }}
|
||||||
|
refresh_channels:
|
||||||
|
enable: {{ $vJobs.refresh_channels.enable }}
|
||||||
|
refresh_feeds:
|
||||||
|
enable: {{ $vJobs.refresh_feeds.enable }}
|
||||||
|
|
||||||
|
# Captcha
|
||||||
|
captcha_api_url: {{ $vCaptca.captca_api_url }}
|
||||||
|
captcha_key: {{ $vCaptca.captca_key }}
|
||||||
|
|
||||||
|
# Miscellaneaous
|
||||||
|
banner: {{ $vMisc.banner }}
|
||||||
|
use_pubsub_feeds: {{ $vMisc.use_pubsub_feeds }}
|
||||||
|
hmac_key: {{ $vMisc.hmac_key }}
|
||||||
|
{{- if $vMisc.dmca_content }}
|
||||||
|
dmca_content:
|
||||||
|
{{- range $vMisc.dmca_content }}
|
||||||
|
- {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
dmca_content: [""]
|
||||||
|
{{- end }}
|
||||||
|
cache_annotations: {{ $vMisc.cache_annotations }}
|
||||||
|
playlist_length_limit: {{ $vMisc.playlist_length_limit }}
|
||||||
|
modified_source_code_url: ""
|
||||||
|
|
||||||
|
# Default User Preferences
|
||||||
|
default_user_preferences:
|
||||||
|
|
||||||
|
# Internationalization
|
||||||
|
locale: {{ $vLoc.locale }}
|
||||||
|
region: {{ $vLoc.region }}
|
||||||
|
{{- with $vLoc.captions -}}
|
||||||
|
{{- if ne (len .) 3 -}}
|
||||||
|
{{- fail "Exactly 3 entries are required for Captions" -}}
|
||||||
|
{{- end }}
|
||||||
|
captions:
|
||||||
|
{{- range $c := . }}
|
||||||
|
- {{ $c }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else }}
|
||||||
|
captions: ["","",""]
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
# Interface
|
||||||
|
dark_mode: {{ $vUI.dark_mode }}
|
||||||
|
thin_mode: {{ $vUI.thin_mode }}
|
||||||
|
{{- with $vUI.feed_menu }}
|
||||||
|
{{- if gt (len . ) 4 -}}
|
||||||
|
{{- fail "Max 4 Feed menu items are accepted" -}}
|
||||||
|
{{- end }}
|
||||||
|
feed_menu:
|
||||||
|
{{- range $f := . }}
|
||||||
|
- {{ $f }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else }}
|
||||||
|
feed_menu: ["Popular", "Trending", "Subscriptions", "Playlists"]
|
||||||
|
{{- end }}
|
||||||
|
default_home: {{ $vUI.default_home }}
|
||||||
|
max_results: {{ $vUI.max_results }}
|
||||||
|
annotations: {{ $vUI.annotations }}
|
||||||
|
annotations_subscribed: {{ $vUI.annotations_subscribed }}
|
||||||
|
{{- with $vUI.comments }}
|
||||||
|
{{- if ne (len .) 2 -}}
|
||||||
|
{{- fail "Exactly 2 entries are required for comments" -}}
|
||||||
|
{{- end }}
|
||||||
|
comments:
|
||||||
|
{{- range $c := . }}
|
||||||
|
- {{ $c }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
comments: ["youtube", ""]
|
||||||
|
{{- end }}
|
||||||
|
player_style: {{ $vUI.player_style }}
|
||||||
|
related_videos: {{ $vUI.related_videos }}
|
||||||
|
|
||||||
|
# Video Player Behaviour
|
||||||
|
autoplay: {{ $vVidBeh.autoplay }}
|
||||||
|
continue: {{ $vVidBeh.continue }}
|
||||||
|
continue_autoplay: {{ $vVidBeh.continue_autoplay }}
|
||||||
|
listen: {{ $vVidBeh.listen }}
|
||||||
|
video_loop: {{ $vVidBeh.video_loop }}
|
||||||
|
|
||||||
|
# Video Playback Settigns
|
||||||
|
quality: {{ $vVidPlay.quality }}
|
||||||
|
quality_dash: {{ $vVidPlay.quality_dash }}
|
||||||
|
speed: {{ $vVidPlay.speed | float64 }}
|
||||||
|
volume: {{ $vVidPlay.volume }}
|
||||||
|
vr_mode: {{ $vVidPlay.vr_mode }}
|
||||||
|
|
||||||
|
# Subscription Feed
|
||||||
|
latest_only: {{ $vSubFeed.latest_only }}
|
||||||
|
notifications_only: {{ $vSubFeed.notifications_only }}
|
||||||
|
unseen_only: {{ $vSubFeed.unseen_only }}
|
||||||
|
sort: {{ $vSubFeed.sort }}
|
||||||
|
|
||||||
|
# Miscellaneous
|
||||||
|
local: {{ $vUserMisc.local }}
|
||||||
|
show_nick: {{ $vUserMisc.show_nick }}
|
||||||
|
automatic_instance_redirect: {{ $vUserMisc.automatic_instance_redirect }}
|
||||||
|
extend_desc: {{ $vUserMisc.extend_desc }}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
{{- define "invidious.dbseed" -}}
|
||||||
|
image: "{{ .Values.ubuntuImage.repository }}:{{ .Values.ubuntuImage.tag }}"
|
||||||
|
env:
|
||||||
|
- name: POSTGRES_DB
|
||||||
|
value: {{ .Values.postgresql.postgresqlDatabase }}
|
||||||
|
- name: POSTGRES_USER
|
||||||
|
value: {{ .Values.postgresql.postgresqlUsername }}
|
||||||
|
{{/* PG* variables are for the psql client */}}
|
||||||
|
- name: PGPORT
|
||||||
|
value: "5432"
|
||||||
|
- name: PGHOST
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: dbcreds
|
||||||
|
key: plainhost
|
||||||
|
- name: PGPASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: dbcreds
|
||||||
|
key: postgresql-password
|
||||||
|
command:
|
||||||
|
- /bin/sh
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
echo "Starting DB Seed..."
|
||||||
|
mkdir -p invidious && cd invidious
|
||||||
|
|
||||||
|
echo "Fetching seed files..."
|
||||||
|
git init && \
|
||||||
|
git remote add invidious https://github.com/iv-org/invidious.git && \
|
||||||
|
git fetch invidious && \
|
||||||
|
# Fetch config and docker dirs
|
||||||
|
git checkout invidious/master -- docker config
|
||||||
|
|
||||||
|
# Move config into docker dir
|
||||||
|
echo "Preparing directory structure..."
|
||||||
|
mv -fv config docker
|
||||||
|
|
||||||
|
echo "Performing the seed..."
|
||||||
|
cd docker
|
||||||
|
./init-invidious-db.sh
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{{/* Make sure all variables are set properly */}}
|
||||||
|
{{- include "tc.common.loader.init" . }}
|
||||||
|
|
||||||
|
{{- include "invidious.config" . }}
|
||||||
|
|
||||||
|
{{- $_ := set .Values.installContainers "dbseed" (include "invidious.dbseed" . | fromYaml) -}}
|
||||||
|
|
||||||
|
{{/* Render the templates */}}
|
||||||
|
{{ include "tc.common.loader.apply" . }}
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
image:
|
||||||
|
repository: tccr.io/truecharts/invidious
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
tag: latest@sha256:bb8e2e0eedf9296a1af274e09d898555b0bfbd62aec52a346bddfb9b3b1dc983
|
||||||
|
|
||||||
|
podSecurityContext:
|
||||||
|
runAsGroup: 0
|
||||||
|
runAsUser: 0
|
||||||
|
|
||||||
|
securityContext:
|
||||||
|
readOnlyRootFilesystem: false
|
||||||
|
runAsNonRoot: false
|
||||||
|
|
||||||
|
invidious:
|
||||||
|
network:
|
||||||
|
inbound:
|
||||||
|
external_port: 10594
|
||||||
|
https_only: false
|
||||||
|
domain: ""
|
||||||
|
hsts: true
|
||||||
|
outbound:
|
||||||
|
disable_proxy: false
|
||||||
|
pool_size: 100
|
||||||
|
use_quic: false
|
||||||
|
cookies: []
|
||||||
|
force_resolve: "ipv4"
|
||||||
|
|
||||||
|
logging:
|
||||||
|
output: STDOUT
|
||||||
|
log_level: "Info"
|
||||||
|
|
||||||
|
features:
|
||||||
|
popular_enabled: true
|
||||||
|
statistics_enabled: false
|
||||||
|
|
||||||
|
users_accounts:
|
||||||
|
registration_enabled: true
|
||||||
|
login_enabled: true
|
||||||
|
captcha_enabled: true
|
||||||
|
admins: []
|
||||||
|
|
||||||
|
background_jobs:
|
||||||
|
channel_threads: 1
|
||||||
|
channel_refresh_interval: 30m
|
||||||
|
full_refresh: false
|
||||||
|
feed_threads: 1
|
||||||
|
decrypt_polling: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
clear_expired_items:
|
||||||
|
enable: true
|
||||||
|
refresh_channels:
|
||||||
|
enable: true
|
||||||
|
refresh_feeds:
|
||||||
|
enable: true
|
||||||
|
|
||||||
|
captcha:
|
||||||
|
captcha_api_url: "https://api.anti-captcha.com"
|
||||||
|
captcha_key: ""
|
||||||
|
|
||||||
|
miscellaneous:
|
||||||
|
banner: ""
|
||||||
|
use_pubsub_feeds: false
|
||||||
|
hmac_key: ""
|
||||||
|
dmca_content: []
|
||||||
|
cache_annotations: false
|
||||||
|
playlist_length_limit: 500
|
||||||
|
|
||||||
|
default_user_preferences:
|
||||||
|
internationalization:
|
||||||
|
locale: en-US
|
||||||
|
region: US
|
||||||
|
captions: []
|
||||||
|
interface:
|
||||||
|
dark_mode: dark
|
||||||
|
thin_mode: false
|
||||||
|
feed_menu: []
|
||||||
|
default_home: Popular
|
||||||
|
max_results: 40
|
||||||
|
annotations: false
|
||||||
|
annotations_subscribed: false
|
||||||
|
comments: []
|
||||||
|
player_style: invidious
|
||||||
|
related_videos: true
|
||||||
|
video_player_behavior:
|
||||||
|
autoplay: false
|
||||||
|
continue: false
|
||||||
|
continue_autoplay: true
|
||||||
|
listen: false
|
||||||
|
video_loop: false
|
||||||
|
video_playback_settings:
|
||||||
|
quality: hd720
|
||||||
|
quality_dash: auto
|
||||||
|
speed: 1.25
|
||||||
|
volume: 100
|
||||||
|
vr_mode: true
|
||||||
|
subscription_feed:
|
||||||
|
latest_only: false
|
||||||
|
notifications_only: false
|
||||||
|
unseen_only: false
|
||||||
|
sort: published
|
||||||
|
miscellaneous:
|
||||||
|
local: false
|
||||||
|
show_nick: true
|
||||||
|
automatic_instance_redirect: false
|
||||||
|
extend_desc: false
|
||||||
|
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: '{{ include "tc.common.names.fullname" . }}-invidious-config'
|
||||||
|
|
||||||
|
service:
|
||||||
|
main:
|
||||||
|
ports:
|
||||||
|
main:
|
||||||
|
port: 10594
|
||||||
|
protocol: HTTP
|
||||||
|
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
type: HTTP
|
||||||
|
readiness:
|
||||||
|
type: HTTP
|
||||||
|
startup:
|
||||||
|
type: HTTP
|
||||||
|
|
||||||
|
postgresql:
|
||||||
|
enabled: true
|
||||||
|
existingSecret: dbcreds
|
||||||
|
postgresqlDatabase: invidious
|
||||||
|
# DB User cannot be changed
|
||||||
|
# hardcoded from upstream
|
||||||
|
postgresqlUsername: kemal
|
||||||
|
|
||||||
|
portal:
|
||||||
|
enabled: true
|
||||||
Reference in New Issue
Block a user