diff --git a/flaresolverr_values.yaml b/flaresolverr_values.yaml new file mode 100644 index 0000000..db0b8d7 --- /dev/null +++ b/flaresolverr_values.yaml @@ -0,0 +1,20 @@ +image: + repository: ghcr.io/flaresolverr/flaresolverr + pullPolicy: IfNotPresent + tag: latest + +env: + TZ: UTC + +service: + main: + ports: + http: + port: 8191 + +ingress: + # -- Enable and configure ingress settings for the chart under this key. + # @default -- See values.yaml + main: + enabled: false + diff --git a/ingress.yaml b/ingress.yaml index 9f38af1..522cf49 100644 --- a/ingress.yaml +++ b/ingress.yaml @@ -1,3 +1,4 @@ +--- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: @@ -10,18 +11,98 @@ metadata: namespace: default spec: rules: - - host: tp2.gilgamezh.me - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: plex-kube-plex - port: - number: 32400 + - host: tp2.gilgamezh.me + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: plex-kube-plex + port: + number: 32400 tls: - - hosts: - - tp2.gilgamezh.me - secretName: tp2-gilgamezh-me - + - hosts: + - tp2.gilgamezh.me + secretName: tp2-gilgamezh-me +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + cert-manager.io/cluster-issuer: letsencrypt-production + kubernetes.io/ingress.class: traefik + labels: + app: radarr + name: radarr + namespace: default +spec: + rules: + - host: radarr.gilgamezh.me + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: radarr + port: + number: 7878 + tls: + - hosts: + - radarr.gilgamezh.me + secretName: radarr-gilgamezh-me +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + cert-manager.io/cluster-issuer: letsencrypt-production + kubernetes.io/ingress.class: traefik + labels: + app: sonarr + name: sonarr + namespace: default +spec: + rules: + - host: sonarr.gilgamezh.me + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: sonarr + port: + number: 8989 + tls: + - hosts: + - sonarr.gilgamezh.me + secretName: sonarr-gilgamezh-me +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + cert-manager.io/cluster-issuer: letsencrypt-production + kubernetes.io/ingress.class: traefik + labels: + app: transmission-transmission-openvpn + name: transmission-transmission-openvpn + namespace: default +spec: + rules: + - host: torrent.gilgamezh.me + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: transmission-transmission-openvpn + port: + number: 9091 + tls: + - hosts: + - torrent.gilgamezh.me + secretName: torrent-gilgamezh-me diff --git a/limit_ingress_to_lan.yaml b/limit_ingress_to_lan.yaml new file mode 100644 index 0000000..0379419 --- /dev/null +++ b/limit_ingress_to_lan.yaml @@ -0,0 +1,49 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: ingress-allow-from-specific-ip + namespace: default +spec: + podSelector: + matchLabels: + app: radarr + policyTypes: + - Ingress + ingress: + - from: + - ipBlock: + cidr: 192.168.222.0/24 + +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: sonarr-ingress-allow-from-specific-ip + namespace: default +spec: + podSelector: + matchLabels: + app: sonarr + policyTypes: + - Ingress + ingress: + - from: + - ipBlock: + cidr: 192.168.222.0/24 + +--- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: transmission-ingress-allow-from-specific-ip + namespace: default +spec: + podSelector: + matchLabels: + app: transmission-transmission-openvpn + policyTypes: + - Ingress + ingress: + - from: + - ipBlock: + cidr: 192.168.222.0/24 diff --git a/pgsql_persistent_volume.yml b/pgsql_persistent_volume.yml new file mode 100644 index 0000000..9b4ea58 --- /dev/null +++ b/pgsql_persistent_volume.yml @@ -0,0 +1,12 @@ +--- +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: postgres +spec: + storageClassName: nfs-client + accessModes: + - ReadWriteMany + resources: + requests: + storage: 5Gi diff --git a/pgsql_values.yaml b/pgsql_values.yaml new file mode 100644 index 0000000..8983afd --- /dev/null +++ b/pgsql_values.yaml @@ -0,0 +1,11 @@ +primary: + persistence: + existingClaim: "postgres" + nodeSelector: + kubernetes.io/hostname: "turing3" + +auth: + postgresPassword: "clavedatabase" + +volumePermissions: + enabled: true diff --git a/prometheus_values.yml b/prometheus_values.yml new file mode 100644 index 0000000..4c429e2 --- /dev/null +++ b/prometheus_values.yml @@ -0,0 +1,15 @@ +prometheus: + prometheusSpec: + storageSpec: + volumeClaimTemplate: + spec: + storageClassName: nfs-client + accessModes: ["ReadWriteOnce"] + resources: + requests: + storage: 50Gi # You can adjust the size as needed + +grafana: + service: + type: LoadBalancer + port: 80 diff --git a/prowlarr/.helmignore b/prowlarr/.helmignore new file mode 100644 index 0000000..f0c1319 --- /dev/null +++ b/prowlarr/.helmignore @@ -0,0 +1,21 @@ +# 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 diff --git a/prowlarr/Chart.yaml b/prowlarr/Chart.yaml new file mode 100644 index 0000000..768fdf0 --- /dev/null +++ b/prowlarr/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +appVersion: "1.0" +description: Prowlarr - Automatic downloader for movies :) +name: prowlarr +version: 0.1.0 +icon: https://bananaspliff.github.io/geek-charts/prowlarr/logo/prowlarr.png diff --git a/prowlarr/logo/radarr.png b/prowlarr/logo/radarr.png new file mode 100644 index 0000000..6679b0c Binary files /dev/null and b/prowlarr/logo/radarr.png differ diff --git a/prowlarr/templates/NOTES.txt b/prowlarr/templates/NOTES.txt new file mode 100644 index 0000000..15bcde7 --- /dev/null +++ b/prowlarr/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 {{ template "prowlarr.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ template "prowlarr.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "prowlarr.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "prowlarr.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:80 +{{- end }} diff --git a/prowlarr/templates/_helpers.tpl b/prowlarr/templates/_helpers.tpl new file mode 100644 index 0000000..cf0e3c2 --- /dev/null +++ b/prowlarr/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "prowlarr.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 "prowlarr.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 "prowlarr.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/prowlarr/templates/deployment.yaml b/prowlarr/templates/deployment.yaml new file mode 100644 index 0000000..59d454e --- /dev/null +++ b/prowlarr/templates/deployment.yaml @@ -0,0 +1,49 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "prowlarr.fullname" . }} + labels: + app: {{ template "prowlarr.name" . }} + chart: {{ template "prowlarr.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "prowlarr.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "prowlarr.name" . }} + release: {{ .Release.Name }} + spec: + volumes: +{{ toYaml .Values.volumes | indent 6 }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: +{{ toYaml .Values.env | indent 12 }} + ports: + - name: http + containerPort: 7878 + protocol: TCP + volumeMounts: +{{ toYaml .Values.volumeMounts | indent 12 }} + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} diff --git a/prowlarr/templates/ingress.yaml b/prowlarr/templates/ingress.yaml new file mode 100644 index 0000000..71cc303 --- /dev/null +++ b/prowlarr/templates/ingress.yaml @@ -0,0 +1,38 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "prowlarr.fullname" . -}} +{{- $ingressPath := .Values.ingress.path -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + app: {{ template "prowlarr.name" . }} + chart: {{ template "prowlarr.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.ingress.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +spec: +{{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} +{{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ . }} + http: + paths: + - path: {{ $ingressPath }} + backend: + serviceName: {{ $fullName }} + servicePort: http + {{- end }} +{{- end }} diff --git a/prowlarr/templates/service.yaml b/prowlarr/templates/service.yaml new file mode 100644 index 0000000..9854048 --- /dev/null +++ b/prowlarr/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "prowlarr.fullname" . }} + labels: + app: {{ template "prowlarr.name" . }} + chart: {{ template "prowlarr.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: 9696 + protocol: TCP + name: http + selector: + app: {{ template "prowlarr.name" . }} + release: {{ .Release.Name }} diff --git a/prowlarr/values.yaml b/prowlarr/values.yaml new file mode 100644 index 0000000..eea0d24 --- /dev/null +++ b/prowlarr/values.yaml @@ -0,0 +1,54 @@ + +replicaCount: 1 + +image: + repository: lscr.io/linuxserver/prowlarr + tag: latest + pullPolicy: IfNotPresent + +env: + - name: PUID + value: "1000" + - name: PGID + value: "1000" + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: false + annotations: + kubernetes.io/ingress.class: nginx + kubernetes.io/tls-acme: "true" + path: / + hosts: + - prowlarr.bananaspliff.org + tls: + - secretName: prowlarr-bananaspliff-org + hosts: + - prowlarr.bananaspliff.org + +volumes: + - name: myvolume + persistentVolumeClaim: + claimName: myvolume + +volumeMounts: + - name: myvolume + mountPath: "/config" + subPath: "configs/prowlarr" + +resources: + requests: + memory: 128Mi + cpu: 0.1 + limits: + memory: 256Mi + cpu: 0.5 + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/prowlarr_values.yml b/prowlarr_values.yml new file mode 100644 index 0000000..18c19db --- /dev/null +++ b/prowlarr_values.yml @@ -0,0 +1,31 @@ +image: + repository: lscr.io/linuxserver/prowlarr + tag: latest + pullPolicy: IfNotPresent + +env: + - name: TZ + value: "Europe/Amsterdam" + +volumes: + - name: "plex-data" + persistentVolumeClaim: + claimName: "plex-data" # PersistentVolumeClaim created earlier + +volumeMounts: + - name: "plex-data" + mountPath: "/config" + subPath: "configs/prowlarr" # Path /mnt/ssd/media/configs/prowlarr where prowlarr writes the configuration + +service: + type: ClusterIP + port: 9696 + +resources: {} + +nodeSelector: {} + +tolerations: [] + +affinity: {} + diff --git a/radarr_values.yaml b/radarr_values.yaml new file mode 100644 index 0000000..d2e72cb --- /dev/null +++ b/radarr_values.yaml @@ -0,0 +1,33 @@ +## media.radarr.values.yml +replicaCount: 1 + +image: + repository: ghcr.io/linuxserver/radarr + tag: latest + pullPolicy: IfNotPresent + +env: + - name: PUID + value: "1000" + - name: PGID + value: "1000" + +service: + type: ClusterIP + port: 7878 + +volumes: + - name: "plex-data" + persistentVolumeClaim: + claimName: "plex-data" # PersistentVolumeClaim created earlier + +volumeMounts: + - name: "plex-data" + mountPath: "/config" + subPath: "configs/radarr" # Path /mnt/ssd/media/configs/radarr where radarr writes the configuration + - name: "plex-data" + mountPath: "/downloads/transmission" + subPath: "downloads/transmission" # Path /mnt/ssd/media/downloads/transmission where radarr picks up downloaded movies + - name: plex-data + mountPath: "/movies" + subPath: "library/movies" # Path /mnt/ssd/media/library/movies where radarr moves and renames the movies diff --git a/sonarr_values.yaml b/sonarr_values.yaml new file mode 100644 index 0000000..8510287 --- /dev/null +++ b/sonarr_values.yaml @@ -0,0 +1,32 @@ +replicaCount: 1 + +image: + repository: ghcr.io/linuxserver/sonarr + tag: latest + pullPolicy: IfNotPresent + +env: + - name: PUID + value: "1000" + - name: PGID + value: "1000" + +service: + type: ClusterIP + port: 8989 + +volumes: + - name: plex-data + persistentVolumeClaim: + claimName: "plex-data" # PersistentVolumeClaim created earlier + +volumeMounts: + - name: plex-data + mountPath: "/config" + subPath: "configs/sonarr" # Path /mnt/ssd/media/configs/sonarr where sonarr writes the configuration + - name: plex-data + mountPath: "/downloads/transmission" + subPath: "downloads/transmission" # Path /mnt/ssd/media/downloads/transmission where sonarr picks up downloaded episodes + - name: plex-data + mountPath: "/tv" + subPath: "library/tv" # Path /mnt/ssd/media/library/tv where sonarr moves and renames the episodes diff --git a/transmission_values.yml b/transmission_values.yml index 5411b52..42f0e80 100644 --- a/transmission_values.yml +++ b/transmission_values.yml @@ -40,7 +40,7 @@ env: service: type: ClusterIP - port: 80 + port: 9091 volumes: - name: "plex-data" diff --git a/values_flareSolver.yaml b/values_flareSolver.yaml new file mode 100644 index 0000000..f1cc91b --- /dev/null +++ b/values_flareSolver.yaml @@ -0,0 +1,21 @@ +resources: + - apiVersion: v1 + kind: Deployment + metadata: + name: flaresolverr + spec: + replicas: 1 + selector: + matchLabels: + app: flaresolverr + template: + metadata: + labels: + app: flaresolverr + spec: + containers: + - name: flaresolverr + image: flaresolverr/flaresolverr:latest + ports: + - containerPort: 8191 +