Compare commits

..

10 Commits

22 changed files with 344 additions and 28 deletions

View File

@ -11,11 +11,11 @@ spec:
copyMethod: "${VOLSYNC_COPYMETHOD:-Snapshot}" copyMethod: "${VOLSYNC_COPYMETHOD:-Snapshot}"
pruneIntervalDays: 7 pruneIntervalDays: 7
repository: "${APP}-volsync-b2-secret" repository: "${APP}-volsync-b2-secret"
volumeSnapshotClassName: "${VOLSYNC_SNAPSHOTCLASS:-longhorn}" volumeSnapshotClassName: "${VOLSYNC_SNAPSHOTCLASS:-zfs-mainpool}"
cacheCapacity: "${VOLSYNC_CACHE_CAPACITY:-4Gi}" cacheCapacity: "${VOLSYNC_CACHE_CAPACITY:-4Gi}"
cacheStorageClassName: "${VOLSYNC_CACHE_SNAPSHOTCLASS:-mainpool-hostpath}" cacheStorageClassName: "${VOLSYNC_CACHE_SNAPSHOTCLASS:-mainpool-hostpath}"
cacheAccessModes: ["${VOLSYNC_CACHE_ACCESSMODES:-ReadWriteOnce}"] cacheAccessModes: ["${VOLSYNC_CACHE_ACCESSMODES:-ReadWriteOnce}"]
storageClassName: "${VOLSYNC_STORAGECLASS:-longhorn}" storageClassName: "${VOLSYNC_STORAGECLASS:-openebs-zfs-mainpool}"
accessModes: ["${VOLSYNC_ACCESSMODES:-ReadWriteOnce}"] accessModes: ["${VOLSYNC_ACCESSMODES:-ReadWriteOnce}"]
moverSecurityContext: moverSecurityContext:
runAsUser: 10000 runAsUser: 10000

View File

@ -12,11 +12,11 @@ spec:
copyMethod: "${VOLSYNC_COPYMETHOD:-Snapshot}" copyMethod: "${VOLSYNC_COPYMETHOD:-Snapshot}"
pruneIntervalDays: 7 pruneIntervalDays: 7
repository: "${APP}-volsync-secret" repository: "${APP}-volsync-secret"
volumeSnapshotClassName: "${VOLSYNC_SNAPSHOTCLASS:-longhorn}" volumeSnapshotClassName: "${VOLSYNC_SNAPSHOTCLASS:-zfs-mainpool}"
cacheCapacity: "${VOLSYNC_CACHE_CAPACITY:-4Gi}" cacheCapacity: "${VOLSYNC_CACHE_CAPACITY:-4Gi}"
cacheStorageClassName: "${VOLSYNC_CACHE_SNAPSHOTCLASS:-mainpool-hostpath}" cacheStorageClassName: "${VOLSYNC_CACHE_SNAPSHOTCLASS:-mainpool-hostpath}"
cacheAccessModes: ["${VOLSYNC_CACHE_ACCESSMODES:-ReadWriteOnce}"] cacheAccessModes: ["${VOLSYNC_CACHE_ACCESSMODES:-ReadWriteOnce}"]
storageClassName: "${VOLSYNC_STORAGECLASS:-longhorn}" storageClassName: "${VOLSYNC_STORAGECLASS:-openebs-zfs-mainpool}"
accessModes: ["${VOLSYNC_ACCESSMODES:-ReadWriteOnce}"] accessModes: ["${VOLSYNC_ACCESSMODES:-ReadWriteOnce}"]
moverSecurityContext: moverSecurityContext:
runAsUser: 10000 runAsUser: 10000
@ -38,14 +38,14 @@ spec:
restic: restic:
repository: "${APP}-volsync-secret" repository: "${APP}-volsync-secret"
copyMethod: Snapshot # must be Snapshot copyMethod: Snapshot # must be Snapshot
volumeSnapshotClassName: "${VOLSYNC_SNAPSHOTCLASS:-longhorn}" volumeSnapshotClassName: "${VOLSYNC_SNAPSHOTCLASS:-zfs-mainpool}"
cacheStorageClassName: "${VOLSYNC_CACHE_SNAPSHOTCLASS:-mainpool-hostpath}" cacheStorageClassName: "${VOLSYNC_CACHE_SNAPSHOTCLASS:-mainpool-hostpath}"
cacheAccessModes: ["${VOLSYNC_CACHE_ACCESSMODES:-ReadWriteOnce}"] cacheAccessModes: ["${VOLSYNC_CACHE_ACCESSMODES:-ReadWriteOnce}"]
cacheCapacity: "${VOLSYNC_CACHE_CAPACITY:-8Gi}" cacheCapacity: "${VOLSYNC_CACHE_CAPACITY:-8Gi}"
storageClassName: "${VOLSYNC_STORAGECLASS:-longhorn}" storageClassName: "${VOLSYNC_STORAGECLASS:-openebs-zfs-mainpool}"
accessModes: ["${VOLSYNC_ACCESSMODES:-ReadWriteOnce}"] accessModes: ["${VOLSYNC_ACCESSMODES:-ReadWriteOnce}"]
capacity: "${VOLSYNC_CAPACITY}" capacity: "${VOLSYNC_CAPACITY}"
# moverSecurityContext: # moverSecurityContext:
# runAsUser: 10000 # runAsUser: 10000
# runAsGroup: 10000 # runAsGroup: 10000
# fsGroup: 10000 # fsGroup: 10000

