mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-24 16:09:08 +00:00
Merge pull request #33 from k8s-at-home/media-common
[media-common] New Chart
This commit is contained in:
commit
de73201b2b
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
.env
|
.env
|
||||||
|
.idea
|
||||||
|
23
charts/media-common/.helmignore
Normal file
23
charts/media-common/.helmignore
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# 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 file for Kubernetes
|
||||||
|
OWNERS
|
11
charts/media-common/Chart.yaml
Normal file
11
charts/media-common/Chart.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: media-common
|
||||||
|
description: Common dependancy chart for media ecosystem containers
|
||||||
|
type: application
|
||||||
|
version: 1.0.0
|
||||||
|
keywords:
|
||||||
|
- media-common
|
||||||
|
home: https://github.com/k8s-at-home/charts/tree/master/charts/media-common
|
||||||
|
maintainers:
|
||||||
|
- name: DirtyCajunRice
|
||||||
|
email: nick@cajun.pro
|
4
charts/media-common/OWNERS
Normal file
4
charts/media-common/OWNERS
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
approvers:
|
||||||
|
- DirtyCajunRice
|
||||||
|
reviewers:
|
||||||
|
- DirtyCajunRice
|
7
charts/media-common/ci/ct-values.yaml
Normal file
7
charts/media-common/ci/ct-values.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
image:
|
||||||
|
organization: itscontained
|
||||||
|
repository: radarr
|
||||||
|
tag: latest
|
||||||
|
service:
|
||||||
|
port: 7878
|
||||||
|
configPath: /var/lib/radarr
|
20
charts/media-common/lidarr/Chart.yaml
Normal file
20
charts/media-common/lidarr/Chart.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: lidarr
|
||||||
|
description: Lidarr Chart
|
||||||
|
type: application
|
||||||
|
version: 1.0.0
|
||||||
|
appVersion: 0.7.1.1785
|
||||||
|
keywords:
|
||||||
|
- lidarr
|
||||||
|
home: https://github.com/k8s-at-home/charts/tree/master/charts/media-common/lidarr
|
||||||
|
sources:
|
||||||
|
- https://github.com/Lidarr/Lidarr
|
||||||
|
- https://hub.docker.com/r/itscontained/lidarr
|
||||||
|
maintainers:
|
||||||
|
- name: DirtyCajunRice
|
||||||
|
email: nick@cajun.pro
|
||||||
|
dependencies:
|
||||||
|
- name: media-common
|
||||||
|
repository: https://k8s-at-home.com/charts/
|
||||||
|
version: 1.0.0
|
||||||
|
alias: lidarr
|
10
charts/media-common/lidarr/values.yaml
Normal file
10
charts/media-common/lidarr/values.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Default values for lidarr.
|
||||||
|
|
||||||
|
lidarr:
|
||||||
|
image:
|
||||||
|
organization: linuxserver
|
||||||
|
repository: lidarr
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
tag: ""
|
||||||
|
service:
|
||||||
|
port: 8686
|
20
charts/media-common/ombi/Chart.yaml
Normal file
20
charts/media-common/ombi/Chart.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: ombi
|
||||||
|
description: Ombi Chart
|
||||||
|
type: application
|
||||||
|
version: 1.0.0
|
||||||
|
appVersion: 4.0.471
|
||||||
|
keywords:
|
||||||
|
- ombi
|
||||||
|
home: https://github.com/k8s-at-home/charts/tree/master/charts/media-common/ombi
|
||||||
|
sources:
|
||||||
|
- https://github.com/tidusjar/Ombi
|
||||||
|
- https://hub.docker.com/r/itscontained/ombi
|
||||||
|
maintainers:
|
||||||
|
- name: DirtyCajunRice
|
||||||
|
email: nick@cajun.pro
|
||||||
|
dependencies:
|
||||||
|
- name: media-common
|
||||||
|
repository: https://k8s-at-home.com/charts/
|
||||||
|
version: 1.0.0
|
||||||
|
alias: ombi
|
11
charts/media-common/ombi/values.yaml
Normal file
11
charts/media-common/ombi/values.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Default values for ombi.
|
||||||
|
|
||||||
|
ombi:
|
||||||
|
image:
|
||||||
|
organization: itscontained
|
||||||
|
repository: ombi
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
tag: ""
|
||||||
|
service:
|
||||||
|
port: 5000
|
||||||
|
configPath: /var/lib/ombi
|
20
charts/media-common/organizr/Chart.yaml
Normal file
20
charts/media-common/organizr/Chart.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: organizr
|
||||||
|
description: Organizr Chart
|
||||||
|
type: application
|
||||||
|
version: 1.0.0
|
||||||
|
appVersion: latest
|
||||||
|
keywords:
|
||||||
|
- organizr
|
||||||
|
home: https://github.com/k8s-at-home/charts/tree/master/charts/media-common/organizr
|
||||||
|
sources:
|
||||||
|
- https://github.com/causefx/Organizr
|
||||||
|
- https://hub.docker.com/r/itscontained/ombi
|
||||||
|
maintainers:
|
||||||
|
- name: DirtyCajunRice
|
||||||
|
email: nick@cajun.pro
|
||||||
|
dependencies:
|
||||||
|
- name: media-common
|
||||||
|
repository: https://k8s-at-home.com/charts/
|
||||||
|
version: 1.0.0
|
||||||
|
alias: organizr
|
10
charts/media-common/organizr/values.yaml
Normal file
10
charts/media-common/organizr/values.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Default values for organizr.
|
||||||
|
|
||||||
|
organizr:
|
||||||
|
image:
|
||||||
|
organization: organizr
|
||||||
|
repository: organizr
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
tag: ""
|
||||||
|
service:
|
||||||
|
port: 80
|
20
charts/media-common/radarr/Chart.yaml
Normal file
20
charts/media-common/radarr/Chart.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: radarr
|
||||||
|
description: Radarr Chart
|
||||||
|
type: application
|
||||||
|
version: 1.0.0
|
||||||
|
appVersion: 3.0.0.3591
|
||||||
|
keywords:
|
||||||
|
- radarr
|
||||||
|
home: https://github.com/k8s-at-home/charts/tree/master/charts/media-common/radarr
|
||||||
|
sources:
|
||||||
|
- https://github.com/Radarr/Radarr
|
||||||
|
- https://hub.docker.com/r/itscontained/radarr
|
||||||
|
maintainers:
|
||||||
|
- name: DirtyCajunRice
|
||||||
|
email: nick@cajun.pro
|
||||||
|
dependencies:
|
||||||
|
- name: media-common
|
||||||
|
repository: https://k8s-at-home.com/charts/
|
||||||
|
version: 1.0.0
|
||||||
|
alias: radarr
|
11
charts/media-common/radarr/values.yaml
Normal file
11
charts/media-common/radarr/values.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Default values for radarr.
|
||||||
|
|
||||||
|
radarr:
|
||||||
|
image:
|
||||||
|
organization: itscontained
|
||||||
|
repository: radarr
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
tag: ""
|
||||||
|
service:
|
||||||
|
port: 7878
|
||||||
|
configPath: /var/lib/radarr
|
20
charts/media-common/sonarr/Chart.yaml
Normal file
20
charts/media-common/sonarr/Chart.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: sonarr
|
||||||
|
description: Sonarr Chart
|
||||||
|
type: application
|
||||||
|
version: 1.0.0
|
||||||
|
appVersion: 3.0.3.913
|
||||||
|
keywords:
|
||||||
|
- sonarr
|
||||||
|
home: https://github.com/k8s-at-home/charts/tree/master/charts/media-common/sonarr
|
||||||
|
sources:
|
||||||
|
- https://github.com/Sonarr/Sonarr
|
||||||
|
- https://hub.docker.com/r/itscontained/sonarr
|
||||||
|
maintainers:
|
||||||
|
- name: DirtyCajunRice
|
||||||
|
email: nick@cajun.pro
|
||||||
|
dependencies:
|
||||||
|
- name: media-common
|
||||||
|
repository: https://k8s-at-home.com/charts/
|
||||||
|
version: 1.0.0
|
||||||
|
alias: sonarr
|
11
charts/media-common/sonarr/values.yaml
Normal file
11
charts/media-common/sonarr/values.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Default values for sonarr.
|
||||||
|
|
||||||
|
sonarr:
|
||||||
|
image:
|
||||||
|
organization: itscontained
|
||||||
|
repository: sonarr
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
tag: ""
|
||||||
|
service:
|
||||||
|
port: 8989
|
||||||
|
configPath: /var/lib/radarr
|
20
charts/media-common/tautulli/Chart.yaml
Normal file
20
charts/media-common/tautulli/Chart.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: tautulli
|
||||||
|
description: Tautulli Chart
|
||||||
|
type: application
|
||||||
|
version: 1.0.0
|
||||||
|
appVersion: v2.5.4
|
||||||
|
keywords:
|
||||||
|
- tautulli
|
||||||
|
home: https://github.com/k8s-at-home/charts/tree/master/charts/media-common/tautulli
|
||||||
|
sources:
|
||||||
|
- https://github.com/Tautulli/Tautulli
|
||||||
|
- https://hub.docker.com/r/tautulli/tautulli
|
||||||
|
maintainers:
|
||||||
|
- name: DirtyCajunRice
|
||||||
|
email: nick@cajun.pro
|
||||||
|
dependencies:
|
||||||
|
- name: media-common
|
||||||
|
repository: https://k8s-at-home.com/charts/
|
||||||
|
version: 1.0.0
|
||||||
|
alias: tautulli
|
10
charts/media-common/tautulli/values.yaml
Normal file
10
charts/media-common/tautulli/values.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Default values for tautulli.
|
||||||
|
|
||||||
|
tautulli:
|
||||||
|
image:
|
||||||
|
organization: tautulli
|
||||||
|
repository: tautulli
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
tag: ""
|
||||||
|
service:
|
||||||
|
port: 8181
|
19
charts/media-common/templates/NOTES.txt
Normal file
19
charts/media-common/templates/NOTES.txt
Normal 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 {{ include "media-common.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 {{ include "media-common.fullname" . }}'
|
||||||
|
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "media-common.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.kubernetes.io/name={{ include "media-common.name" . }},app.kubernetes.io/instance={{ .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 }}
|
52
charts/media-common/templates/_helpers.tpl
Normal file
52
charts/media-common/templates/_helpers.tpl
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "media-common.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 "media-common.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 "media-common.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "media-common.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "media-common.chart" . }}
|
||||||
|
{{ include "media-common.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "media-common.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "media-common.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end }}
|
10
charts/media-common/templates/configmap.yaml
Normal file
10
charts/media-common/templates/configmap.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ template "media-common.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "media-common.labels" . | nindent 4 }}
|
||||||
|
{{- if .Values.env }}
|
||||||
|
data:
|
||||||
|
{{- toYaml .Values.env | nindent 2 }}
|
||||||
|
{{- end }}
|
105
charts/media-common/templates/deployment.yaml
Normal file
105
charts/media-common/templates/deployment.yaml
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
{{- if eq .Values.persistence.type "deployment" }}
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ template "media-common.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "media-common.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "media-common.selectorLabels" . | nindent 6 }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
{{- with .Values.podAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
{{- include "media-common.selectorLabels" . | nindent 8 }}
|
||||||
|
spec:
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.podSecurityContext }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: {{ template "media-common.fullname" . }}
|
||||||
|
{{- with .Values.securityContext }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
image: "{{ .Values.image.organization }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: {{ template "media-common.fullname" . }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: {{ .Values.service.port }}
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
|
||||||
|
failureThreshold: {{ .Values.probes.liveness.failureThreshold }}
|
||||||
|
timeoutSeconds: {{ .Values.probes.liveness.timeoutSeconds }}
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
|
||||||
|
failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
|
||||||
|
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: {{ .Values.configPath }}
|
||||||
|
name: config
|
||||||
|
{{- if .Values.persistence.config.subPath }}
|
||||||
|
subPath: {{ .Values.persistence.config.subPath }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.persistence.media.enabled }}
|
||||||
|
- mountPath: /media
|
||||||
|
name: media
|
||||||
|
{{- if .Values.persistence.media.subPath }}
|
||||||
|
subPath: {{ .Values.persistence.media.subPath }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.additionalVolumeMounts }}
|
||||||
|
{{- toYaml .Values.additionalVolumeMounts | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.resources }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
{{- if .Values.persistence.config.enabled }}
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: {{ if .Values.persistence.config.existingClaim }}{{ .Values.persistence.config.existingClaim }}{{- else }}{{ template "media-common.fullname" . }}{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
emptyDir: {}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.persistence.media.enabled }}
|
||||||
|
- name: media
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: {{ if .Values.persistence.media.existingClaim }}{{ .Values.persistence.media.existingClaim }}{{- else }}{{ template "media-common.fullname" . }}-media{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.additionalVolumes }}
|
||||||
|
{{- toYaml .Values.additionalVolumes | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
81
charts/media-common/templates/ingress.yaml
Normal file
81
charts/media-common/templates/ingress.yaml
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
{{- if .Values.ingress.enabled -}}
|
||||||
|
{{- $fullName := include "media-common.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 "media-common.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: {{ . }}
|
||||||
|
backend:
|
||||||
|
serviceName: {{ $fullName }}
|
||||||
|
servicePort: {{ $svcPort }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- range $index, $ingress := .Values.ingress.extraIngresses }}
|
||||||
|
---
|
||||||
|
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||||
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
|
{{- else -}}
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
{{- end }}
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: {{ $fullName }}-{{ $ingress.nameSuffix | default $index }}
|
||||||
|
labels:
|
||||||
|
{{- include "media-common.labels" . | nindent 4 }}
|
||||||
|
{{- with $ingress.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if $ingress.tls }}
|
||||||
|
tls:
|
||||||
|
{{- range $ingress.tls }}
|
||||||
|
- hosts:
|
||||||
|
{{- range .hosts }}
|
||||||
|
- {{ . | quote }}
|
||||||
|
{{- end }}
|
||||||
|
secretName: {{ .secretName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
{{- range $ingress.hosts }}
|
||||||
|
- host: {{ .host | quote }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
{{- range .paths }}
|
||||||
|
- path: {{ . }}
|
||||||
|
backend:
|
||||||
|
serviceName: {{ $fullName }}
|
||||||
|
servicePort: {{ $svcPort }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
44
charts/media-common/templates/pvc.yaml
Normal file
44
charts/media-common/templates/pvc.yaml
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
{{- if and .Values.persistence.config.enabled (not .Values.persistence.config.existingClaim) -}}
|
||||||
|
---
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: {{ template "media-common.fullname" . }}
|
||||||
|
{{- if .Values.persistence.config.skipuninstall }}
|
||||||
|
annotations:
|
||||||
|
"helm.sh/resource-policy": keep
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
{{- include "media-common.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- {{ .Values.persistence.config.accessMode | quote }}
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.persistence.config.size | quote }}
|
||||||
|
{{- if .Values.persistence.config.storageClass }}
|
||||||
|
storageClassName: {{ if (eq "-" .Values.persistence.config.storageClass) }}""{{- else }}{{ .Values.persistence.config.storageClass | quote }}{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if and .Values.persistence.media.enabled (not .Values.persistence.media.existingClaim) }}
|
||||||
|
---
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: {{ template "media-common.fullname" . }}-media
|
||||||
|
{{- if .Values.persistence.media.skipuninstall }}
|
||||||
|
annotations:
|
||||||
|
"helm.sh/resource-policy": keep
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
{{- include "media-common.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- {{ .Values.persistence.media.accessMode | quote }}
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.persistence.media.size | quote }}
|
||||||
|
{{- if .Values.persistence.media.storageClass }}
|
||||||
|
storageClassName: {{ if (eq "-" .Values.persistence.media.storageClass) }}""{{- else }}{{ .Values.persistence.media.storageClass | quote}}{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end -}}
|
28
charts/media-common/templates/service.yaml
Normal file
28
charts/media-common/templates/service.yaml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ template "media-common.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "media-common.labels" . | nindent 4 }}
|
||||||
|
{{- if .Values.service.labels }}
|
||||||
|
{{ toYaml .Values.service.labels | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.service.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
protocol: TCP
|
||||||
|
targetPort: http
|
||||||
|
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
|
||||||
|
nodePort: {{ .Values.service.nodePort }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.service.additionalSpec }}
|
||||||
|
{{- toYaml . | nindent 2 }}
|
||||||
|
{{- end }}
|
||||||
|
selector:
|
||||||
|
{{- include "media-common.selectorLabels" . | nindent 4 }}
|
106
charts/media-common/templates/statefulset.yaml
Normal file
106
charts/media-common/templates/statefulset.yaml
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
{{- if eq .Values.persistence.type "statefulset" }}
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: {{ template "media-common.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "media-common.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "media-common.selectorLabels" . | nindent 6 }}
|
||||||
|
serviceName: {{ include "media-common.fullname" . }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
{{- with .Values.podAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
{{- include "media-common.selectorLabels" . | nindent 8 }}
|
||||||
|
spec:
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.podSecurityContext }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: {{ template "media-common.fullname" . }}
|
||||||
|
{{- with .Values.securityContext }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
image: "{{ .Values.image.organization }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
envFrom:
|
||||||
|
- configMapRef:
|
||||||
|
name: {{ template "media-common.fullname" . }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: {{ .Values.service.port }}
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
|
||||||
|
failureThreshold: {{ .Values.probes.liveness.failureThreshold }}
|
||||||
|
timeoutSeconds: {{ .Values.probes.liveness.timeoutSeconds }}
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
|
||||||
|
failureThreshold: {{ .Values.probes.readiness.failureThreshold }}
|
||||||
|
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: {{ .Values.configPath }}
|
||||||
|
name: config
|
||||||
|
{{- if .Values.persistence.config.subPath }}
|
||||||
|
subPath: {{ .Values.persistence.config.subPath }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.persistence.media.enabled }}
|
||||||
|
- mountPath: /media
|
||||||
|
name: media
|
||||||
|
{{- if .Values.persistence.media.subPath }}
|
||||||
|
subPath: {{ .Values.persistence.media.subPath }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.additionalVolumeMounts }}
|
||||||
|
{{- toYaml .Values.additionalVolumeMounts | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.resources }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
{{- if .Values.persistence.config.enabled }}
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: {{ if .Values.persistence.config.existingClaim }}{{ .Values.persistence.config.existingClaim }}{{- else }}{{ template "media-common.fullname" . }}{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
emptyDir: {}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.persistence.media.enabled }}
|
||||||
|
- name: media
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: {{ if .Values.persistence.media.existingClaim }}{{ .Values.persistence.media.existingClaim }}{{- else }}{{ template "media-common.fullname" . }}-media{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.additionalVolumes }}
|
||||||
|
{{- toYaml .Values.additionalVolumes | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
149
charts/media-common/values.yaml
Normal file
149
charts/media-common/values.yaml
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
# Default values for media-common.
|
||||||
|
|
||||||
|
image:
|
||||||
|
organization: ""
|
||||||
|
repository: ""
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
tag: ""
|
||||||
|
|
||||||
|
# Probes configuration
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
initialDelaySeconds: 60
|
||||||
|
failureThreshold: 5
|
||||||
|
timeoutSeconds: 10
|
||||||
|
readiness:
|
||||||
|
initialDelaySeconds: 60
|
||||||
|
failureThreshold: 5
|
||||||
|
timeoutSeconds: 10
|
||||||
|
|
||||||
|
imagePullSecrets: []
|
||||||
|
nameOverride: ""
|
||||||
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
configPath: /config
|
||||||
|
|
||||||
|
env:
|
||||||
|
TZ: UTC
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: ""
|
||||||
|
## 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: {}
|
||||||
|
additionalSpec: {}
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
enabled: false
|
||||||
|
annotations: {}
|
||||||
|
# kubernetes.io/ingress.class: nginx
|
||||||
|
# kubernetes.io/tls-acme: "true"
|
||||||
|
labels: {}
|
||||||
|
hosts:
|
||||||
|
- host: chart-example.local
|
||||||
|
paths:
|
||||||
|
- /
|
||||||
|
tls: []
|
||||||
|
# - secretName: chart-example-tls
|
||||||
|
# hosts:
|
||||||
|
# - chart-example.local
|
||||||
|
extraIngresses:
|
||||||
|
# - enabled: false
|
||||||
|
# nameSuffix: "api"
|
||||||
|
# annotations: {}
|
||||||
|
# # kubernetes.io/ingress.class: nginx
|
||||||
|
# # kubernetes.io/tls-acme: "true"
|
||||||
|
# labels: {}
|
||||||
|
# hosts:
|
||||||
|
# - host: chart-example.local
|
||||||
|
# paths:
|
||||||
|
# - /api
|
||||||
|
# tls: []
|
||||||
|
# # - secretName: chart-example-tls
|
||||||
|
# # hosts:
|
||||||
|
# # - chart-example.local
|
||||||
|
|
||||||
|
persistence:
|
||||||
|
# type: options are statefulset or deployment
|
||||||
|
type: statefulset
|
||||||
|
config:
|
||||||
|
enabled: true
|
||||||
|
## media-common configuration data Persistent Volume Storage Class
|
||||||
|
## If defined, storageClassName: <storageClass>
|
||||||
|
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||||
|
## If undefined (the default) or set to null, no storageClassName spec is
|
||||||
|
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||||
|
## GKE, AWS & OpenStack)
|
||||||
|
##
|
||||||
|
# storageClass: "-"
|
||||||
|
##
|
||||||
|
## If you want to reuse an existing claim, you can pass the name of the PVC using
|
||||||
|
## the existingClaim variable
|
||||||
|
# existingClaim: your-claim
|
||||||
|
# subPath: some-subpath
|
||||||
|
accessMode: ReadWriteOnce
|
||||||
|
size: 1Gi
|
||||||
|
## Do not delete the pvc upon helm uninstall
|
||||||
|
skipuninstall: false
|
||||||
|
media:
|
||||||
|
enabled: false
|
||||||
|
## media-common media volume configuration
|
||||||
|
## If defined, storageClassName: <storageClass>
|
||||||
|
## If set to "-", storageClassName: "", which disables dynamic provisioning
|
||||||
|
## If undefined (the default) or set to null, no storageClassName spec is
|
||||||
|
## set, choosing the default provisioner. (gp2 on AWS, standard on
|
||||||
|
## GKE, AWS & OpenStack)
|
||||||
|
##
|
||||||
|
# storageClass: "-"
|
||||||
|
##
|
||||||
|
## If you want to reuse an existing claim, you can pass the name of the PVC using
|
||||||
|
## the existingClaim variable
|
||||||
|
# existingClaim: your-claim
|
||||||
|
# subPath: some-subpath
|
||||||
|
accessMode: ReadWriteOnce
|
||||||
|
size: 10Gi
|
||||||
|
## Do not delete the pvc upon helm uninstall
|
||||||
|
skipuninstall: false
|
||||||
|
|
||||||
|
additionalVolumes: []
|
||||||
|
|
||||||
|
additionalVolumeMounts: []
|
||||||
|
|
||||||
|
podSecurityContext: {}
|
||||||
|
# fsGroup: 2000
|
||||||
|
|
||||||
|
securityContext: {}
|
||||||
|
# capabilities:
|
||||||
|
# drop:
|
||||||
|
# - ALL
|
||||||
|
# readOnlyRootFilesystem: true
|
||||||
|
# runAsNonRoot: true
|
||||||
|
# runAsUser: 1000
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
|
|
||||||
|
podAnnotations: {}
|
Loading…
Reference in New Issue
Block a user