11 Commits

10 changed files with 95 additions and 48 deletions
Split View
  1. +47
    -2
      CHANGELOG.md
  2. +3
    -3
      Chart.yaml
  3. +19
    -6
      README.md
  4. BIN
      charts/redis-3.3.5.tgz
  5. +0
    -6
      requirements.lock
  6. +0
    -5
      requirements.yaml
  7. +10
    -1
      scripts/peertube-init.sh
  8. +4
    -4
      templates/deployment.yaml
  9. +8
    -3
      templates/ingress.yaml
  10. +4
    -18
      values.yaml

+ 47
- 2
CHANGELOG.md View File

@ -1,8 +1,53 @@
# v1.6.0
## Important
- From Peertube 6.0, [storage directoy for video changes](https://github.com/Chocobozzz/PeerTube/releases/tag/v6.0.0)! This new Chart version includes an init script that move directory from `/data/videos` to `/data/web-videos` before starting peertube (as in k8s, it's very hard to move data in place 😅 ) **but you need** to edit your config file accordingly!
## Features
- Compatibility with Peertube v6.0.2
- Use the new production.yaml.new files generated by peertube during upgrade if it exists
# v1.5.1
## Important
- Add pathType and ingressClassName in values.yml for better support in k8s 1.25+
## Feature
- Compatibility with Peertube 5.2.1
# v1.5.1
## Important
- Add pathType and ingressClassName in values.yml for better support in k8s 1.25+
## Feature
- Compatibility with Peertube 5.2.1
# v1.5.0
## Important
- Removed redis from this chart as it's osbolete. You need to install a redis server aside! See README for details.
## Features:
- Compatibility with peertube v4.3.0
# v1.4.0
## Feature
- Upgrade Ingress template for k8s 1.19+ compatibility
- Remove fixed database suffix from deployment, please use production.yml to configure if default "_prod" is not sufficient
# v1.3.0
## Feature
- Bump to peertube v4.0 by default. Warn if you are upgrading for 3.4, see release note for post maj script: https://github.com/Chocobozzz/PeerTube/releases/tag/v4.0.0
# v1.2.1
## Fix
- Adjust initialDelaySecond for startupProbe to avoid waiting 5min even if the instance starts quickly
- Adjust startupProbe port to use 9000 instead of http
- Adjust startupProbe port to use 9000 instead of http
# v1.2.0
@ -24,7 +69,7 @@ Is you used it, configure your production.yml instead for better reliability.
# v1.1.0
## Features
## Features
Add a nginx sidecar to use the official Peertube optimisations for Nginx (Fix #2)

+ 3
- 3
Chart.yaml View File

@ -1,5 +1,5 @@
apiVersion: v1
appVersion: "v2.3.0-buster"
description: A Helm chart for Kubernetes
appVersion: "v6.0.2-bookworm"
description: A Helm chart to install peertube in kubernetes
name: peertube
version: 1.2.1
version: 1.6.0

+ 19
- 6
README.md View File

@ -4,7 +4,7 @@ Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly
---
## Status : WIP
## Status : WIP but workable
- [x] Run Peertube and Redis
- [x] Use pvc to persist data
@ -12,12 +12,25 @@ Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly
## Before deploying
Currently if you want use persistent volume you need to create persistent volume and persistent volume claim. You may use sample claims from `sample`:
Currently if you want use persistent volume you need to create persistent volume and persistent volume claim. You may use sample claims from `sample`:
- change the storageclass from `ChangeMeStorageClass` to your correct class
- apply the claim: `kubectl apply -f sample/claim.pvc-pt.yml`
You also need a postgresql server.
If you know what you are doing and want to store postgres in Kubernetes, I suggest the excellent [stolon](https://github.com/helm/charts/tree/master/stable/stolon).
### Postgres
You need a postgresql server.
If you know what you are doing and want to store postgres in Kubernetes, I suggest [postgres-operator](https://access.crunchydata.com/documentation/postgres-operator/5.1.1/) from CrunchyData
### You also need a redis
From peertube helm v1.5.0, redis is no more provided inside the chart. Indeed peertube does not handle anymore redis 3.3, so I advice installing and managing redis outside the chart like postgres cluster.
I suggest using [bitnami redis](https://github.com/bitnami/charts/tree/master/bitnami/redis) with `architecture=standalone` to avoid uneeded slave (Peertube only need master)
Once installed, use following values to pass needed info to your peertube instance.
```
redisHostname
redisAuth
```
## Installing the chart
@ -40,5 +53,5 @@ See the sample/values.yml for example of values to use
## Source
Originated from https://github.com/MikaXII/helm-charts
Thanks!
Originated from https://github.com/MikaXII/helm-charts
Thanks!

BIN
charts/redis-3.3.5.tgz View File


+ 0
- 6
requirements.lock View File

@ -1,6 +0,0 @@
dependencies:
- name: redis
repository: https://kubernetes-charts.storage.googleapis.com
version: 3.3.5
digest: sha256:bc60370cbce6d02249e972f74489dc20248f8bd3d61d7e031d6e186ff07c42ad
generated: 2018-06-08T16:58:13.072321307+02:00

+ 0
- 5
requirements.yaml View File

@ -1,5 +0,0 @@
# requirements.yaml
dependencies:
- name: redis
version: "3.3.5"
repository: "@stable"

+ 10
- 1
scripts/peertube-init.sh View File

@ -8,10 +8,19 @@ fi
# Always copy default and custom env configuration file, in cases new keys were added
cp /app/config/default.yaml /config
cp /app/support/docker/production/config/custom-environment-variables.yaml /config
# From 5.2 peertube upgrade script creates a production.yaml.new containing production.yml config and news mandatory keys, directly usable
if [ -f "/config/production.yaml.new" ]; then
mv /config/production.yaml.new /config/production.yaml
fi
# Patch user after the cp
find /config ! -user peertube -exec chown peertube:peertube {} \;
# Move videos data for Peertube 6.0.0 before starting peertube
if [ -d "/data/videos" -a ! -d "/data/web-videos" ]; then
mv /data/videos /data/web-videos
fi
# Prepare assets for the Nginx sidecar
cp -r /app/client/dist/* /assets/
exit 0
exit 0

+ 4
- 4
templates/deployment.yaml View File

@ -149,7 +149,7 @@ spec:
httpGet:
path: /
port: http
initialDelaySeconds: 300
initialDelaySeconds: 30
failureThreshold: 3
periodSeconds: 10
{{- end }}
@ -167,14 +167,14 @@ spec:
value: {{ .Values.environment.httpsEnabled | quote }}
- name: PEERTUBE_DB_HOSTNAME
value: {{ .Values.environment.dbHostname }}
- name: PEERTUBE_DB_SUFFIX
value: _prod
- name: PEERTUBE_DB_USERNAME
value: {{ .Values.environment.dbUser }}
- name: PEERTUBE_DB_PASSWORD
value: {{ .Values.environment.dbPassword }}
- name: PEERTUBE_REDIS_HOSTNAME
value: {{ .Release.Name }}-{{ .Values.environment.redisHostname }}-master
value: {{ .Values.environment.redisHostname }}
- name: PEERTUBE_REDIS_AUTH
value: {{ .Values.environment.redisAuth }}
- name: PEERTUBE_SMTP_USERNAME
value: {{ .Values.environment.smtpUser | quote }}
- name: PEERTUBE_SMTP_PASSWORD

+ 8
- 3
templates/ingress.yaml View File

@ -1,7 +1,8 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "peertube.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: extensions/v1beta1
{{- $ingressPathType := .Values.ingress.pathType -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
@ -15,6 +16,7 @@ metadata:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.ingressClassName }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
@ -31,8 +33,11 @@ spec:
http:
paths:
- path: {{ $ingressPath }}
pathType: {{ $ingressPathType }}
backend:
serviceName: {{ $fullName }}
servicePort: http
service:
name: {{ $fullName }}
port:
number: 9000
{{- end }}
{{- end }}

+ 4
- 18
values.yaml View File

@ -7,7 +7,7 @@ replicaCount: 1
image:
repository: chocobozzz/peertube
tag: v2.1.0-buster
tag: v6.0.2-bookworm
pullPolicy: IfNotPresent
service:
@ -26,11 +26,12 @@ ports:
ingress:
enabled: true
ingressClassName: haproxy
annotations:
kubernetes.io/ingress.class: haproxy
kubernetes.io/tls-acme: "true"
certmanager.k8s.io/cluster-issuer: your-certmanager
path: /
pathType: Prefix
hosts:
- peertube.domain.tld
tls:
@ -45,10 +46,6 @@ chowncontainer:
enabled: true
resources:
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
requests:
cpu: 3
memory: 6Gi
@ -86,6 +83,7 @@ environment:
dbUser: peertube
dbPassword: postgres
redisHostname: redis
redisAuth: redispassword
smtpUser: peertube@peertube.domain.tld
smtpPassword: smtppassword
smtpHostname: smtp.peertube.domain.tld
@ -109,15 +107,3 @@ nginxproxy:
persistence:
enabled: false
existingClaim: pvc-nginx-proxy
redis:
usePassword: false
password: peertube
master:
persistence:
enabled: true
path: /data
# PVC are not handled by helm, you need to create redis volume before deploying helm
persistence:
enabled: true
existingClaim: pvc-redis-prod

Loading…
Cancel
Save