View File

@ -11,4 +11,4 @@ spec:
resources: resources:
requests: requests:
storage: "${VOLSYNC_CAPACITY}" storage: "${VOLSYNC_CAPACITY}"
storageClassName: "${VOLSYNC_STORAGECLASS:-longhorn}" storageClassName: "${VOLSYNC_STORAGECLASS:-openebs-zfs-mainpool}"

View File

@ -2,5 +2,5 @@ apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
name: download name: download
labels: annotations:
name: download volsync.backube/privileged-movers: "true"

View File

@ -31,25 +31,51 @@ spec:
image: image:
repository: ghcr.io/onedr0p/radarr-develop repository: ghcr.io/onedr0p/radarr-develop
tag: 5.12.2.9335 tag: 5.12.2.9335
envFrom:
- secretRef:
name: radarr-secret
env: env:
TZ: America/New_York TZ: America/New_York
RADARR__APP__INSTANCENAME: Radarr
RADARR__APP__THEME: dark
RADARR__AUTH__METHOD: External
RADARR__AUTH__REQUIRED: DisabledForLocalAddresses
RADARR__LOG__DBENABLED: "False"
RADARR__LOG__LEVEL: info
RADARR__SERVER__PORT: &port 7878
RADARR__UPDATE__BRANCH: develop
RADARR__POSTGRES__HOST: postgresql.database.svc
RADARR__POSTGRES__PORT: "5432"
RADARR__POSTGRES__MAINDB: radarr_main
probes:
liveness: &probes
enabled: true
custom: true
spec:
httpGet:
path: /ping
port: *port
initialDelaySeconds: 0
periodSeconds: 10
timeoutSeconds: 1
failureThreshold: 3
readiness: *probes
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities: { drop: ["ALL"] }
resources: resources:
requests: requests:
cpu: 1m memory: 100Mi
memory: 350Mi
limits: limits:
memory: 1500Mi memory: 4gi
exportarr: exportarr:
image: image:
repository: ghcr.io/onedr0p/exportarr repository: ghcr.io/onedr0p/exportarr
tag: v2.0.1 tag: v2.0.1
args: args:
- radarr - radarr
env: env:
- name: URL - name: URL
value: "http://localhost" value: "http://localhost"
@ -83,7 +109,7 @@ spec:
ports: ports:
http: http:
port: 7878 port: *port
metrics: metrics:
port: 9000 port: 9000
protocol: HTTP protocol: HTTP

View File

@ -1,8 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- ./backup-creds.sops.yaml #- ./backup-creds.sops.yaml
- ./minio-creds.sops.yaml #- ./minio-creds.sops.yaml
#- ../../../../../common/templates/volsync
- ./pvc.yaml
- ./secret.sops.yaml
- ./helm-release.yaml - ./helm-release.yaml
- ./radarr-exportarr-metrics.yaml - ./radarr-exportarr-metrics.yaml
- ../../../../../common/templates/volsync

View File

@ -0,0 +1,10 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: radarr
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 15Gi
storageClassName: openebs-zfs-mainpool

View File

