From 90daf5bcf1de5a5263f4a7040da6253ed4aacef1 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Sat, 5 Sep 2020 00:22:54 -0500 Subject: [PATCH 01/35] media-common with base radarr/sonarr/lidarr --- .idea/k8s@home charts.iml | 9 ++ charts/media-common/.helmignore | 23 +++ charts/media-common/Chart.yaml | 11 ++ charts/media-common/OWNERS | 4 + charts/media-common/lidarr/Chart.yaml | 20 +++ charts/media-common/lidarr/values.yaml | 10 ++ charts/media-common/radarr/Chart.yaml | 20 +++ charts/media-common/radarr/values.yaml | 10 ++ charts/media-common/sonarr/Chart.yaml | 20 +++ charts/media-common/sonarr/values.yaml | 10 ++ charts/media-common/templates/NOTES.txt | 19 +++ charts/media-common/templates/_helpers.tpl | 71 ++++++++++ charts/media-common/templates/configmap.yaml | 10 ++ charts/media-common/templates/deployment.yaml | 105 ++++++++++++++ charts/media-common/templates/ingress.yaml | 41 ++++++ charts/media-common/templates/pvc.yaml | 44 ++++++ charts/media-common/templates/service.yaml | 28 ++++ .../media-common/templates/statefulset.yaml | 106 ++++++++++++++ charts/media-common/values.yaml | 132 ++++++++++++++++++ 19 files changed, 693 insertions(+) create mode 100644 .idea/k8s@home charts.iml create mode 100644 charts/media-common/.helmignore create mode 100644 charts/media-common/Chart.yaml create mode 100644 charts/media-common/OWNERS create mode 100644 charts/media-common/lidarr/Chart.yaml create mode 100644 charts/media-common/lidarr/values.yaml create mode 100644 charts/media-common/radarr/Chart.yaml create mode 100644 charts/media-common/radarr/values.yaml create mode 100644 charts/media-common/sonarr/Chart.yaml create mode 100644 charts/media-common/sonarr/values.yaml create mode 100644 charts/media-common/templates/NOTES.txt create mode 100644 charts/media-common/templates/_helpers.tpl create mode 100644 charts/media-common/templates/configmap.yaml create mode 100644 charts/media-common/templates/deployment.yaml create mode 100644 charts/media-common/templates/ingress.yaml create mode 100644 charts/media-common/templates/pvc.yaml create mode 100644 charts/media-common/templates/service.yaml create mode 100644 charts/media-common/templates/statefulset.yaml create mode 100644 charts/media-common/values.yaml diff --git a/.idea/k8s@home charts.iml b/.idea/k8s@home charts.iml new file mode 100644 index 00000000..5e764c4f --- /dev/null +++ b/.idea/k8s@home charts.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/charts/media-common/.helmignore b/charts/media-common/.helmignore new file mode 100644 index 00000000..46fd8996 --- /dev/null +++ b/charts/media-common/.helmignore @@ -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 diff --git a/charts/media-common/Chart.yaml b/charts/media-common/Chart.yaml new file mode 100644 index 00000000..e384d00b --- /dev/null +++ b/charts/media-common/Chart.yaml @@ -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 diff --git a/charts/media-common/OWNERS b/charts/media-common/OWNERS new file mode 100644 index 00000000..90661f99 --- /dev/null +++ b/charts/media-common/OWNERS @@ -0,0 +1,4 @@ +approvers: +- DirtyCajunRice +reviewers: +- DirtyCajunRice \ No newline at end of file diff --git a/charts/media-common/lidarr/Chart.yaml b/charts/media-common/lidarr/Chart.yaml new file mode 100644 index 00000000..3efc6bb3 --- /dev/null +++ b/charts/media-common/lidarr/Chart.yaml @@ -0,0 +1,20 @@ +apiVersion: v2 +name: Lidarr +description: Lidarr Chart +type: application +version: 1.0.0 +appVersion: 0.7.1.1785 +keywords: + - sonarr +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 \ No newline at end of file diff --git a/charts/media-common/lidarr/values.yaml b/charts/media-common/lidarr/values.yaml new file mode 100644 index 00000000..0112e546 --- /dev/null +++ b/charts/media-common/lidarr/values.yaml @@ -0,0 +1,10 @@ +# Default values for lidarr. + +sonarr: + image: + organization: itscontained + repository: lidarr + pullPolicy: IfNotPresent + tag: "" + service: + port: 8686 \ No newline at end of file diff --git a/charts/media-common/radarr/Chart.yaml b/charts/media-common/radarr/Chart.yaml new file mode 100644 index 00000000..e0e73913 --- /dev/null +++ b/charts/media-common/radarr/Chart.yaml @@ -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 \ No newline at end of file diff --git a/charts/media-common/radarr/values.yaml b/charts/media-common/radarr/values.yaml new file mode 100644 index 00000000..da5a738c --- /dev/null +++ b/charts/media-common/radarr/values.yaml @@ -0,0 +1,10 @@ +# Default values for radarr. + +radarr: + image: + organization: itscontained + repository: radarr + pullPolicy: IfNotPresent + tag: "" + service: + port: 7878 \ No newline at end of file diff --git a/charts/media-common/sonarr/Chart.yaml b/charts/media-common/sonarr/Chart.yaml new file mode 100644 index 00000000..8217b850 --- /dev/null +++ b/charts/media-common/sonarr/Chart.yaml @@ -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 \ No newline at end of file diff --git a/charts/media-common/sonarr/values.yaml b/charts/media-common/sonarr/values.yaml new file mode 100644 index 00000000..421ceb0a --- /dev/null +++ b/charts/media-common/sonarr/values.yaml @@ -0,0 +1,10 @@ +# Default values for sonarr. + +sonarr: + image: + organization: itscontained + repository: sonarr + pullPolicy: IfNotPresent + tag: "" + service: + port: 8989 \ No newline at end of file diff --git a/charts/media-common/templates/NOTES.txt b/charts/media-common/templates/NOTES.txt new file mode 100644 index 00000000..f881f661 --- /dev/null +++ b/charts/media-common/templates/NOTES.txt @@ -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 }} diff --git a/charts/media-common/templates/_helpers.tpl b/charts/media-common/templates/_helpers.tpl new file mode 100644 index 00000000..8b6e8de7 --- /dev/null +++ b/charts/media-common/templates/_helpers.tpl @@ -0,0 +1,71 @@ +{{/* 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 }} + +{{/* +Config Path Selector +*/}} +{{- define "media-common.configPathSelector" -}} + {{- if eq .Values.image.organization "itscontained" -}} + {{- if eq .Values.image.repository "radarr" -}} +/var/lib/radarr + {{- else if eq .Values.image.repository "sonarr" -}} +/var/lib/sonarr + {{- else if eq .Values.image.repository "lidarr" -}} + {{- fail "lidarr not yet implemented" -}} + {{- else -}} + {{- fail "Could not establish the service port from the repository and no service port was set" -}} + {{- end -}} + {{- else -}} +/config + {{- end -}} +{{- end -}} \ No newline at end of file diff --git a/charts/media-common/templates/configmap.yaml b/charts/media-common/templates/configmap.yaml new file mode 100644 index 00000000..41603fc2 --- /dev/null +++ b/charts/media-common/templates/configmap.yaml @@ -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 }} \ No newline at end of file diff --git a/charts/media-common/templates/deployment.yaml b/charts/media-common/templates/deployment.yaml new file mode 100644 index 00000000..eeae600d --- /dev/null +++ b/charts/media-common/templates/deployment.yaml @@ -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: {{ template "media-common.portSelector" . }} + 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: {{ template "media-common.configPathSelector" . }} + 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.additionalVolumes | 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 }} \ No newline at end of file diff --git a/charts/media-common/templates/ingress.yaml b/charts/media-common/templates/ingress.yaml new file mode 100644 index 00000000..3ce03cd3 --- /dev/null +++ b/charts/media-common/templates/ingress.yaml @@ -0,0 +1,41 @@ +{{- if .Values.ingress.enabled -}} + {{- $fullName := include "media-common.fullname" . -}} + {{- $svcPort := include "media-common.portSelector" . -}} + {{- 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 }} +{{- end }} diff --git a/charts/media-common/templates/pvc.yaml b/charts/media-common/templates/pvc.yaml new file mode 100644 index 00000000..14309791 --- /dev/null +++ b/charts/media-common/templates/pvc.yaml @@ -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 -}} \ No newline at end of file diff --git a/charts/media-common/templates/service.yaml b/charts/media-common/templates/service.yaml new file mode 100644 index 00000000..efe45ef6 --- /dev/null +++ b/charts/media-common/templates/service.yaml @@ -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: {{ template "media-common.portSelector" . }} + 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 }} \ No newline at end of file diff --git a/charts/media-common/templates/statefulset.yaml b/charts/media-common/templates/statefulset.yaml new file mode 100644 index 00000000..791c7e65 --- /dev/null +++ b/charts/media-common/templates/statefulset.yaml @@ -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: {{ template "media-common.portSelector" . }} + 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: {{ template "media-common.configPathSelector" . }} + 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 }} \ No newline at end of file diff --git a/charts/media-common/values.yaml b/charts/media-common/values.yaml new file mode 100644 index 00000000..8badab61 --- /dev/null +++ b/charts/media-common/values.yaml @@ -0,0 +1,132 @@ +# 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: "" + +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 + +persistence: + # type: options are statefulset or deployment + type: statefulset + config: + enabled: true + ## arr configuration data Persistent Volume Storage Class + ## If defined, storageClassName: + ## 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: true + ## arr media volume configuration + ## If defined, storageClassName: + ## 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: {} From 8999baca25bbfa00ecbf8c8f652feae9630d72df Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Sat, 5 Sep 2020 00:28:40 -0500 Subject: [PATCH 02/35] fix old template var --- charts/media-common/templates/deployment.yaml | 2 +- charts/media-common/templates/statefulset.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/media-common/templates/deployment.yaml b/charts/media-common/templates/deployment.yaml index eeae600d..5c88c629 100644 --- a/charts/media-common/templates/deployment.yaml +++ b/charts/media-common/templates/deployment.yaml @@ -40,7 +40,7 @@ spec: name: {{ template "media-common.fullname" . }} ports: - name: http - containerPort: {{ template "media-common.portSelector" . }} + containerPort: {{ .Values.service.port }} protocol: TCP livenessProbe: tcpSocket: diff --git a/charts/media-common/templates/statefulset.yaml b/charts/media-common/templates/statefulset.yaml index 791c7e65..8d112638 100644 --- a/charts/media-common/templates/statefulset.yaml +++ b/charts/media-common/templates/statefulset.yaml @@ -41,7 +41,7 @@ spec: name: {{ template "media-common.fullname" . }} ports: - name: http - containerPort: {{ template "media-common.portSelector" . }} + containerPort: {{ .Values.service.port }} protocol: TCP livenessProbe: tcpSocket: From e0f64a26f27817de93afb26aeaa65d7998610f75 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Sat, 5 Sep 2020 00:30:43 -0500 Subject: [PATCH 03/35] fix old template var --- charts/media-common/templates/service.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/templates/service.yaml b/charts/media-common/templates/service.yaml index efe45ef6..3256d22a 100644 --- a/charts/media-common/templates/service.yaml +++ b/charts/media-common/templates/service.yaml @@ -15,7 +15,7 @@ spec: type: {{ .Values.service.type }} ports: - name: http - port: {{ template "media-common.portSelector" . }} + port: {{ .Values.service.port }} protocol: TCP targetPort: http {{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }} From 561a0f25bb587752c3819f576d92312291975fba Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Sat, 5 Sep 2020 00:53:09 -0500 Subject: [PATCH 04/35] change type --- charts/media-common/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/Chart.yaml b/charts/media-common/Chart.yaml index e384d00b..5974793e 100644 --- a/charts/media-common/Chart.yaml +++ b/charts/media-common/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: media-common description: Common dependancy chart for media ecosystem containers -type: application +type: library version: 1.0.0 keywords: - media-common From c991d11bce6ae23512375b6a9550823661ea15fa Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Sat, 5 Sep 2020 01:14:28 -0500 Subject: [PATCH 05/35] fix gitignore --- .gitignore | 1 + .idea/k8s@home charts.iml | 9 --------- 2 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 .idea/k8s@home charts.iml diff --git a/.gitignore b/.gitignore index 4c49bd78..451fb35e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .env +.idea \ No newline at end of file diff --git a/.idea/k8s@home charts.iml b/.idea/k8s@home charts.iml deleted file mode 100644 index 5e764c4f..00000000 --- a/.idea/k8s@home charts.iml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file From 22017632bc72b1a34fccf5034df8e69e3263675d Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Sat, 5 Sep 2020 03:20:13 -0500 Subject: [PATCH 06/35] test --- charts/bitwardenrs/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/bitwardenrs/Chart.yaml b/charts/bitwardenrs/Chart.yaml index 8f2176d0..a1593e36 100644 --- a/charts/bitwardenrs/Chart.yaml +++ b/charts/bitwardenrs/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: bitwardenrs description: Unofficial Bitwarden compatible server written in Rust type: application -version: 1.0.0 +version: 1.0.1 appVersion: 1.16.3 keywords: - bitwarden From 97f18a033c8c191537bda5c7113f2b19f77f6920 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Sat, 5 Sep 2020 03:21:49 -0500 Subject: [PATCH 07/35] cleanup --- charts/bitwardenrs/Chart.yaml | 2 +- charts/media-common/lidarr/Chart.yaml | 4 ++-- charts/media-common/lidarr/values.yaml | 2 +- charts/media-common/radarr/Chart.yaml | 2 +- charts/media-common/sonarr/Chart.yaml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/bitwardenrs/Chart.yaml b/charts/bitwardenrs/Chart.yaml index a1593e36..8f2176d0 100644 --- a/charts/bitwardenrs/Chart.yaml +++ b/charts/bitwardenrs/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: bitwardenrs description: Unofficial Bitwarden compatible server written in Rust type: application -version: 1.0.1 +version: 1.0.0 appVersion: 1.16.3 keywords: - bitwarden diff --git a/charts/media-common/lidarr/Chart.yaml b/charts/media-common/lidarr/Chart.yaml index 3efc6bb3..0a318f80 100644 --- a/charts/media-common/lidarr/Chart.yaml +++ b/charts/media-common/lidarr/Chart.yaml @@ -1,11 +1,11 @@ apiVersion: v2 -name: Lidarr +name: lidarr description: Lidarr Chart type: application version: 1.0.0 appVersion: 0.7.1.1785 keywords: - - sonarr + - lidarr home: https://github.com/k8s-at-home/charts/tree/master/charts/media-common/lidarr sources: - https://github.com/Lidarr/Lidarr diff --git a/charts/media-common/lidarr/values.yaml b/charts/media-common/lidarr/values.yaml index 0112e546..f34f1d59 100644 --- a/charts/media-common/lidarr/values.yaml +++ b/charts/media-common/lidarr/values.yaml @@ -1,6 +1,6 @@ # Default values for lidarr. -sonarr: +lidarr: image: organization: itscontained repository: lidarr diff --git a/charts/media-common/radarr/Chart.yaml b/charts/media-common/radarr/Chart.yaml index e0e73913..2b8ff8e0 100644 --- a/charts/media-common/radarr/Chart.yaml +++ b/charts/media-common/radarr/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -name: Radarr +name: radarr description: Radarr Chart type: application version: 1.0.0 diff --git a/charts/media-common/sonarr/Chart.yaml b/charts/media-common/sonarr/Chart.yaml index 8217b850..41869eee 100644 --- a/charts/media-common/sonarr/Chart.yaml +++ b/charts/media-common/sonarr/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -name: Sonarr +name: sonarr description: Sonarr Chart type: application version: 1.0.0 From c67e3df33305f8b0ffb2be044d2d65b5ee1e2024 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Sat, 5 Sep 2020 03:31:43 -0500 Subject: [PATCH 08/35] add organizr and ombi --- charts/media-common/ombi/Chart.yaml | 20 ++++++++++++++++++++ charts/media-common/ombi/values.yaml | 10 ++++++++++ charts/media-common/organizr/Chart.yaml | 20 ++++++++++++++++++++ charts/media-common/organizr/values.yaml | 10 ++++++++++ 4 files changed, 60 insertions(+) create mode 100644 charts/media-common/ombi/Chart.yaml create mode 100644 charts/media-common/ombi/values.yaml create mode 100644 charts/media-common/organizr/Chart.yaml create mode 100644 charts/media-common/organizr/values.yaml diff --git a/charts/media-common/ombi/Chart.yaml b/charts/media-common/ombi/Chart.yaml new file mode 100644 index 00000000..e698968f --- /dev/null +++ b/charts/media-common/ombi/Chart.yaml @@ -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 \ No newline at end of file diff --git a/charts/media-common/ombi/values.yaml b/charts/media-common/ombi/values.yaml new file mode 100644 index 00000000..a1b44b14 --- /dev/null +++ b/charts/media-common/ombi/values.yaml @@ -0,0 +1,10 @@ +# Default values for ombi. + +ombi: + image: + organization: itscontained + repository: ombi + pullPolicy: IfNotPresent + tag: "" + service: + port: 5000 \ No newline at end of file diff --git a/charts/media-common/organizr/Chart.yaml b/charts/media-common/organizr/Chart.yaml new file mode 100644 index 00000000..b675f3f2 --- /dev/null +++ b/charts/media-common/organizr/Chart.yaml @@ -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 \ No newline at end of file diff --git a/charts/media-common/organizr/values.yaml b/charts/media-common/organizr/values.yaml new file mode 100644 index 00000000..b5fa7a0a --- /dev/null +++ b/charts/media-common/organizr/values.yaml @@ -0,0 +1,10 @@ +# Default values for organizr. + +organizr: + image: + organization: organizrtools + repository: organizr-v2 + pullPolicy: IfNotPresent + tag: "" + service: + port: 80 \ No newline at end of file From a26921bba5d44f4fdc6f6b6738ea05b072c35ad2 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Sat, 5 Sep 2020 03:38:33 -0500 Subject: [PATCH 09/35] add tautulli --- charts/media-common/tautulli/Chart.yaml | 20 ++++++++++++++++++++ charts/media-common/tautulli/values.yaml | 10 ++++++++++ 2 files changed, 30 insertions(+) create mode 100644 charts/media-common/tautulli/Chart.yaml create mode 100644 charts/media-common/tautulli/values.yaml diff --git a/charts/media-common/tautulli/Chart.yaml b/charts/media-common/tautulli/Chart.yaml new file mode 100644 index 00000000..de92a58a --- /dev/null +++ b/charts/media-common/tautulli/Chart.yaml @@ -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 \ No newline at end of file diff --git a/charts/media-common/tautulli/values.yaml b/charts/media-common/tautulli/values.yaml new file mode 100644 index 00000000..03db4c23 --- /dev/null +++ b/charts/media-common/tautulli/values.yaml @@ -0,0 +1,10 @@ +# Default values for tautulli. + +tautulli: + image: + organization: tautulli + repository: tautulli + pullPolicy: IfNotPresent + tag: "" + service: + port: 8181 \ No newline at end of file From 76c5160e37719e73bf4bb92b217a64d96ec72d91 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Sat, 5 Sep 2020 04:25:20 -0500 Subject: [PATCH 10/35] back to application or templates arent rendered --- charts/media-common/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/Chart.yaml b/charts/media-common/Chart.yaml index 5974793e..e384d00b 100644 --- a/charts/media-common/Chart.yaml +++ b/charts/media-common/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: media-common description: Common dependancy chart for media ecosystem containers -type: library +type: application version: 1.0.0 keywords: - media-common From 5705371a354e3f2a4cf6cac76c9dd850030f239d Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Sat, 5 Sep 2020 04:36:30 -0500 Subject: [PATCH 11/35] fix last portselector --- charts/media-common/templates/ingress.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/templates/ingress.yaml b/charts/media-common/templates/ingress.yaml index 3ce03cd3..dd8fbc0a 100644 --- a/charts/media-common/templates/ingress.yaml +++ b/charts/media-common/templates/ingress.yaml @@ -1,6 +1,6 @@ {{- if .Values.ingress.enabled -}} {{- $fullName := include "media-common.fullname" . -}} - {{- $svcPort := include "media-common.portSelector" . -}} + {{- $svcPort := .Values.service.port -}} {{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} apiVersion: networking.k8s.io/v1beta1 {{- else -}} From 107e53d3b76476001b3b7917a9386948d0c74ee6 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Sat, 5 Sep 2020 19:49:12 -0500 Subject: [PATCH 12/35] add extra ingress option for apis and test ct-values.yaml --- charts/media-common/ci/ct-values.yaml | 7 ++++ charts/media-common/templates/ingress.yaml | 42 +++++++++++++++++++++- charts/media-common/values.yaml | 15 ++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 charts/media-common/ci/ct-values.yaml diff --git a/charts/media-common/ci/ct-values.yaml b/charts/media-common/ci/ct-values.yaml new file mode 100644 index 00000000..c8ca49f7 --- /dev/null +++ b/charts/media-common/ci/ct-values.yaml @@ -0,0 +1,7 @@ +image: + organization: itscontained + repository: radarr + pullPolicy: IfNotPresent + tag: latest +service: + port: 7878 \ No newline at end of file diff --git a/charts/media-common/templates/ingress.yaml b/charts/media-common/templates/ingress.yaml index dd8fbc0a..61a29ce6 100644 --- a/charts/media-common/templates/ingress.yaml +++ b/charts/media-common/templates/ingress.yaml @@ -38,4 +38,44 @@ spec: servicePort: {{ $svcPort }} {{- end }} {{- 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 }} \ No newline at end of file diff --git a/charts/media-common/values.yaml b/charts/media-common/values.yaml index 8badab61..2eab8010 100644 --- a/charts/media-common/values.yaml +++ b/charts/media-common/values.yaml @@ -53,6 +53,21 @@ ingress: # - 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 From 5451ce26abb76d1ef850c4e856bf197bfad6177c Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Sat, 5 Sep 2020 19:50:27 -0500 Subject: [PATCH 13/35] ... --- charts/media-common/ci/ct-values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/ci/ct-values.yaml b/charts/media-common/ci/ct-values.yaml index c8ca49f7..d69b1172 100644 --- a/charts/media-common/ci/ct-values.yaml +++ b/charts/media-common/ci/ct-values.yaml @@ -4,4 +4,4 @@ image: pullPolicy: IfNotPresent tag: latest service: - port: 7878 \ No newline at end of file + port: 7878 From 1f6050759ba297762049edfe07ffd230008a9502 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Sat, 5 Sep 2020 20:12:50 -0500 Subject: [PATCH 14/35] fix configpath, volumemount, and helpers --- charts/media-common/ci/ct-values.yaml | 1 - charts/media-common/lidarr/values.yaml | 2 +- charts/media-common/ombi/values.yaml | 3 ++- charts/media-common/organizr/values.yaml | 4 ++-- charts/media-common/radarr/values.yaml | 3 ++- charts/media-common/sonarr/values.yaml | 3 ++- charts/media-common/templates/_helpers.tpl | 19 ------------------- charts/media-common/templates/deployment.yaml | 8 ++++---- .../media-common/templates/statefulset.yaml | 2 +- charts/media-common/values.yaml | 8 +++++--- 10 files changed, 19 insertions(+), 34 deletions(-) diff --git a/charts/media-common/ci/ct-values.yaml b/charts/media-common/ci/ct-values.yaml index d69b1172..50f4ca6e 100644 --- a/charts/media-common/ci/ct-values.yaml +++ b/charts/media-common/ci/ct-values.yaml @@ -1,7 +1,6 @@ image: organization: itscontained repository: radarr - pullPolicy: IfNotPresent tag: latest service: port: 7878 diff --git a/charts/media-common/lidarr/values.yaml b/charts/media-common/lidarr/values.yaml index f34f1d59..e847ea0a 100644 --- a/charts/media-common/lidarr/values.yaml +++ b/charts/media-common/lidarr/values.yaml @@ -2,7 +2,7 @@ lidarr: image: - organization: itscontained + organization: linuxserver repository: lidarr pullPolicy: IfNotPresent tag: "" diff --git a/charts/media-common/ombi/values.yaml b/charts/media-common/ombi/values.yaml index a1b44b14..d5bb8cf4 100644 --- a/charts/media-common/ombi/values.yaml +++ b/charts/media-common/ombi/values.yaml @@ -7,4 +7,5 @@ ombi: pullPolicy: IfNotPresent tag: "" service: - port: 5000 \ No newline at end of file + port: 5000 + configPath: /var/lib/ombi \ No newline at end of file diff --git a/charts/media-common/organizr/values.yaml b/charts/media-common/organizr/values.yaml index b5fa7a0a..7a534afb 100644 --- a/charts/media-common/organizr/values.yaml +++ b/charts/media-common/organizr/values.yaml @@ -2,8 +2,8 @@ organizr: image: - organization: organizrtools - repository: organizr-v2 + organization: organizr + repository: organizr pullPolicy: IfNotPresent tag: "" service: diff --git a/charts/media-common/radarr/values.yaml b/charts/media-common/radarr/values.yaml index da5a738c..7a33b939 100644 --- a/charts/media-common/radarr/values.yaml +++ b/charts/media-common/radarr/values.yaml @@ -7,4 +7,5 @@ radarr: pullPolicy: IfNotPresent tag: "" service: - port: 7878 \ No newline at end of file + port: 7878 + configPath: /var/lib/radarr \ No newline at end of file diff --git a/charts/media-common/sonarr/values.yaml b/charts/media-common/sonarr/values.yaml index 421ceb0a..c69ca74a 100644 --- a/charts/media-common/sonarr/values.yaml +++ b/charts/media-common/sonarr/values.yaml @@ -7,4 +7,5 @@ sonarr: pullPolicy: IfNotPresent tag: "" service: - port: 8989 \ No newline at end of file + port: 8989 + configPath: /var/lib/radarr \ No newline at end of file diff --git a/charts/media-common/templates/_helpers.tpl b/charts/media-common/templates/_helpers.tpl index 8b6e8de7..96638404 100644 --- a/charts/media-common/templates/_helpers.tpl +++ b/charts/media-common/templates/_helpers.tpl @@ -50,22 +50,3 @@ Selector labels app.kubernetes.io/name: {{ include "media-common.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} - -{{/* -Config Path Selector -*/}} -{{- define "media-common.configPathSelector" -}} - {{- if eq .Values.image.organization "itscontained" -}} - {{- if eq .Values.image.repository "radarr" -}} -/var/lib/radarr - {{- else if eq .Values.image.repository "sonarr" -}} -/var/lib/sonarr - {{- else if eq .Values.image.repository "lidarr" -}} - {{- fail "lidarr not yet implemented" -}} - {{- else -}} - {{- fail "Could not establish the service port from the repository and no service port was set" -}} - {{- end -}} - {{- else -}} -/config - {{- end -}} -{{- end -}} \ No newline at end of file diff --git a/charts/media-common/templates/deployment.yaml b/charts/media-common/templates/deployment.yaml index 5c88c629..654b9253 100644 --- a/charts/media-common/templates/deployment.yaml +++ b/charts/media-common/templates/deployment.yaml @@ -36,8 +36,8 @@ spec: image: "{{ .Values.image.organization }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} envFrom: - - configMapRef: - name: {{ template "media-common.fullname" . }} + - configMapRef: + name: {{ template "media-common.fullname" . }} ports: - name: http containerPort: {{ .Values.service.port }} @@ -55,7 +55,7 @@ spec: failureThreshold: {{ .Values.probes.readiness.failureThreshold }} timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} volumeMounts: - - mountPath: {{ template "media-common.configPathSelector" . }} + - mountPath: {{ .Values.configPath }} name: config {{- if .Values.persistence.config.subPath }} subPath: {{ .Values.persistence.config.subPath }} @@ -68,7 +68,7 @@ spec: {{- end }} {{- end }} {{- if .Values.additionalVolumeMounts }} - {{- toYaml .Values.additionalVolumes | nindent 12 }} + {{- toYaml .Values.additionalVolumeMounts | nindent 12 }} {{- end }} {{- with .Values.resources }} resources: diff --git a/charts/media-common/templates/statefulset.yaml b/charts/media-common/templates/statefulset.yaml index 8d112638..931d2d4f 100644 --- a/charts/media-common/templates/statefulset.yaml +++ b/charts/media-common/templates/statefulset.yaml @@ -56,7 +56,7 @@ spec: failureThreshold: {{ .Values.probes.readiness.failureThreshold }} timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} volumeMounts: - - mountPath: {{ template "media-common.configPathSelector" . }} + - mountPath: {{ .Values.configPath }} name: config {{- if .Values.persistence.config.subPath }} subPath: {{ .Values.persistence.config.subPath }} diff --git a/charts/media-common/values.yaml b/charts/media-common/values.yaml index 2eab8010..da2dac13 100644 --- a/charts/media-common/values.yaml +++ b/charts/media-common/values.yaml @@ -21,6 +21,8 @@ imagePullSecrets: [] nameOverride: "" fullnameOverride: "" +configPath: /config + env: TZ: UTC @@ -74,7 +76,7 @@ persistence: type: statefulset config: enabled: true - ## arr configuration data Persistent Volume Storage Class + ## media-common configuration data Persistent Volume Storage Class ## If defined, storageClassName: ## If set to "-", storageClassName: "", which disables dynamic provisioning ## If undefined (the default) or set to null, no storageClassName spec is @@ -92,8 +94,8 @@ persistence: ## Do not delete the pvc upon helm uninstall skipuninstall: false media: - enabled: true - ## arr media volume configuration + enabled: false + ## media-common media volume configuration ## If defined, storageClassName: ## If set to "-", storageClassName: "", which disables dynamic provisioning ## If undefined (the default) or set to null, no storageClassName spec is From 480fa5a7d35f9fc659596023461cf167d74b3e16 Mon Sep 17 00:00:00 2001 From: Ryan Holt Date: Sat, 5 Sep 2020 21:24:20 -0400 Subject: [PATCH 15/35] add newline --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 451fb35e..e58e5a29 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ .env -.idea \ No newline at end of file +.idea From 0ed3ecbb48f9df680993c41d286fd51df489fe05 Mon Sep 17 00:00:00 2001 From: Ryan Holt Date: Sat, 5 Sep 2020 21:24:42 -0400 Subject: [PATCH 16/35] added newline --- charts/media-common/OWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/OWNERS b/charts/media-common/OWNERS index 90661f99..2eb39f10 100644 --- a/charts/media-common/OWNERS +++ b/charts/media-common/OWNERS @@ -1,4 +1,4 @@ approvers: - DirtyCajunRice reviewers: -- DirtyCajunRice \ No newline at end of file +- DirtyCajunRice From 990ba59dfa0b11a8d47004ae4c74ee96fb66d753 Mon Sep 17 00:00:00 2001 From: Ryan Holt Date: Sat, 5 Sep 2020 21:25:07 -0400 Subject: [PATCH 17/35] added newline --- charts/media-common/lidarr/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/lidarr/Chart.yaml b/charts/media-common/lidarr/Chart.yaml index 0a318f80..fd740a68 100644 --- a/charts/media-common/lidarr/Chart.yaml +++ b/charts/media-common/lidarr/Chart.yaml @@ -17,4 +17,4 @@ dependencies: - name: media-common repository: https://k8s-at-home.com/charts/ version: 1.0.0 - alias: lidarr \ No newline at end of file + alias: lidarr From e7e46653893656c2f7a7dc72cc3c03819f4ce391 Mon Sep 17 00:00:00 2001 From: Ryan Holt Date: Sat, 5 Sep 2020 21:25:24 -0400 Subject: [PATCH 18/35] added newline --- charts/media-common/lidarr/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/lidarr/values.yaml b/charts/media-common/lidarr/values.yaml index e847ea0a..db7a7369 100644 --- a/charts/media-common/lidarr/values.yaml +++ b/charts/media-common/lidarr/values.yaml @@ -7,4 +7,4 @@ lidarr: pullPolicy: IfNotPresent tag: "" service: - port: 8686 \ No newline at end of file + port: 8686 From c5b81a263f20a5ab1ec36d6478b19a4fc5a759aa Mon Sep 17 00:00:00 2001 From: Ryan Holt Date: Sat, 5 Sep 2020 21:25:45 -0400 Subject: [PATCH 19/35] added newline --- charts/media-common/ombi/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/ombi/Chart.yaml b/charts/media-common/ombi/Chart.yaml index e698968f..c1ca2ad4 100644 --- a/charts/media-common/ombi/Chart.yaml +++ b/charts/media-common/ombi/Chart.yaml @@ -17,4 +17,4 @@ dependencies: - name: media-common repository: https://k8s-at-home.com/charts/ version: 1.0.0 - alias: ombi \ No newline at end of file + alias: ombi From e5b78c73146eaf84df65c4cdf6f32b5a3586e008 Mon Sep 17 00:00:00 2001 From: Ryan Holt Date: Sat, 5 Sep 2020 21:26:02 -0400 Subject: [PATCH 20/35] added newline --- charts/media-common/ombi/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/ombi/values.yaml b/charts/media-common/ombi/values.yaml index d5bb8cf4..287f5bdd 100644 --- a/charts/media-common/ombi/values.yaml +++ b/charts/media-common/ombi/values.yaml @@ -8,4 +8,4 @@ ombi: tag: "" service: port: 5000 - configPath: /var/lib/ombi \ No newline at end of file + configPath: /var/lib/ombi From 1dff5670d837972c9410dd26e706eeadf173b67c Mon Sep 17 00:00:00 2001 From: Ryan Holt Date: Sat, 5 Sep 2020 21:26:56 -0400 Subject: [PATCH 21/35] new line --- charts/media-common/organizr/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/organizr/Chart.yaml b/charts/media-common/organizr/Chart.yaml index b675f3f2..42d9e64b 100644 --- a/charts/media-common/organizr/Chart.yaml +++ b/charts/media-common/organizr/Chart.yaml @@ -17,4 +17,4 @@ dependencies: - name: media-common repository: https://k8s-at-home.com/charts/ version: 1.0.0 - alias: organizr \ No newline at end of file + alias: organizr From 1b1898809b8d589842af75c89ea4b4d68e90495c Mon Sep 17 00:00:00 2001 From: Ryan Holt Date: Sat, 5 Sep 2020 21:27:11 -0400 Subject: [PATCH 22/35] newline --- charts/media-common/organizr/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/organizr/values.yaml b/charts/media-common/organizr/values.yaml index 7a534afb..5aa49831 100644 --- a/charts/media-common/organizr/values.yaml +++ b/charts/media-common/organizr/values.yaml @@ -7,4 +7,4 @@ organizr: pullPolicy: IfNotPresent tag: "" service: - port: 80 \ No newline at end of file + port: 80 From 2a3f676426ac746fa1155fc0a4f232d47f91ea33 Mon Sep 17 00:00:00 2001 From: Ryan Holt Date: Sat, 5 Sep 2020 21:27:32 -0400 Subject: [PATCH 23/35] newline --- charts/media-common/radarr/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/radarr/Chart.yaml b/charts/media-common/radarr/Chart.yaml index 2b8ff8e0..b153002a 100644 --- a/charts/media-common/radarr/Chart.yaml +++ b/charts/media-common/radarr/Chart.yaml @@ -17,4 +17,4 @@ dependencies: - name: media-common repository: https://k8s-at-home.com/charts/ version: 1.0.0 - alias: radarr \ No newline at end of file + alias: radarr From 16828ba415faaf55818f162404935c085a705091 Mon Sep 17 00:00:00 2001 From: Ryan Holt Date: Sat, 5 Sep 2020 21:27:49 -0400 Subject: [PATCH 24/35] newline --- charts/media-common/radarr/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/radarr/values.yaml b/charts/media-common/radarr/values.yaml index 7a33b939..80109677 100644 --- a/charts/media-common/radarr/values.yaml +++ b/charts/media-common/radarr/values.yaml @@ -8,4 +8,4 @@ radarr: tag: "" service: port: 7878 - configPath: /var/lib/radarr \ No newline at end of file + configPath: /var/lib/radarr From aec35fe08f559b377a93b4547425368f23a2e9f9 Mon Sep 17 00:00:00 2001 From: Ryan Holt Date: Sat, 5 Sep 2020 21:28:02 -0400 Subject: [PATCH 25/35] newline --- charts/media-common/sonarr/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/sonarr/Chart.yaml b/charts/media-common/sonarr/Chart.yaml index 41869eee..a52ff2d1 100644 --- a/charts/media-common/sonarr/Chart.yaml +++ b/charts/media-common/sonarr/Chart.yaml @@ -17,4 +17,4 @@ dependencies: - name: media-common repository: https://k8s-at-home.com/charts/ version: 1.0.0 - alias: sonarr \ No newline at end of file + alias: sonarr From ab4fd1b1e04b19aef0480ded981d1c034d05e109 Mon Sep 17 00:00:00 2001 From: Ryan Holt Date: Sat, 5 Sep 2020 21:28:19 -0400 Subject: [PATCH 26/35] newline --- charts/media-common/sonarr/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/sonarr/values.yaml b/charts/media-common/sonarr/values.yaml index c69ca74a..35ca7483 100644 --- a/charts/media-common/sonarr/values.yaml +++ b/charts/media-common/sonarr/values.yaml @@ -8,4 +8,4 @@ sonarr: tag: "" service: port: 8989 - configPath: /var/lib/radarr \ No newline at end of file + configPath: /var/lib/radarr From 04478fd52f51ef38612be6d10adbcb265b3ca217 Mon Sep 17 00:00:00 2001 From: Ryan Holt Date: Sat, 5 Sep 2020 21:28:34 -0400 Subject: [PATCH 27/35] newline --- charts/media-common/tautulli/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/tautulli/Chart.yaml b/charts/media-common/tautulli/Chart.yaml index de92a58a..cc7f5cdf 100644 --- a/charts/media-common/tautulli/Chart.yaml +++ b/charts/media-common/tautulli/Chart.yaml @@ -17,4 +17,4 @@ dependencies: - name: media-common repository: https://k8s-at-home.com/charts/ version: 1.0.0 - alias: tautulli \ No newline at end of file + alias: tautulli From c40bdfeff7743be69e51d550021e0fd427ccd7fd Mon Sep 17 00:00:00 2001 From: Ryan Holt Date: Sat, 5 Sep 2020 21:28:48 -0400 Subject: [PATCH 28/35] newline --- charts/media-common/tautulli/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/tautulli/values.yaml b/charts/media-common/tautulli/values.yaml index 03db4c23..5bd7142d 100644 --- a/charts/media-common/tautulli/values.yaml +++ b/charts/media-common/tautulli/values.yaml @@ -7,4 +7,4 @@ tautulli: pullPolicy: IfNotPresent tag: "" service: - port: 8181 \ No newline at end of file + port: 8181 From 66d5bd7193eb4ee618c2668afad67856093528de Mon Sep 17 00:00:00 2001 From: Ryan Holt Date: Sat, 5 Sep 2020 21:29:05 -0400 Subject: [PATCH 29/35] newline --- charts/media-common/templates/configmap.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/templates/configmap.yaml b/charts/media-common/templates/configmap.yaml index 41603fc2..95eb1af6 100644 --- a/charts/media-common/templates/configmap.yaml +++ b/charts/media-common/templates/configmap.yaml @@ -7,4 +7,4 @@ metadata: {{- if .Values.env }} data: {{- toYaml .Values.env | nindent 2 }} -{{- end }} \ No newline at end of file +{{- end }} From ac68205d8be75ba5e523fe41f92daa14911fd203 Mon Sep 17 00:00:00 2001 From: Ryan Holt Date: Sat, 5 Sep 2020 21:29:27 -0400 Subject: [PATCH 30/35] newline --- charts/media-common/templates/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/templates/deployment.yaml b/charts/media-common/templates/deployment.yaml index 654b9253..a9139b77 100644 --- a/charts/media-common/templates/deployment.yaml +++ b/charts/media-common/templates/deployment.yaml @@ -102,4 +102,4 @@ spec: tolerations: {{ toYaml . | indent 8 }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} From a75a6cef773f842fd937806f5439e1bc46771e57 Mon Sep 17 00:00:00 2001 From: Ryan Holt Date: Sat, 5 Sep 2020 21:30:08 -0400 Subject: [PATCH 31/35] newline --- charts/media-common/templates/ingress.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/templates/ingress.yaml b/charts/media-common/templates/ingress.yaml index 61a29ce6..d3753c42 100644 --- a/charts/media-common/templates/ingress.yaml +++ b/charts/media-common/templates/ingress.yaml @@ -78,4 +78,4 @@ spec: {{- end }} {{- end }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} From 31959e5e37456b082396e2a1776591fc9ee2abbf Mon Sep 17 00:00:00 2001 From: Ryan Holt Date: Sat, 5 Sep 2020 21:30:32 -0400 Subject: [PATCH 32/35] newline --- charts/media-common/templates/pvc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/templates/pvc.yaml b/charts/media-common/templates/pvc.yaml index 14309791..2f994847 100644 --- a/charts/media-common/templates/pvc.yaml +++ b/charts/media-common/templates/pvc.yaml @@ -41,4 +41,4 @@ spec: {{- if .Values.persistence.media.storageClass }} storageClassName: {{ if (eq "-" .Values.persistence.media.storageClass) }}""{{- else }}{{ .Values.persistence.media.storageClass | quote}}{{- end }} {{- end }} -{{- end -}} \ No newline at end of file +{{- end -}} From 12853f3b9a40048f37475375f7bf91870422e512 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Sat, 5 Sep 2020 20:30:55 -0500 Subject: [PATCH 33/35] add configpath --- charts/media-common/ci/ct-values.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/media-common/ci/ct-values.yaml b/charts/media-common/ci/ct-values.yaml index 50f4ca6e..f03d2158 100644 --- a/charts/media-common/ci/ct-values.yaml +++ b/charts/media-common/ci/ct-values.yaml @@ -4,3 +4,4 @@ image: tag: latest service: port: 7878 +configPath: /var/lib/radarr \ No newline at end of file From 2ecc70f1df1b8380d4137b8052355d86b85b576a Mon Sep 17 00:00:00 2001 From: Ryan Holt Date: Sat, 5 Sep 2020 21:31:10 -0400 Subject: [PATCH 34/35] newline --- charts/media-common/templates/statefulset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/templates/statefulset.yaml b/charts/media-common/templates/statefulset.yaml index 931d2d4f..d3d62468 100644 --- a/charts/media-common/templates/statefulset.yaml +++ b/charts/media-common/templates/statefulset.yaml @@ -103,4 +103,4 @@ spec: tolerations: {{ toYaml . | indent 8 }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} From 48df9250512e683c1c25c7ce144ce4114b80386a Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Sat, 5 Sep 2020 20:32:31 -0500 Subject: [PATCH 35/35] stupid line --- charts/media-common/ci/ct-values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/media-common/ci/ct-values.yaml b/charts/media-common/ci/ct-values.yaml index f03d2158..eca9249e 100644 --- a/charts/media-common/ci/ct-values.yaml +++ b/charts/media-common/ci/ct-values.yaml @@ -4,4 +4,4 @@ image: tag: latest service: port: 7878 -configPath: /var/lib/radarr \ No newline at end of file +configPath: /var/lib/radarr