Skip to content

Commit

Permalink
feat(media): deploy maintainerr
Browse files Browse the repository at this point in the history
  • Loading branch information
buroa committed Dec 16, 2023
1 parent f26aa6b commit 3426498
Show file tree
Hide file tree
Showing 5 changed files with 194 additions and 0 deletions.
1 change: 1 addition & 0 deletions kubernetes/apps/media/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ resources:
- ./autobrr/ks.yaml
- ./bazarr/ks.yaml
- ./flaresolverr/ks.yaml
- ./maintainerr/ks.yaml
- ./overseerr/ks.yaml
- ./plex/ks.yaml
- ./prowlarr/ks.yaml
Expand Down
81 changes: 81 additions & 0 deletions kubernetes/apps/media/maintainerr/app/helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: &app maintainerr
spec:
interval: 30m
chart:
spec:
chart: app-template
version: 2.4.0
sourceRef:
kind: HelmRepository
name: bjw-s-charts
namespace: flux-system
maxHistory: 2
install:
remediation:
retries: 3
upgrade:
cleanupOnFail: true
remediation:
retries: 3
uninstall:
keepHistory: false
values:
controllers:
main:
annotations:
reloader.stakater.com/auto: "true"
containers:
main:
image:
repository: docker.io/jorenn92/maintainerr
tag: 1.6.10
resources:
requests:
cpu: 5m
memory: 128M
limits:
memory: 512M
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
pod:
securityContext:
runAsUser: 568
runAsGroup: 568
runAsNonRoot: true
fsGroup: 568
fsGroupChangePolicy: OnRootMismatch
ingress:
main:
enabled: true
className: internal
annotations:
hajimari.io/icon: carbon:clean
hosts:
- host: &host "{{ .Release.Name }}.${PUBLIC_DOMAIN}"
paths:
- path: /
service:
name: main
port: http
tls:
- hosts:
- *host
persistence:
config:
enabled: true
existingClaim: *app
globalMounts:
- path: /opt/data
service:
main:
ports:
http:
port: 80
6 changes: 6 additions & 0 deletions kubernetes/apps/media/maintainerr/app/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./volsync.yaml
- ./helmrelease.yaml
85 changes: 85 additions & 0 deletions kubernetes/apps/media/maintainerr/app/volsync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: maintainerr-restic
spec:
secretStoreRef:
kind: ClusterSecretStore
name: onepassword-connect
target:
name: maintainerr-restic-secret
creationPolicy: Owner
template:
engineVersion: v2
data:
RESTIC_REPOSITORY: "{{ .REPOSITORY_TEMPLATE }}/maintainerr"
RESTIC_PASSWORD: "{{ .RESTIC_PASSWORD }}"
AWS_ACCESS_KEY_ID: "{{ .AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "{{ .AWS_SECRET_ACCESS_KEY }}"
dataFrom:
- extract:
key: volsync-restic-template
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: maintainerr
spec:
accessModes: ["ReadWriteOnce"]
dataSourceRef:
kind: ReplicationDestination
apiGroup: volsync.backube
name: maintainerr-rdst
resources:
requests:
storage: 2Gi
storageClassName: ${CLUSTER_STORAGE_BLOCK}
---
apiVersion: volsync.backube/v1alpha1
kind: ReplicationDestination
metadata:
name: maintainerr-rdst
spec:
trigger:
manual: restore-once
restic:
repository: maintainerr-restic-secret
copyMethod: Snapshot
accessModes: ["ReadWriteOnce"]
storageClassName: ${CLUSTER_STORAGE_BLOCK}
volumeSnapshotClassName: ${CLUSTER_SNAPSHOT_BLOCK}
cacheAccessModes: ["ReadWriteOnce"]
cacheCapacity: 8Gi
cacheStorageClassName: ${CLUSTER_STORAGE_HOSTPATH}
moverSecurityContext:
runAsUser: 568
runAsGroup: 568
fsGroup: 568
capacity: 2Gi # must match the PersistentVolumeClaim `.resources.requests.storage` size above
---
apiVersion: volsync.backube/v1alpha1
kind: ReplicationSource
metadata:
name: maintainerr-rsrc
spec:
sourcePVC: maintainerr
trigger:
schedule: "15 */8 * * *"
restic:
pruneIntervalDays: 10
repository: maintainerr-restic-secret
copyMethod: Snapshot
accessModes: ["ReadWriteOnce"]
storageClassName: ${CLUSTER_STORAGE_BLOCK}
volumeSnapshotClassName: ${CLUSTER_SNAPSHOT_BLOCK}
cacheAccessModes: ["ReadWriteOnce"]
cacheCapacity: 8Gi
cacheStorageClassName: ${CLUSTER_STORAGE_HOSTPATH}
moverSecurityContext:
runAsUser: 568
runAsGroup: 568
fsGroup: 568
retain:
daily: 10
within: 3d
21 changes: 21 additions & 0 deletions kubernetes/apps/media/maintainerr/ks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: cluster-apps-maintainerr
namespace: flux-system
spec:
targetNamespace: media
dependsOn:
- name: cluster-apps-volsync
- name: cluster-apps-rook-ceph-cluster
- name: cluster-apps-external-secrets-stores
path: ./kubernetes/apps/media/maintainerr/app
prune: true
sourceRef:
kind: GitRepository
name: k8s-gitops
wait: true
interval: 30m
retryInterval: 1m
timeout: 5m

0 comments on commit 3426498

Please sign in to comment.