convert to app template
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
apiVersion: v2
|
||||
name: lidarr
|
||||
name: lidarr2
|
||||
version: 1.0.0
|
||||
description: Lidarr
|
||||
keywords:
|
||||
@@ -13,14 +13,15 @@ sources:
|
||||
- https://github.com/cloudnative-pg/cloudnative-pg
|
||||
- https://github.com/onedr0p/containers/pkgs/container/lidarr
|
||||
- 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
|
||||
maintainers:
|
||||
- name: alexlebens
|
||||
- name: alexlebens
|
||||
dependencies:
|
||||
- name: lidarr
|
||||
version: 15.1.1
|
||||
repository: https://k8s-home-lab.github.io/helm-charts/
|
||||
- name: app-template
|
||||
alias: lidarr2
|
||||
repository: https://bjw-s.github.io/helm-charts/
|
||||
version: 3.2.1
|
||||
- name: postgres-cluster
|
||||
alias: postgres-16-cluster
|
||||
version: 3.5.0
|
||||
|
@@ -1,16 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-nfs-storage"
|
||||
name: lidarr2-nfs-storage
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ .Release.Name }}
|
||||
app.kubernetes.io/name: lidarr2-nfs-storage
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||
app.kubernetes.io/component: storage
|
||||
app.kubernetes.io/part-of: {{ .Release.Name }}
|
||||
spec:
|
||||
volumeName: "{{ .Release.Name }}-nfs-storage"
|
||||
volumeName: lidarr2-nfs-storage
|
||||
storageClassName: nfs-client
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
|
@@ -1,10 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: "{{ .Release.Name }}-nfs-storage"
|
||||
name: lidarr2-nfs-storage
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ .Release.Name }}
|
||||
app.kubernetes.io/name: lidarr2-nfs-storage
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion }}
|
||||
app.kubernetes.io/component: storage
|
||||
@@ -17,8 +17,8 @@ spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
nfs:
|
||||
path: {{ .Values.persistence.media.nfsPath }}
|
||||
server: {{ .Values.persistence.media.nfsServer }}
|
||||
path: /volume2/Storage
|
||||
server: synologybond.alexlebens.net
|
||||
mountOptions:
|
||||
- vers=4
|
||||
- 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:
|
||||
image:
|
||||
repository: ghcr.io/onedr0p/lidarr
|
||||
tag: 2.3.3.4204
|
||||
env:
|
||||
TZ: US/Central
|
||||
LIDARR__POSTGRES_MAIN_DB: lidarr-main
|
||||
LIDARR__POSTGRES_LOG_DB: lidarr-log
|
||||
LIDARR__POSTGRES_HOST:
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: lidarr2-postgresql-16-cluster-app
|
||||
key: host
|
||||
LIDARR__POSTGRES_PORT:
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: lidarr2-postgresql-16-cluster-app
|
||||
key: port
|
||||
LIDARR__POSTGRES_USER:
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: lidarr2-postgresql-16-cluster-app
|
||||
key: user
|
||||
LIDARR__POSTGRES_PASSWORD:
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: lidarr2-postgresql-16-cluster-app
|
||||
key: password
|
||||
lidarr2:
|
||||
controllers:
|
||||
main:
|
||||
type: deployment
|
||||
replicas: 1
|
||||
strategy: Recreate
|
||||
revisionHistoryLimit: 3
|
||||
pod:
|
||||
securityContext:
|
||||
runAsUser: 568
|
||||
runAsGroup: 568
|
||||
fsGroup: 568
|
||||
fsGroupChangePolicy: OnRootMismatch
|
||||
supplementalGroups:
|
||||
- 44
|
||||
- 100
|
||||
- 109
|
||||
- 65539
|
||||
containers:
|
||||
main:
|
||||
image:
|
||||
repository: ghcr.io/onedr0p/lidarr
|
||||
tag: 2.3.3.4204
|
||||
pullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: TZ
|
||||
value: US/Central
|
||||
- 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:
|
||||
main:
|
||||
enabled: true
|
||||
ingressClassName: traefik
|
||||
className: traefik
|
||||
annotations:
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||
@@ -39,53 +118,35 @@ lidarr:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
service:
|
||||
name: lidarr2
|
||||
port: 80
|
||||
tls:
|
||||
- secretName: lidarr2-secret-tls
|
||||
hosts:
|
||||
- lidarr.alexlebens.net
|
||||
persistence:
|
||||
config:
|
||||
enabled: true
|
||||
mountPath: /config
|
||||
storageClass: ceph-block
|
||||
accessMode: ReadWriteOnce
|
||||
size: 5Gi
|
||||
retain: true
|
||||
advancedMounts:
|
||||
main:
|
||||
main:
|
||||
- path: /config
|
||||
readOnly: false
|
||||
main:
|
||||
metrics:
|
||||
- path: /config
|
||||
readOnly: true
|
||||
media:
|
||||
enabled: true
|
||||
mountPath: /mnt/store
|
||||
type: pvc
|
||||
existingClaim: lidarr2-nfs-storage
|
||||
podSecurityContext:
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
fsGroup: 2000
|
||||
fsGroupChangePolicy: "OnRootMismatch"
|
||||
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
|
||||
advancedMounts:
|
||||
main:
|
||||
main:
|
||||
- path: /mnt/store
|
||||
readOnly: false
|
||||
postgres-16-cluster:
|
||||
mode: standalone
|
||||
cluster:
|
||||
|
Reference in New Issue
Block a user