Browse Source

Add originals files, forked from https://github.com/MikaXII/helm-charts with some fixes

tags/v1.0.1
LecygneNoir 1 year ago
parent
commit
a182a1b93c
10 changed files with 272 additions and 2 deletions
  1. +5
    -0
      Chart.yaml
  2. +36
    -2
      README.md
  3. BIN
      charts/redis-3.3.5.tgz
  4. +6
    -0
      requirements.lock
  5. +5
    -0
      requirements.yaml
  6. +19
    -0
      templates/NOTES.txt
  7. +32
    -0
      templates/_helpers.tpl
  8. +112
    -0
      templates/deployment.yaml
  9. +38
    -0
      templates/ingress.yaml
  10. +19
    -0
      templates/service.yaml

+ 5
- 0
Chart.yaml View File

@ -0,0 +1,5 @@
apiVersion: v1
appVersion: "1.0.x"
description: A Helm chart for Kubernetes
name: peertube
version: 0.1.0

+ 36
- 2
README.md View File

@ -1,3 +1,37 @@
# peertube-helm
# [Peertube](https://github.com/Chocobozzz/PeerTube) on kubernetes
Helm chart for deploying Peertube on kubernetes
Federated (ActivityPub) video streaming platform using P2P (BitTorrent) directly in the web browser with WebTorrent.
---
## Before deploy
Currently if you want use persistent volume you need to create persistent volume and persistent volume claim
## Installing the chart
`$ helm install --name my-release peertube`
Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,
```
$ helm install --name my-release \
--set environment.hostname=new.domain.tld,\
postgresql.postgresPassword=secretpassword \
peertube
```
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
`$ helm install --name my-release -f values.yaml peertube`
## Status : WIP
- [x] Run
- [x] Persist perrtube data (redis and postgresql to)
- [ ] Improve readme for deployment
## Source
Originated from https://github.com/MikaXII/helm-charts
Thanks!

BIN
charts/redis-3.3.5.tgz View File


+ 6
- 0
requirements.lock View File

@ -0,0 +1,6 @@
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

+ 5
- 0
requirements.yaml View File

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

+ 19
- 0
templates/NOTES.txt View File

@ -0,0 +1,19 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "peertube.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "peertube.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "peertube.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "peertube.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}

+ 32
- 0
templates/_helpers.tpl View File

@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "peertube.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 "peertube.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 "peertube.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

+ 112
- 0
templates/deployment.yaml View File

@ -0,0 +1,112 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "peertube.fullname" . }}
labels:
app: {{ template "peertube.name" . }}
chart: {{ template "peertube.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "peertube.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "peertube.name" . }}
release: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 9000
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 300
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 300
env:
- name: PEERTUBE_WEBSERVER_HOSTNAME
value: {{ .Values.environment.hostname }}
- name: PEERTUBE_WEBSERVER_PORT
value: {{ .Values.environment.http | quote }}
- name: PEERTUBE_WEBSERVER_HTTPS
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
- name: PEERTUBE_SMTP_USERNAME
value: {{ .Values.environment.smtpUser | quote }}
- name: PEERTUBE_SMTP_PASSWORD
value: {{ .Values.environment.smtpPassword }}
- name: PEERTUBE_SMTP_HOSTNAME
value: {{ .Values.environment.smtpHostname }}
- name: PEERTUBE_SMTP_PORT
value: {{ .Values.environment.smtpPort | quote }}
- name: PEERTUBE_SMTP_FROM
value: {{ .Values.environment.smtpFrom | quote }}
- name: PEERTUBE_SMTP_TLS
value: {{ .Values.environment.smtpTls | quote }}
- name: PEERTUBE_ADMIN_EMAIL
value: {{ .Values.environment.admin | quote }}
- name: PEERTUBE_SIGNUP_ENABLED
value: {{ .Values.environment.signup | quote }}
- name: PEERTUBE_TRANSCODING_ENABLED
value: {{ .Values.environment.transcoding | quote }}
- name: PEERTUBE_TRUST_PROXY
value: {{ .Values.environment.trustProxy | quote }}
volumeMounts:
- name: data
mountPath: /data
- name: config
mountPath: /config
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
volumes:
{{- if .Values.persistence.data.enabled }}
- name: data
persistentVolumeClaim:
claimName: {{ .Values.persistence.data.existingClaim }}
{{- else }}
- name: data
emptyDir: {}
{{- end }}
{{- if .Values.persistence.config.enabled }}
- name: config
persistentVolumeClaim:
claimName: {{ .Values.persistence.config.existingClaim }}
{{- else }}
- name: config
emptyDir: {}
{{- end }}

+ 38
- 0
templates/ingress.yaml View File

@ -0,0 +1,38 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "peertube.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ template "peertube.name" . }}
chart: {{ template "peertube.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}
{{- end }}

+ 19
- 0
templates/service.yaml View File

@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "peertube.fullname" . }}
labels:
app: {{ template "peertube.name" . }}
chart: {{ template "peertube.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ template "peertube.name" . }}
release: {{ .Release.Name }}

Loading…
Cancel
Save