Bumpbed nzbhydra to 2.26.0

This commit is contained in:
Jonathan Ervine 2020-08-27 16:45:01 +08:00
parent 0b812da5e4
commit c02e33f9f6
33 changed files with 1272 additions and 5 deletions

View File

@ -14,10 +14,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.2
version: 0.1.3
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 10.6.2-amd64
appVersion: 10.6.3-amd64
icon: https://git.ervine.org/jonny/charts/raw/branch/master/jellyfin/jellyfin.png

View File

@ -6,7 +6,7 @@ replicaCount: 1
image:
repository: harbor.ervine.dev/public/x86_64/jellyfin
pullPolicy: IfNotPresent
pullPolicy: Always
imagePullSecrets: []
nameOverride: ""

View File

@ -14,10 +14,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.5
version: 0.1.6
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: v2.25.0
appVersion: v2.26.0
icon: https://git.ervine.org/jonny/x86_64-alpine-nzbhydra/raw/branch/master/hydra.png

Binary file not shown.

14
plex/Chart.yaml Normal file
View File

@ -0,0 +1,14 @@
apiVersion: v1
appVersion: 1.19.5.3112-b23ab3896-ls113
description: Plex Media Server
name: plex
version: 0.1
keywords:
- plex
home: https://plex.tv/
icon: https://www.plex.tv/wp-content/uploads/2018/01/pmp-icon-1.png
sources:
- https://github.com/munnerz/kube-plex
- https://harbor.ervine.dev/public/x86_64/plex
maintainers:
- name: Jonny

59
plex/README.md Normal file
View File