@ -0,0 +1,73 @@
apiVersion: v1
kind: Secret
metadata:
name: radarr-secret
namespace: download
stringData:
RADARR__AUTH__APIKEY: ENC[AES256_GCM,data:n6NygOta67GMqWV6+Q3EjU3JyhY84xNf546FfpOMi4k=,iv:IRGuOPzo0azEmznl0tKe+v9QhwogjjUsMUR9oGqncdU=,tag:O2WEgQxh6E3g7mRJ41Vbwg==,type:str]
RADARR__POSTGRES__USER: ENC[AES256_GCM,data:nAaR02DM,iv:xh8ahgckhgFZDu7snxQFM19x8qC5s7smn1hSjY+zxLw=,tag:0ziWTKZq5tjMrdhoFQY6jw==,type:str]
RADARR__POSTGRES__PASSWORD: ENC[AES256_GCM,data:6fXWGDYTjoSkJ7jccI3/5hCC6jsKPwh/CgM7hBlUu9g=,iv:vOX435yfn0V4ZPR6OOQgsnQlQZI+TPTjsuiAvgcpAMA=,tag:z5Ctt5dd/rq9alCiUDLcTA==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age: []
lastmodified: "2024-10-15T01:16:00Z"
mac: ENC[AES256_GCM,data:t19Lz6df6hohcynjqib03Qj+uqpIC4eLSAJTLTqFEXBtRInsADbEsypvnyUU0Q4A2z6dUKZpP/SEncxAP/8WimaQvpfVPFsWeVUWHvK8ISz5bBxjscgwMI1/TRfA5/BfCMLmfyNDlOYAzshAzJ97aeXLDJKZvrnbMWNgvvMw6W4=,iv:DWRaA3APzKv9cOC0afeBfw2fzhLPraKKvMSNZa8yVQs=,tag:zrOAk8ZZP+8ThVc66RDJlQ==,type:str]
pgp:
- created_at: "2024-10-15T01:16:00Z"
enc: |-
-----BEGIN PGP MESSAGE-----
hQIMAwAAAAAAAAAAAQ//UeSC+2Dk6gQlSW6v0mKf/vfety3Qd0ptrvhL8HmPm8nj
a3UDvfvDXfjClJeIVBaV838XYB6U8+tMukQrm5gQxxfP/cxTNCkpCBT4o9hjOvM6
5enrWpBgcbD7HqSav8FllR/9kfDZpRV4YccnYD4LT9ExiQd6VGKzSoyojyzQU8ec
lzec0cg00BF9be/t7lVZ6/0lbfQaRaqurphkA6cFx0+/i3figs2eSv1vmIK+UQe1
4HRXI9AZw/rm+PmFszMipTjwceX2Me0G100eLVWGsP5McSgM1ISJWSC+MM6EmpYO
juKcW3Spy5hC7JM3FBNNwAxh4w6d3RdKHYrBvjwZzLDEKChLEZhxKSFKJ+w7QcSN
67KpcNNAVTD1Rnf1si3MPEayZWCjvKy56suT5Juhjltcq78kiw690zCVdHlVfAcv
v55wpQF5Lq2O8ZWS4dyhx+7ZFKyUW/LCcvYxZLGxutfMqX2gNPtE3427T1Zm5Fnx
QOsE92bkeiSkH0uHzhrTPW/9SW9IW5wk/5+sGBRyu8bnO1hWdOaRMe4EWa/Q004t
p75kwiaKgjXS8ZsdbkclXBTKRzwGkA/qCWGd7Uj/kxV1fcFJB8B3Sub5DeRypvB9
+Z6DisUumBaKRLVCFLk5mf/X/PqHxlswqA86R4bGT3124RywBpFLBsiaYbBPDmaF
AgwDAAAAAAAAAAABEADSiLYQigE9hRrSjD97hp10foCPT6n72arrsmXTSRHCLPoW
A7v9sSXMeqbvOL8+sgY761RDfmOtYCGLsP6z2UP6mIanalc18chVT8k+frdrcogF
3WDBhtyV63Rru9G0HuPqhtq8Q7m6ELC+qo9/MrEQhVxdYuyi7+2jZmOpLKBoNSaw
pdC41VE2cx4LEXI5scViXNPSl1zcPgTuIWvr4/ApewDBYvNFElZqGrWPFyJ+2UC2
05QlgOJS9akGYmkB44IWXfRQoELzj9UE0jdBpi8SnK7bMMlQOEG1p1SLqyYZ1cln
gktnms5jzhTk/XDqpfjzXy7xsJm5G1VBZHTBHub5lzpXJGD2vYfX/AYICEmMfljV
WpgmjZGQflPZPdWBm5JEhEvXtimHss9XRKJPfphVFHARWcxjKAtfScXbG5CWFAhA
pZzz8nfCTJqMEF5XfB4vOqR6PGI3eIG2NXS/tjptKVczJHUF7C4rh7gthNOcoZOd
tTbZPLj73hSWRw22ADJNkNu9xiyU41iA92B7xWk6E4TUGSpgj6pWd1ss+TB3ZsjI
fE1q2cyq5yfq2jRnEBbVFypkkVhXpMgICsQv+wJZ+nYNrbYs/wNx5VWOA0xkYPWx
Doa2R17tdBX2YYhK7mUaHq74voy2ejnJFTTLP517dTF+8PPaq9v+LHRMbOsFntRo
AQkCEBQ7y3f8blmvfqZZr0fR0R83qz1B74oIyOGIeLYtGzqVpNxIQWrL1PBz60qV
0n4qynu+C2l+8i+iUBDsp38jl49wIlB5z210f3wmL2SMzhpWL0DsN4GFIRw6OsVd
YR+05RNcPRg=
=Vl2t
-----END PGP MESSAGE-----
fp: BD1AAF9D8170F4BEE437365FF6F0933799CFEBCD
- created_at: "2024-10-15T01:16:00Z"
enc: |-
-----BEGIN PGP MESSAGE-----
hQIMAwAAAAAAAAAAAQ/+IoF55lQey7yi64PUfhMWc3Be+1EBNGzhHR5RfZMAI3w4
rqQdZyGp3SY1tB3q1qHk2TCySL70FZLcT0mdPHHU8bt8kn9M3HWEAHo0TJuoH7K3
qlwWnPh0OQuF+AUkmsAzCUDcBpW9CNHifPJjHWgSlhsH+r4DrYdIzGi2vaTDhXU8
GMHlEuZ2wrgra78avw9G/v+7I/cnnkzMnFc3zR6F+FbSv9S/w4Z4YCEv4AhLRUox
T03kG8r/Gv5UTFZ08TnRGXNzICykBfIHXg5xsXB+ePgh/djD3fLDlByEc8BhE2T/
8MbkgNbj7i3V0E3+I53NJocCGkH/SwBOwKlvbstop5eQTN+nuBQC5nYnupO7n1cf
wY6gIqODXZjQRItNuygE7yNDkVsF3pcb0/uRNFxc2rkUJQMT2OqusThuvVU1HLho
LHYPzx8bvWoPHwY1oFvB+VXU9K5J00jzkAjONRTMqIMYceoqncInoiArjDi+Bby3
HGjTblEik+2cuKc9JF6cuwfrSKhrNgoqm7nhNS0beF4Uf+0xvpo1urfAAYycIjWy
SC/wPAzwsvU92l7LilfVn8seX+1jVIZnzkxxk2z0USuoRR5Fiiuf3O1zBMOKOU6E
/ExchxWvA/9USgvPjtc8JCrZUxIRrI03hIwILzLXOriA2T68ejp8613DnuZuJHLU
aAEJAhBLSQzeER6pJ3hCGsB6kMcivumgRoWt9qonf0KqPTb4gRO8KFL2pbV04x58
v4FJ3nqUelKEdM9C5oXdHBdiG48gm+EOxzSzey0xRJqsVHi7S7tCj39HR3h47r/k
hhBax1k3ZD0e
=doxn
-----END PGP MESSAGE-----
fp: 687802D4DFD8AA82EA55666CF7DADAC782D7663D
encrypted_regex: ^(data|stringData)$
version: 3.9.1

View File

@ -17,6 +17,9 @@ spec:
provider: sops provider: sops
secretRef: secretRef:
name: sops-gpg name: sops-gpg
dependsOn:
- name: openebs
- name: openebs-sc
postBuild: postBuild:
substituteFrom: substituteFrom:
- kind: ConfigMap - kind: ConfigMap

View File

@ -8,7 +8,7 @@ resources:
- ./traefik/ks.yaml - ./traefik/ks.yaml
# storage # storage
- ./longhorn - ./longhorn
- ./openebs - ./openebs/ks.yaml
- ./kube-replicator - ./kube-replicator

View File

@ -6,3 +6,4 @@ resources:
- ./helm-release.yaml - ./helm-release.yaml
- ./alerts.yaml - ./alerts.yaml
- ./service-monitor.yaml - ./service-monitor.yaml
- ./snapshot-class.yaml

View File

@ -0,0 +1,7 @@
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/snapshot.storage.k8s.io/volumesnapshotclass_v1.json
kind: VolumeSnapshotClass
apiVersion: snapshot.storage.k8s.io/v1
metadata:
name: longhorn
driver: driver.longhorn.io
deletionPolicy: Delete

View File

@ -0,0 +1,59 @@
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/helm.toolkit.fluxcd.io/helmrelease_v2.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: openebs
namespace: openebs-system
spec:
interval: 5m
chart:
spec:
chart: openebs
version: 4.1.0
sourceRef:
kind: HelmRepository
name: openebs
namespace: flux-system
values:
openebs-crds:
csi:
volumeSnapshots:
enabled: false
keep: false
zfs-localpv:
crds:
zfsLocalPv:
enabled: true
csi:
volumeSnapshots:
enabled: false
# Refer to https://github.com/openebs/dynamic-localpv-provisioner/blob/HEAD/deploy/helm/charts/values.yaml for complete set of values.
localpv-provisioner:
rbac:
create: true
# Refer to https://github.com/openebs/lvm-localpv/blob/lvm-localpv-1.6.2/deploy/helm/charts/values.yaml for complete set of values.
lvm-localpv:
crds:
lvmLocalPv:
enabled: false
csi:
volumeSnapshots:
enabled: false
# Refer to https://github.com/openebs/mayastor-extensions/blob/v2.7.0/chart/values.yaml for complete set of values.
mayastor:
enabled: false
engines:
local:
lvm:
enabled: false
zfs:
enabled: true
replicated:
mayastor:
enabled: false

View File

@ -0,0 +1,17 @@
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: openebs
namespace: flux-system
spec:
interval: 1m
url: https://openebs.github.io/openebs
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: openebs-monitoring
namespace: flux-system
spec:
interval: 1m
url: https://openebs.github.io/monitoring

View File

@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./namespace.yaml
- ./helm-repository.yaml
- ./helm-release.yaml
- ./monitoring-helm-release.yaml

View File

@ -0,0 +1,39 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: openebs-monitoring
namespace: openebs-system
spec:
interval: 5m
chart:
spec:
chart: openebs-monitoring
version: 0.4.13
sourceRef:
kind: HelmRepository
name: openebs-monitoring-charts
namespace: flux-system
values:
kube-prometheus-stack:
install: false
openebsMonitoringAddon:
# this is the only provisioner enabled
localPV:
enabled: true
cStore:
enabled: false
jiva:
enabled: false
ndm:
enabled: false
npd:
enabled: false
deviceLocalPV:
enabled: false
lvmLocalPV:
enabled: false
zfsLocalPV:
enabled: true

View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: openebs-system

View File

@ -0,0 +1,54 @@
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: openebs
namespace: flux-system
spec:
targetNamespace: openebs-system
timeout: 5m
interval: 10m
path: ./kubernetes/main/core/openebs/app
prune: true
sourceRef:
kind: GitRepository
name: home-cluster
decryption:
provider: sops
secretRef:
name: sops-gpg
postBuild:
substitute: {}
substituteFrom:
- kind: ConfigMap
name: cluster-settings
- kind: Secret
name: cluster-secrets
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: openebs-sc
namespace: flux-system
spec:
timeout: 5m
interval: 10m
path: ./kubernetes/main/core/openebs/storage-class
prune: true
sourceRef:
kind: GitRepository
name: home-cluster
decryption:
provider: sops
secretRef:
name: sops-gpg
dependsOn:
- name: openebs
postBuild:
substitute: {}
substituteFrom:
- kind: ConfigMap
name: cluster-settings
- kind: Secret
name: cluster-secrets

View File

@ -1,5 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- ../../../common/apps/openebs
- ./mainpool-sc.yaml - ./mainpool-sc.yaml
- ./zfs-mainpool-sc.yaml
- ./zfs-snapshot.yaml

View File

@ -0,0 +1,7 @@
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: openebs-zfs-mainpool
parameters:
poolname: "MainPool/openebs-zfs"
provisioner: zfs.csi.openebs.io

View File

@ -0,0 +1,6 @@
kind: VolumeSnapshotClass
apiVersion: snapshot.storage.k8s.io/v1
metadata:
name: zfs-mainpool
driver: zfs.csi.openebs.io
deletionPolicy: Delete