convert to app template
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
name: lidarr
|
name: lidarr2
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
description: Lidarr
|
description: Lidarr
|
||||||
keywords:
|
keywords:
|
||||||
@@ -13,14 +13,15 @@ sources:
|
|||||||
- https://github.com/cloudnative-pg/cloudnative-pg
|
- https://github.com/cloudnative-pg/cloudnative-pg
|
||||||
- https://github.com/onedr0p/containers/pkgs/container/lidarr
|
- https://github.com/onedr0p/containers/pkgs/container/lidarr
|
||||||
- https://github.com/onedr0p/exportarr/pkgs/container/exportarr
|
- https://github.com/onedr0p/exportarr/pkgs/container/exportarr
|
||||||
- https://github.com/k8s-home-lab/helm-charts/tree/master/charts/stable/lidarr
|
- https://github.com/bjw-s/helm-charts/tree/main/charts/other/app-template
|
||||||
- https://github.com/alexlebens/helm-charts/charts/postgres-cluster
|
- https://github.com/alexlebens/helm-charts/charts/postgres-cluster
|
||||||
maintainers:
|
maintainers:
|
||||||
- name: alexlebens
|
- name: alexlebens
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: lidarr
|
- name: app-template
|
||||||
version: 15.1.1
|
alias: lidarr2
|
||||||
repository: https://k8s-home-lab.github.io/helm-charts/
|
repository: https://bjw-s.github.io/helm-charts/
|
||||||
|
version: 3.2.1
|
||||||
- name: postgres-cluster
|
- name: postgres-cluster
|
||||||
alias: postgres-16-cluster
|
alias: postgres-16-cluster
|
||||||
version: 3.5.0
|
version: 3.5.0
|
||||||
|
@@ -1,16 +1,16 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: "{{ .Release.Name }}-nfs-storage"
|
name: lidarr2-nfs-storage
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: {{ .Release.Name }}
|
app.kubernetes.io/name: lidarr2-nfs-storage
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
app.kubernetes.io/component: storage
|
app.kubernetes.io/component: storage
|
||||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
spec:
|
spec:
|
||||||
volumeName: "{{ .Release.Name }}-nfs-storage"
|
volumeName: lidarr2-nfs-storage
|
||||||
storageClassName: nfs-client
|
storageClassName: nfs-client
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolume
|
kind: PersistentVolume
|
||||||
metadata:
|
metadata:
|
||||||
name: "{{ .Release.Name }}-nfs-storage"
|
name: lidarr2-nfs-storage
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: {{ .Release.Name }}
|
app.kubernetes.io/name: lidarr2-nfs-storage
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
app.kubernetes.io/component: storage
|
app.kubernetes.io/component: storage
|
||||||
@@ -17,8 +17,8 @@ spec:
|
|||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
nfs:
|
nfs:
|
||||||
path: {{ .Values.persistence.media.nfsPath }}
|
path: /volume2/Storage
|
||||||
server: {{ .Values.persistence.media.nfsServer }}
|
server: synologybond.alexlebens.net
|
||||||
mountOptions:
|
mountOptions:
|
||||||
- vers=4
|
- vers=4
|
||||||
- minorversion=1
|
- minorversion=1
|
||||||
|
@@ -0,0 +1,34 @@
|
|||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: PrometheusRule
|
||||||
|
metadata:
|
||||||
|
name: lidarr2
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: lidarr2
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/component: metrics
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
groups:
|
||||||
|
- name: lidarr2
|
||||||
|
rules:
|
||||||
|
- alert: ExportarrAbsent
|
||||||
|
annotations:
|
||||||
|
description: Lidarr Exportarr has disappeared from Prometheus
|
||||||
|
service discovery.
|
||||||
|
summary: Exportarr is down.
|
||||||
|
expr: |
|
||||||
|
absent(up{job=~".*lidarr2.*"} == 1)
|
||||||
|
for: 5m
|
||||||
|
labels:
|
||||||
|
severity: critical
|
||||||
|
- alert: LidarrDown
|
||||||
|
annotations:
|
||||||
|
description: Lidarr service is down.
|
||||||
|
summary: Lidarr is down.
|
||||||
|
expr: |
|
||||||
|
lidarr_system_status{job=~".*lidarr2.*"} == 0
|
||||||
|
for: 5m
|
||||||
|
labels:
|
||||||
|
severity: critical
|
@@ -0,0 +1,21 @@
|
|||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
name: lidarr2
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: lidarr2
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/component: metrics
|
||||||
|
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: lidarr2
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
endpoints:
|
||||||
|
- port: metrics
|
||||||
|
interval: 3m
|
||||||
|
scrapeTimeout: 1m
|
||||||
|
path: /metrics
|
@@ -1,35 +1,114 @@
|
|||||||
lidarr:
|
lidarr2:
|
||||||
image:
|
controllers:
|
||||||
repository: ghcr.io/onedr0p/lidarr
|
main:
|
||||||
tag: 2.3.3.4204
|
type: deployment
|
||||||
env:
|
replicas: 1
|
||||||
TZ: US/Central
|
strategy: Recreate
|
||||||
LIDARR__POSTGRES_MAIN_DB: lidarr-main
|
revisionHistoryLimit: 3
|
||||||
LIDARR__POSTGRES_LOG_DB: lidarr-log
|
pod:
|
||||||
LIDARR__POSTGRES_HOST:
|
securityContext:
|
||||||
valueFrom:
|
runAsUser: 568
|
||||||
secretKeyRef:
|
runAsGroup: 568
|
||||||
name: lidarr2-postgresql-16-cluster-app
|
fsGroup: 568
|
||||||
key: host
|
fsGroupChangePolicy: OnRootMismatch
|
||||||
LIDARR__POSTGRES_PORT:
|
supplementalGroups:
|
||||||
valueFrom:
|
- 44
|
||||||
secretKeyRef:
|
- 100
|
||||||
name: lidarr2-postgresql-16-cluster-app
|
- 109
|
||||||
key: port
|
- 65539
|
||||||
LIDARR__POSTGRES_USER:
|
containers:
|
||||||
valueFrom:
|
main:
|
||||||
secretKeyRef:
|
image:
|
||||||
name: lidarr2-postgresql-16-cluster-app
|
repository: ghcr.io/onedr0p/lidarr
|
||||||
key: user
|
tag: 2.3.3.4204
|
||||||
LIDARR__POSTGRES_PASSWORD:
|
pullPolicy: IfNotPresent
|
||||||
valueFrom:
|
env:
|
||||||
secretKeyRef:
|
- name: TZ
|
||||||
name: lidarr2-postgresql-16-cluster-app
|
value: US/Central
|
||||||
key: password
|
- name: LIDARR__POSTGRES_MAIN_DB
|
||||||
|
value: lidarr-main
|
||||||
|
- name: LIDARR__POSTGRES_LOG_DB
|
||||||
|
value: lidarr-log
|
||||||
|
- name: LIDARR__POSTGRES_HOST
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: kyoo-postgresql-16-cluster-app
|
||||||
|
key: username
|
||||||
|
- name: LIDARR__POSTGRES_PORT
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: kyoo-postgresql-16-cluster-app
|
||||||
|
key: password
|
||||||
|
- name: LIDARR__POSTGRES_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: kyoo-postgresql-16-cluster-app
|
||||||
|
key: dbname
|
||||||
|
- name: LIDARR__POSTGRES_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: kyoo-postgresql-16-cluster-app
|
||||||
|
key: host
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
enabled: true
|
||||||
|
custom: true
|
||||||
|
spec:
|
||||||
|
exec:
|
||||||
|
command:
|
||||||
|
- /usr/bin/env
|
||||||
|
- bash
|
||||||
|
- -c
|
||||||
|
- curl --fail localhost:8686/api/v1/system/status?apiKey=`IFS=\> && while
|
||||||
|
read -d \< E C; do if [[ $E = "ApiKey" ]]; then echo $C; fi; done < /config/config.xml`
|
||||||
|
failureThreshold: 5
|
||||||
|
initialDelaySeconds: 60
|
||||||
|
periodSeconds: 10
|
||||||
|
successThreshold: 1
|
||||||
|
timeoutSeconds: 10
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 256Mi
|
||||||
|
metrics:
|
||||||
|
image:
|
||||||
|
repository: ghcr.io/onedr0p/exportarr
|
||||||
|
tag: v2.0.1
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
args: ["lidarr"]
|
||||||
|
env:
|
||||||
|
- name: URL
|
||||||
|
value: http://localhost
|
||||||
|
- name: CONFIG
|
||||||
|
value: /config/config.xml
|
||||||
|
- name: PORT
|
||||||
|
value: 9792
|
||||||
|
- name: ENABLE_ADDITIONAL_METRICS
|
||||||
|
value: false
|
||||||
|
- name: ENABLE_UNKNOWN_QUEUE_ITEMS
|
||||||
|
value: false
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 256Mi
|
||||||
|
serviceAccount:
|
||||||
|
create: true
|
||||||
|
service:
|
||||||
|
main:
|
||||||
|
controller: main
|
||||||
|
ports:
|
||||||
|
http:
|
||||||
|
port: 80
|
||||||
|
targetPort: 8686
|
||||||
|
protocol: HTTP
|
||||||
|
metrics:
|
||||||
|
port: 9792
|
||||||
|
targetPort: 9792
|
||||||
|
protocol: TCP
|
||||||
ingress:
|
ingress:
|
||||||
main:
|
main:
|
||||||
enabled: true
|
enabled: true
|
||||||
ingressClassName: traefik
|
className: traefik
|
||||||
annotations:
|
annotations:
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
@@ -39,53 +118,35 @@ lidarr:
|
|||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
|
service:
|
||||||
|
name: lidarr2
|
||||||
|
port: 80
|
||||||
tls:
|
tls:
|
||||||
- secretName: lidarr2-secret-tls
|
- secretName: lidarr2-secret-tls
|
||||||
hosts:
|
hosts:
|
||||||
- lidarr.alexlebens.net
|
- lidarr.alexlebens.net
|
||||||
persistence:
|
persistence:
|
||||||
config:
|
config:
|
||||||
enabled: true
|
storageClass: ceph-block
|
||||||
mountPath: /config
|
|
||||||
accessMode: ReadWriteOnce
|
accessMode: ReadWriteOnce
|
||||||
size: 5Gi
|
size: 5Gi
|
||||||
|
retain: true
|
||||||
|
advancedMounts:
|
||||||
|
main:
|
||||||
|
main:
|
||||||
|
- path: /config
|
||||||
|
readOnly: false
|
||||||
|
main:
|
||||||
|
metrics:
|
||||||
|
- path: /config
|
||||||
|
readOnly: true
|
||||||
media:
|
media:
|
||||||
enabled: true
|
|
||||||
mountPath: /mnt/store
|
|
||||||
type: pvc
|
|
||||||
existingClaim: lidarr2-nfs-storage
|
existingClaim: lidarr2-nfs-storage
|
||||||
podSecurityContext:
|
advancedMounts:
|
||||||
runAsUser: 1000
|
main:
|
||||||
runAsGroup: 1000
|
main:
|
||||||
fsGroup: 2000
|
- path: /mnt/store
|
||||||
fsGroupChangePolicy: "OnRootMismatch"
|
readOnly: false
|
||||||
supplementalGroups:
|
|
||||||
- 44
|
|
||||||
- 100
|
|
||||||
- 109
|
|
||||||
- 65539
|
|
||||||
metrics:
|
|
||||||
enabled: true
|
|
||||||
prometheusRule:
|
|
||||||
enabled: true
|
|
||||||
rules:
|
|
||||||
- alert: LidarrDown
|
|
||||||
annotations:
|
|
||||||
description: Lidarr service is down.
|
|
||||||
summary: Lidarr is down.
|
|
||||||
expr: |
|
|
||||||
lidarr_system_status == 0
|
|
||||||
for: 5m
|
|
||||||
labels:
|
|
||||||
severity: critical
|
|
||||||
exporter:
|
|
||||||
image:
|
|
||||||
repository: ghcr.io/onedr0p/exportarr
|
|
||||||
tag: v2.0.1
|
|
||||||
persistence:
|
|
||||||
media:
|
|
||||||
nfsPath: /volume2/Storage
|
|
||||||
nfsServer: synologybond.alexlebens.net
|
|
||||||
postgres-16-cluster:
|
postgres-16-cluster:
|
||||||
mode: standalone
|
mode: standalone
|
||||||
cluster:
|
cluster:
|
||||||
|
Reference in New Issue
Block a user