@ -0,0 +1,59 @@
# Plex Media Server helm chart
## Configuration
The following tables lists the configurable parameters of the Plex chart and their default values.
| Parameter | Description | Default |
|----------------------------|-------------------------------------|---------------------------------------------------------|
| `image.repository` | Image repository | `plexinc/pms-docker` |
| `image.tag` | Image tag. Possible values listed [here](https://hub.docker.com/r/plexinc/pms-docker/tags/).| `1.10.1.4602-f54242b6b`|
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `kubePlex.enabled` | Enable KubPlex transcoder | `true` |
| `kubePlex.image.repository` | Image repository | `quay.io/munnerz/kube-plex` |
| `kubePlex.image.tag` | Image tag. | `latest`|
| `kubePlex.image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `claimToken` | Plex Claim Token to authenticate your acount | `` |
| `timezone` | Timezone plex instance should run as, e.g. 'America/New_York' | `Europe/London` |
| `service.type` | Kubernetes service type for the plex GUI/API | `ClusterIP` |
| `service.port` | Kubernetes port where the plex GUI/API is exposed| `32400` |
| `service.annotations` | Service annotations for the Plex GUI | `{}` |
| `service.labels` | Custom labels | `{}` |
| `service.loadBalancerIP` | Load balancer IP for the Plex GUI; set `service.type` to `LoadBalancer` to use this. | `{}` |
| `service.loadBalancerSourceRanges` | List of IP CIDRs allowed access to load balancer (if supported) | None
| `ingress.enabled` | Enables Ingress | `false` |
| `ingress.annotations` | Ingress annotations | `{}` |
| `ingress.labels` | Custom labels | `{}`
| `ingress.path` | Ingress path | `/` |
| `ingress.hosts` | Ingress accepted hostnames | `chart-example.local` |
| `ingress.tls` | Ingress TLS configuration | `[]` |
| `rbac.create` | Create RBAC roles? | `true` |
| `nodeSelector` | Node labels for pod assignment | `beta.kubernetes.io/arch: amd64` |
| `persistence.transcode.enabled` | Use persistent volume for transcoding | `false` |
| `persistence.transcode.size` | Size of persistent volume claim | `20Gi` |
| `persistence.transcode.claimName`| Use an existing PVC to persist data | `nil` |
| `persistence.transcode.subPath` | SubPath to use for existing Claim | `nil` |
| `persistence.transcode.storageClass` | Type of persistent volume claim | `-` |
| `persistence.transcode.accessMode` | Persistent volume access mode | `ReadWriteMany` |
| `persistence.data.size` | Size of persistent volume claim | `40Gi` |
| `persistence.data.claimName`| Use an existing PVC to persist data | `nil` |
| `persistence.data.subPath` | SubPath to use for existing Claim | `nil` |
| `persistence.data.storageClass` | Type of persistent volume claim | `-` |
| `persistence.data.accessMode` | Persistent volume access mode | `ReadWriteMany` |
| `persistence.extraData` | Extra data mounts. Should be an array of items matching persistence.data entries | `[]` |
| `persistence.config.size` | Size of persistent volume claim | `20Gi` |
| `persistence.config.claimName`| Use an existing PVC to persist data | `nil` |
| `persistence.config.subPath` | SubPath to use for existing Claim | `nil` |
| `persistence.config.storageClass` | Type of persistent volume claim | `-` |
| `persistence.config.accessMode` | Persistent volume access mode | `ReadWriteMany` |
| `resources` | CPU/Memory resource requests/limits | `{}` |
| `proxy.enable` | use to enable PMS proxy environmental variable | `{false}` |
| `proxy.http` | HTTP_PROXY value 'http://proxy.lan:8080' | `{}` |
| `proxy.https` | HTTPS_PROXY value 'http://proxy.lan:8080' | `{}` |
| `proxy.noproxy` | NO_PROXY value 'localhost,127.0.0.1,10.96.0.0/12,10.244.0.0/12' | `{}` |
| `tolerations` | Pod tolerations | `[]` |
| `affinity` | Pod affinity configuration | `{}` |
| `podAnnotations` | Key-value pairs to add as pod annotations | `{}` |
| `deploymentAnnotations` | Key-value pairs to add as deployment annotations | `{}` |
Read through the [values.yaml](values.yaml) file. It has several commented out suggested values.

19
plex/templates/NOTES.txt Normal file
View File

@ -0,0 +1,19 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http://{{ . }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "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 "fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "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:{{ .Values.service.externalPort }}
{{- end }}

View File

@ -0,0 +1,16 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "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).
*/}}
{{- define "fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

View File

@ -0,0 +1,233 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.deploymentAnnotations }}
annotations:
{{- range $key, $value := .Values.deploymentAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
replicas: 1
revisionHistoryLimit: 3
strategy:
type: Recreate
selector:
matchLabels:
app: {{ template "name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "name" . }}
release: {{ .Release.Name }}
{{- if .Values.podAnnotations }}
annotations:
{{- range $key, $value := .Values.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
serviceAccountName: {{ if .Values.rbac.create }}{{ template "fullname" . }}{{ else }}{{ .Values.rbac.serviceAccountName | quote }}{{ end }}
hostname: "{{ template "fullname" . }}"
{{- if .Values.kubePlex.enabled }}
initContainers:
- name: kube-plex-install
image: "{{ .Values.kubePlex.image.repository }}:{{ .Values.kubePlex.image.tag }}"
imagePullPolicy: {{ .Values.kubePlex.image.pullPolicy }}
command:
- cp
- /kube-plex
- /shared/kube-plex
volumeMounts:
- name: shared
mountPath: /shared
{{- end }}
containers:
- name: plex
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.kubePlex.enabled }}
# We replace the PMS binary with a postStart hook to save having to
# modify the default image entrypoint.
lifecycle:
postStart:
exec:
command:
- bash
- -c
- |
#!/bin/bash
set -e
mv '/usr/lib/plexmediaserver/Plex Transcoder' '/usr/lib/plexmediaserver/Plex Transcoder.orig'
cp /shared/kube-plex '/usr/lib/plexmediaserver/Plex Transcoder'
{{- end }}
readinessProbe:
httpGet:
path: /identity
port: 32400
initialDelaySeconds: 15
timeoutSeconds: 5
livenessProbe:
httpGet:
path: /identity
port: 32400
initialDelaySeconds: 10
timeoutSeconds: 10
ports:
- name: pms
containerPort: 32400
- name: http
containerPort: 32400
- name: https
containerPort: 32443
- name: dlna
containerPort: 1900
protocol: UDP
- name: pht
containerPort: 3005
- name: bonjour
containerPort: 5353
protocol: UDP
- name: roku
containerPort: 8324
- name: gdm410
containerPort: 32410
protocol: UDP
- name: gdm412
containerPort: 32412
protocol: UDP
- name: gdm413
containerPort: 32413
protocol: UDP
- name: gdm414
containerPort: 32414
protocol: UDP
- name: plexdlna
containerPort: 32469
env:
- name: TZ
value: "{{ .Values.timezone }}"
# TODO: move this to a secret?
- name: PLEX_CLAIM
value: "{{ .Values.claimToken }}"
# kube-plex env vars
- name: PMS_INTERNAL_ADDRESS
value: http://{{ template "fullname" . }}:32400
- name: PMS_IMAGE
value: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
- name: KUBE_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: TRANSCODE_PVC
{{- if .Values.persistence.transcode.claimName }}
value: "{{ .Values.persistence.transcode.claimName }}"
{{- else }}
value: "{{ template "fullname" . }}-transcode"
{{- end }}
- name: DATA_PVC
{{- if .Values.persistence.data.claimName }}
value: "{{ .Values.persistence.data.claimName }}"
{{- else }}
value: "{{ template "fullname" . }}-data"
{{- end }}
- name: CONFIG_PVC
{{- if .Values.persistence.config.claimName }}
value: "{{ .Values.persistence.config.claimName }}"
{{- else }}
value: "{{ template "fullname" . }}-config"
{{- end }}
{{- if .Values.proxy.enable }}
{{- if .Values.proxy.http }}
- name: "HTTP_PROXY"
value: "{{.Values.proxy.http}}"
{{- end }}
{{- if .Values.proxy.https }}
- name: "HTTPS_PROXY"
value: "{{.Values.proxy.https}}"
{{- end }}
{{- if .Values.proxy.noproxy }}
- name: "NO_PROXY"
value: "{{.Values.proxy.noproxy}}"
{{- end }}
{{- end }}
volumeMounts:
- name: data
mountPath: /plex-library
{{- if .Values.persistence.data.subPath }}
subPath: {{ .Values.persistence.data.subPath }}
{{ end }}
- name: config
mountPath: /config
{{- if .Values.persistence.config.subPath }}
subPath: {{ .Values.persistence.config.subPath }}
{{ end }}
- name: transcode
mountPath: /transcode
{{- if .Values.persistence.transcode.subPath }}
subPath: {{ .Values.persistence.transcode.subPath }}
{{ end }}
{{- range .Values.persistence.extraData }}
- mountPath: "/data-{{ .name }}"
name: "extradata-{{ .name }}"
{{- end }}
- name: shared
mountPath: /shared
resources:
{{ toYaml .Values.resources | indent 10 }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
volumes:
- name: data
persistentVolumeClaim:
{{- if .Values.persistence.data.claimName }}
claimName: "{{ .Values.persistence.data.claimName }}"
{{- else }}
claimName: "{{ template "fullname" . }}-data"
{{- end }}
- name: config
persistentVolumeClaim:
{{- if .Values.persistence.config.claimName }}
claimName: "{{ .Values.persistence.config.claimName }}"
{{- else }}
claimName: "{{ template "fullname" . }}-config"
{{- end }}
- name: transcode
{{- if .Values.persistence.transcode.enabled }}
persistentVolumeClaim:
{{- if .Values.persistence.transcode.claimName }}
claimName: "{{ .Values.persistence.transcode.claimName }}"
{{- else }}
claimName: "{{ template "fullname" . }}-transcode"
{{- end }}
{{- else }}
emptyDir: {}
{{- end }}
{{- range .Values.persistence.extraData }}
- name: "extradata-{{ .name }}"
persistentVolumeClaim:
{{- if .claimName }}
claimName: "{{ .claimName }}"
{{- else }}
claimName: "extradata-{{ .name }}"
{{- end }}
{{- end }}
- name: shared
emptyDir: {}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}

View File

@ -0,0 +1,31 @@
{{- if .Values.ingress.enabled -}}
{{- $serviceName := include "fullname" . -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
annotations:
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
rules:
{{- range $host := .Values.ingress.hosts }}
- host: {{ $host }}
http:
paths:
- path: /
backend:
serviceName: {{ $serviceName }}
servicePort: pms
{{- end -}}
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
{{- end -}}
{{- end -}}

54
plex/templates/rbac.yaml Normal file
View File

@ -0,0 +1,54 @@
{{- if .Values.rbac.create -}}
{{- if .Values.kubePlex.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
rules:
- apiGroups:
- ""
resources:
- pods
- pods/attach
- pods/exec
- pods/portforward
- pods/proxy
verbs:
- create
- delete
- deletecollection
- get
- list
- patch
- update
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ template "fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ template "fullname" . }}
namespace: {{ .Release.Namespace | quote }}
{{- end }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "fullname" . }}
{{- end }}

View File

@ -0,0 +1,59 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "fullname" . }}
labels:
app: {{ template "name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.service.labels }}
{{ toYaml .Values.service.labels | indent 4 }}
{{- end }}
{{- with .Values.service.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if (or (eq .Values.service.type "ClusterIP") (empty .Values.service.type)) }}
type: ClusterIP
{{- if .Values.service.clusterIP }}
clusterIP: {{ .Values.service.clusterIP }}
{{end}}
{{- else if eq .Values.service.type "LoadBalancer" }}
type: {{ .Values.service.type }}
{{- if .Values.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
{{- if .Values.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{ toYaml .Values.service.loadBalancerSourceRanges | indent 4 }}
{{- end -}}
{{- else }}
type: {{ .Values.service.type }}
{{- end }}
{{- if .Values.service.externalIPs }}
externalIPs:
{{ toYaml .Values.service.externalIPs | indent 4 }}
{{- end }}
{{- if .Values.service.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
{{- end }}
ports:
- name: pms
port: {{ .Values.service.port }}
protocol: TCP
targetPort: pms
{{ if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
nodePort: {{.Values.service.nodePort}}
{{ end }}
- name: http
port: 80
targetPort: pms
- name: https
port: 443
targetPort: 32443
selector:
app: {{ template "name" . }}
release: {{ .Release.Name }}

View File

@ -0,0 +1,66 @@
{{- if and (not .Values.persistence.transcode.claimName) .Values.persistence.transcode.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ template "fullname" . }}-transcode
labels:
app: {{ template "name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
component: transcode
spec:
accessModes:
- {{ .Values.persistence.config.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.transcode.size | quote }}
{{- if .Values.persistence.transcode.storageClass }}
storageClassName: {{ .Values.persistence.transcode.storageClass | quote }}
{{- end }}
---
{{- end }}
{{- if not .Values.persistence.config.claimName }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ template "fullname" . }}-config
labels:
app: {{ template "name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
component: config
spec:
accessModes:
- {{ .Values.persistence.config.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.config.size | quote }}
{{- if .Values.persistence.config.storageClass }}
storageClassName: {{ .Values.persistence.config.storageClass | quote }}
{{- end }}
---
{{- end }}
{{- if not .Values.persistence.data.claimName }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ template "fullname" . }}-data
labels:
app: {{ template "name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
component: data
spec:
accessModes:
- {{ .Values.persistence.data.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.data.size | quote }}
{{- if .Values.persistence.data.storageClass }}
storageClassName: {{ .Values.persistence.data.storageClass | quote }}
{{- end }}
---
{{- end }}

150
plex/values.yaml Normal file
View File

@ -0,0 +1,150 @@
# Default values for kube-plex.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
image:
repository: harbor.ervine.dev/public/x86_64/plex
tag: 1.19.5.3112-b23ab3896-ls113
pullPolicy: Always
kubePlex:
enabled: true
image:
repository: harbor.ervine.dev/public/x86_64/alpine/kube-plex
tag: v2.0
pullPolicy: Always
# Override this with the plex claim token from plex.tv/claim
claimToken: "claim-asw8g3A3AT3xDrjfmzsk"
# Set the timezone of the plex server
timezone: Asia/Hong_Kong
service:
type: LoadBalancer
port: 32400
## Specify the nodePort value for the LoadBalancer and NodePort service types.
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
##
# nodePort:
## Provide any additional annotations which may be required. This can be used to
## set the LoadBalancer service type to internal only.
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
##
annotations: {}
labels: {}
## Use loadBalancerIP to request a specific static IP,
## otherwise leave blank
##
loadBalancerIP: 192.168.11.17
# loadBalancerSourceRanges: []
## Set the externalTrafficPolicy in the Service to either Cluster or Local
# externalTrafficPolicy: Local
ingress:
enabled: true
# Used to create an Ingress record.
hosts:
- plex.ervine.dev
annotations:
kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
tls:
# Secrets must be manually created in the namespace.
- secretName: plex-dev-tls
hosts:
- plex.ervine.dev
rbac:
create: true
# Specify create: false and serviceAccountName to manually manage the service
# account for this deployment
## serviceAccountName: ""
nodeSelector:
beta.kubernetes.io/arch: amd64
location: livingRoom
persistence:
transcode:
enabled: true
# Optionally specify claimName to manually override the PVC to be used for
# the transcode directory. If claimName is specified, storageClass and size
# are ignored.
##claimName: "plex-kube-plex-transcode"
# Optionally specify a storage class to be used for the transcode directory.
# If not specified and claimName is not specified, the default storage
# class will be used.
storageClass: "nfs-client-hermes"
# subPath: some-subpath
# The requested size of the volume to be used when creating a
# PersistentVolumeClaim.
size: 20Gi
# Access mode for this volume
accessMode: ReadWriteMany
data:
# Optionally specify claimName to manually override the PVC to be used for
# the data directory. If claimName is specified, storageClass and size are
# ignored.
##claimName: "plex-media-pvc"
# Optionally specify a storage class to be used for the data directory.
# If not specified and claimName is not specified, the default storage
# class will be used.
storageClass: "nfs-client-hermes"
# subPath: some-subpath
# The requested size of the volume to be used when creating a
# PersistentVolumeClaim.
size: 40Gi
# Access mode for this volume
accessMode: ReadWriteMany
extraData: []
# Optionally specifify additional Data mounts. These will be mounted as
# /data-${name}. This should be in the same format as the above 'data',
# with the additional field 'name'
# - claimName: "special-tv"
# name: 'foo'
config:
# Optionally specify claimName to manually override the PVC to be used for
# the config directory. If claimName is specified, storageClass and size
# are ignored.
##claimName: "plex-config-pvc"
# Optionally specify a storage class to be used for the config directory.
# If not specified and claimName is not specified, the default storage
# class will be used.
# subPath: some-subpath
storageClass: "nfs-client-hermes"
# The requested size of the volume to be used when creating a
# PersistentVolumeClaim.
size: 20Gi
# Access mode for this volume
accessMode: ReadWriteMany
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:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
podAnnotations: {}
deploymentAnnotations: {}
proxy:
# This allows to set a proxy environment variable, which PMS uses to fetch the token and assets like movie cover
enable: false
# http: "http://proxy:8080"
# https: "https://proxy:8080"
# noproxy: "localhost,127.0.0.1,10.96.0.0/12,10.244.0.0/12"
# allows setting which taints kubeplex tolerates
tolerations: []
# allows specifying node affinity
affinity: {}

View File

@ -63,6 +63,11 @@ spec:
- name: {{ .Chart.Name }}-sidecar
image: harbor.ervine.dev/public/x86_64/alpine/db-sidecar:v3.12.0
imagePullPolicy: Always
env:
- name: LIVE_DB
value: /app-remote-config/watcher.sqlite
- name: BACKUP_DB
value: /app-remote-config/watcher.backup.sqlite
securityContext:
privileged: true
lifecycle:

22
wekan/.helmignore Normal file
View File

@ -0,0 +1,22 @@
# 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
OWNERS

13
wekan/Chart.yaml Normal file
View File

@ -0,0 +1,13 @@
name: wekan
version: 1.0.0
appVersion: 2.x.x
kubeVersion: "^1.8.0-0"
description: Open Source kanban
home: https://wekan.github.io/
icon: https://wekan.github.io/wekan-logo.svg
sources:
- https://github.com/wekan/wekan
maintainers:
- name: technotaff
email: github@randall.cc
engine: gotpl

4
wekan/OWNERS Normal file
View File

@ -0,0 +1,4 @@
approvers:
- technotaff
reviewers:
- technotaff

65
wekan/README.md Normal file
View File

@ -0,0 +1,65 @@
# Helm Chart for Wekan
## Features
o Uses a MongoDB replica set by default - this allows fault-tolerant
and scalable MongoDB deployment (or just set the replicas to 1 for
a single server install)
o Optional Horizontal Pod Autoscaler (HPA), so that your Wekan pods
will scale automatically with increased CPU load.
## The configurable values (values.yaml)
Scaling Wekan:
```yaml
## Configuration for wekan component
##
replicaCount: 1
```
**replicaCount** Will set the initial number of replicas for the Wekan pod (and container)
```yaml
## Configure an horizontal pod autoscaler
##
autoscaling:
enabled: true
config:
minReplicas: 1
maxReplicas: 16
## Note: when setting this, a `resources.request.cpu` is required. You
## likely want to set it to `1` or some lower value.
##
targetCPUUtilizationPercentage: 80
```
This section (if *enabled* is set to **true**) will enable the Kubernetes Horizontal Pod Autoscaler (HPA).
**minReplicas:** this is the minimum number of pods to scale down to (We recommend setting this to the same value as **replicaCount**).
**maxReplicas:** this is the maximum number of pods to scale up to.
**targetCPUUtilizationPercentage:** This is the CPU at which the HPA will scale-out the number of Wekan pods.
```yaml
mongodb-replicaset:
enabled: true
replicas: 3
replicaSetName: rs0
securityContext:
runAsUser: 1000
fsGroup: 1000
runAsNonRoot: true
```
This section controls the scale of the MongoDB redundant Replica Set.
**replicas:** This is the number of MongoDB instances to include in the set. You can set this to 1 for a single server - this will still allow you to scale-up later with a helm upgrade.
### Install OCP route
If you use this chart to deploy Wekan on an OCP cluster, you can create route instead of ingress with following command:
``` bash
$ helm template --set route.enabled=true,ingress.enabled=false values.yaml . | oc apply -f-
```

1
wekan/charts/.gitkeep Normal file
View File

@ -0,0 +1 @@

6
wekan/requirements.lock Normal file
View File

@ -0,0 +1,6 @@
dependencies:
- name: mongodb-replicaset
repository: https://kubernetes-charts.storage.googleapis.com/
version: 3.11.6
digest: sha256:38ec1febccdc6f32a3e0c49b2a8e6f308669ad127700847549d609ef0c3948ed
generated: "2020-08-25T12:35:16.3866668+08:00"

5
wekan/requirements.yaml Normal file
View File

@ -0,0 +1,5 @@
dependencies:
- name: mongodb-replicaset
version: 3.11.x
repository: "https://kubernetes-charts.storage.googleapis.com/"
condition: mongodb-replicaset.enabled

19
wekan/templates/NOTES.txt Normal file
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 "wekan.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 "wekan.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "wekan.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 "wekan.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:8080
{{- end }}

View File

@ -0,0 +1,82 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "wekan.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 "wekan.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 a default fully qualified name for the wekan data app.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "wekan.localdata.fullname" -}}
{{- if .Values.localdata.fullnameOverride -}}
{{- .Values.localdata.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- printf "%s-localdata" .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s-localdata" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "wekan.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create the name of the service account to use for the api component
*/}}
{{- define "wekan.serviceAccountName" -}}
{{- if .Values.serviceAccounts.create -}}
{{ default (include "wekan.fullname" .) .Values.serviceAccounts.name }}
{{- else -}}
{{ default "default" .Values.serviceAccounts.name }}
{{- end -}}
{{- end -}}
{{/*
Create a default fully qualified mongodb-replicaset name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "wekan.mongodb-replicaset.fullname" -}}
{{- $name := default "mongodb-replicaset" (index .Values "mongodb-replicaset" "nameOverride") -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create the MongoDB URL. If MongoDB is installed as part of this chart, use k8s service discovery,
else use user-provided URL.
*/}}
{{- define "mongodb-replicaset.url" -}}
{{- if (index .Values "mongodb-replicaset" "enabled") -}}
{{- $count := (int (index .Values "mongodb-replicaset" "replicas")) -}}
{{- $release := .Release.Name -}}
mongodb://{{ $release }}-mongodb-replicaset:27017/admin?replicaSet={{ index .Values "mongodb-replicaset" "replicaSetName" }}
{{- else -}}
{{- index .Values "mongodb-replicaset" "url" -}}
{{- end -}}
{{- end -}}

View File

@ -0,0 +1,64 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "wekan.fullname" . }}
labels:
app: {{ template "wekan.name" . }}
chart: {{ template "wekan.chart" . }}
component: wekan
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "wekan.name" . }}
component: wekan
release: {{ .Release.Name }}
template:
metadata:
annotations:
labels:
app: {{ template "wekan.name" . }}
component: wekan
release: {{ .Release.Name }}
spec:
serviceAccountName: {{ template "wekan.serviceAccountName" . }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
terminationMessagePolicy: FallbackToLogsOnError
ports:
- name: http
containerPort: 8080
env:
- name: ROOT_URL
value: {{ .Values.root_url | default "https://wekan.local" | quote }}
- name: MONGO_URL
value: "{{ template "mongodb-replicaset.url" . }}"
{{- range $key := .Values.env }}
{{- if .value }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
{{- end }}
livenessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 60
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{ toYaml .Values.affinity | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}

18
wekan/templates/hpa.yaml Normal file
View File

@ -0,0 +1,18 @@
{{- if .Values.autoscaling.enabled -}}
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "wekan.fullname" . }}
labels:
app: {{ template "wekan.name" . }}
chart: {{ template "wekan.chart" . }}
component: wekan
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ template "wekan.fullname" . }}
{{ toYaml .Values.autoscaling.config | indent 2 }}
{{- end -}}

View File

@ -0,0 +1,40 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "wekan.fullname" . -}}
{{- $servicePort := .Values.service.port -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ template "wekan.name" . }}
chart: {{ template "wekan.chart" . }}
component: wekan
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
{{- 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: 80
{{- end }}
{{- end }}

View File

@ -0,0 +1,23 @@
{{- if .Values.route.enabled -}}
{{- $fullName := include "wekan.fullname" . -}}
apiVersion: route.openshift.io/v1
kind: Route
metadata:
annotations:
haproxy.router.openshift.io/timeout: 4m
openshift.io/host.generated: "true"
labels:
app: {{ template "wekan.name" . }}
service: {{ template "wekan.name" . }}
name: {{ template "wekan.name" . }}
spec:
port:
targetPort: http
tls:
termination: edge
to:
kind: Service
name: {{ template "wekan.name" . }}
weight: 100
wildcardPolicy: None
{{- end }}

View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ template "wekan.fullname" . }}
labels:
app: {{ template "wekan.name" . }}
chart: {{ template "wekan.chart" . }}
component: wekan
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
type: Opaque
data:
accessKey: {{ .Values.credentials.accessKey | b64enc }}
secretKey: {{ .Values.credentials.secretKey | b64enc }}

View File

@ -0,0 +1,25 @@
apiVersion: v1
kind: Service
metadata:
{{- if .Values.service.annotations }}
annotations:
{{ toYaml .Values.service.annotations | indent 4 }}
{{- end }}
name: {{ template "wekan.fullname" . }}
labels:
app: {{ template "wekan.name" . }}
chart: {{ template "wekan.chart" . }}
component: wekan
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ template "wekan.name" . }}
component: wekan
release: {{ .Release.Name }}

View File

@ -0,0 +1,16 @@
{{- if .Values.serviceAccounts.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
{{- if .Values.serviceAccounts.annotations }}
annotations:
{{ .Values.serviceAccounts.annotations | indent 4}}
{{- end }}
labels:
app: {{ template "wekan.name" . }}
chart: {{ template "wekan.chart" . }}
component: wekan
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "wekan.serviceAccountName" . }}
{{- end }}

View File

@ -0,0 +1,27 @@
apiVersion: v1
kind: Pod
metadata:
name: {{ template "wekan.fullname" . }}-test
annotations:
"helm.sh/hook": test-success
spec:
containers:
- name: {{ template "wekan.fullname" . }}-test
imagePullPolicy: IfNotPresent
image: "docker.io/mesosphere/aws-cli:1.14.5"
command:
- sh
- -c
- aws s3 --endpoint-url=http://{{ include "wekan.fullname" . }} --region=us-east-1 ls
env:
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: {{ template "wekan.fullname" . }}
key: accessKey
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ template "wekan.fullname" . }}
key: secretKey
restartPolicy: Never

117
wekan/values.yaml Normal file
View File

@ -0,0 +1,117 @@
# ------------------------------------------------------------------------------
# Wekan:
# ------------------------------------------------------------------------------
## Define serviceAccount names to create or use. Defaults to component's fully
## qualified name.
##
serviceAccounts:
create: true
name: ""
annotations: ""
## Wekan image configuration
##
image:
repository: quay.io/wekan/wekan
tag: latest
pullPolicy: IfNotPresent
## Configuration for wekan component
##
replicaCount: 1
## Specify wekan credentials
##
credentials:
accessKey: access-key
secretKey: secret-key
## Specify additional environmental variables for the Deployment
##
env:
- name: ""
value: ""
service:
type: ClusterIP
port: 80
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8000"
prometheus.io/path: "/_/monitoring/metrics"
## Comma-separated string of allowed virtual hosts for external access.
## This should match the ingress hosts
##
endpoint: wekan.wekan,kan.k8s.ipa.champion,kan.ervine.cloud
ingress:
enabled: false
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
path: /*
# This must match 'endpoint', unless your client supports different
# hostnames.
hosts: [ wekan.local ]
# - wekan.local
tls: []
# - secretName: wekan-example-tls
# hosts:
# - wekan-example.local
route:
enabled: false
resources:
requests:
memory: 128Mi
cpu: 300m
limits:
memory: 1Gi
cpu: 500m
## Node labels for pod assignment
## ref: https://kubernetes.io/docs/user-guide/node-selection/
##
nodeSelector:
location: bedRoom
## Tolerations for pod assignment
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
##
tolerations: []
## Affinity for pod assignment
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
##
affinity: {}
## Configure an horizontal pod autoscaler
##
autoscaling:
enabled: true
config:
minReplicas: 1
maxReplicas: 4
## Note: when setting this, a `resources.request.cpu` is required. You
## likely want to set it to `1` or some lower value.
##
targetCPUUtilizationPercentage: 80
# ------------------------------------------------------------------------------
# MongoDB:
# ------------------------------------------------------------------------------
mongodb-replicaset:
enabled: true
replicas: 1
replicaSetName: rs0
securityContext:
runAsUser: 1000
fsGroup: 1000
runAsNonRoot: true
#image:
# tag: 3.2.21