From b5c5316a2a1022b807ad4553b10ea2353c3e4280 Mon Sep 17 00:00:00 2001 From: Matt Reeves Date: Thu, 4 Jul 2024 17:28:11 -0400 Subject: [PATCH] fixing everything --- apps/production/radarr/service.yaml | 13 ----- apps/production/sab/service.yaml | 13 ----- .../apps/production/radarr/radarr.yaml | 51 +++++++++++++----- .../apps/production/sab/sabnzbd.yaml | 53 ++++++++++++++----- .../flux-system}/gotk-components.yaml | 0 .../flux-system}/gotk-sync.yaml | 0 .../flux-system}/kustomization.yaml | 0 storage/volumes/nas-pv.yaml | 2 +- 8 files changed, 81 insertions(+), 51 deletions(-) delete mode 100644 apps/production/radarr/service.yaml delete mode 100644 apps/production/sab/service.yaml rename apps/production/radarr/deployment.yaml => cluster/apps/production/radarr/radarr.yaml (53%) rename apps/production/sab/deployment.yaml => cluster/apps/production/sab/sabnzbd.yaml (51%) rename {flux-system => cluster/flux-system}/gotk-components.yaml (100%) rename {flux-system => cluster/flux-system}/gotk-sync.yaml (100%) rename {flux-system => cluster/flux-system}/kustomization.yaml (100%) diff --git a/apps/production/radarr/service.yaml b/apps/production/radarr/service.yaml deleted file mode 100644 index 8f4f14e..0000000 --- a/apps/production/radarr/service.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: headless-radarr - namespace: default -spec: - selector: - app: radarr - type: LoadBalancer - ports: - - port: 7878 - targetPort: 7878 - protocol: TCP diff --git a/apps/production/sab/service.yaml b/apps/production/sab/service.yaml deleted file mode 100644 index bec4e7c..0000000 --- a/apps/production/sab/service.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: headless-sabnzbd - namespace: default -spec: - selector: - app: sabnzbd - type: LoadBalancer - ports: - - port: 8080 - targetPort: 8080 - protocol: TCP diff --git a/apps/production/radarr/deployment.yaml b/cluster/apps/production/radarr/radarr.yaml similarity index 53% rename from apps/production/radarr/deployment.yaml rename to cluster/apps/production/radarr/radarr.yaml index 5ea4311..9781e25 100644 --- a/apps/production/radarr/deployment.yaml +++ b/cluster/apps/production/radarr/radarr.yaml @@ -1,12 +1,11 @@ apiVersion: apps/v1 -kind: StatefulSet +kind: Deployment metadata: name: radarr namespace: default labels: app: radarr spec: - serviceName: headless-radarr replicas: 1 selector: matchLabels: @@ -27,9 +26,16 @@ spec: value: "1000" - name: TZ value: America/New_York + resources: + requests: + memory: "512Mi" + cpu: "1" + limits: + memory: "4Gi" + cpu: "4" volumeMounts: - mountPath: /config - name: config + name: radarr-config - mountPath: /data name: nas volumes: @@ -37,12 +43,33 @@ spec: nfs: path: /mnt/thePool/thePoolShare server: 10.0.0.10 - volumeClaimTemplates: - - metadata: - name: config - spec: - accessModes: ["ReadWriteOnce"] - resources: - requests: - storage: 5Gi - storageClassName: longhorn + - name: radarr-config + persistentVolumeClaim: + claimName: radarr-config +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: radarr-config + namespace: default +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 5Gi + storageClassName: longhorn +--- +apiVersion: v1 +kind: Service +metadata: + name: headless-radarr + namespace: default +spec: + selector: + app: radarr + type: LoadBalancer + ports: + - port: 7878 + targetPort: 7878 + protocol: TCP diff --git a/apps/production/sab/deployment.yaml b/cluster/apps/production/sab/sabnzbd.yaml similarity index 51% rename from apps/production/sab/deployment.yaml rename to cluster/apps/production/sab/sabnzbd.yaml index f7fdc6f..871d5e6 100644 --- a/apps/production/sab/deployment.yaml +++ b/cluster/apps/production/sab/sabnzbd.yaml @@ -1,12 +1,11 @@ apiVersion: apps/v1 -kind: StatefulSet +kind: Deployment metadata: name: sabnzbd namespace: default labels: app: sabnzbd spec: - serviceName: headless-sabnzbd replicas: 1 selector: matchLabels: @@ -27,9 +26,16 @@ spec: value: "1000" - name: TZ value: America/New_York + resources: + requests: + memory: "512Mi" + cpu: "1" + limits: + memory: "4Gi" + cpu: "4" volumeMounts: - mountPath: /config - name: config + name: sabnzbd-config - mountPath: /data name: nas volumes: @@ -37,12 +43,35 @@ spec: nfs: path: /mnt/thePool/thePoolShare server: 10.0.0.10 - volumeClaimTemplates: - - metadata: - name: config - spec: - accessModes: ["ReadWriteOnce"] - resources: - requests: - storage: 2Gi - storageClassName: longhorn + - name: sabnzbd-config + persistentVolumeClaim: + claimName: sabnzbd-config + nodeSelector: + kubernetes.io/hostname: k3s-master3 +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: sabnzbd-config + namespace: default +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 2Gi + storageClassName: longhorn +--- +apiVersion: v1 +kind: Service +metadata: + name: headless-sabnzbd + namespace: default +spec: + selector: + app: sabnzbd + type: LoadBalancer + ports: + - port: 8080 + targetPort: 8080 + protocol: TCP diff --git a/flux-system/gotk-components.yaml b/cluster/flux-system/gotk-components.yaml similarity index 100% rename from flux-system/gotk-components.yaml rename to cluster/flux-system/gotk-components.yaml diff --git a/flux-system/gotk-sync.yaml b/cluster/flux-system/gotk-sync.yaml similarity index 100% rename from flux-system/gotk-sync.yaml rename to cluster/flux-system/gotk-sync.yaml diff --git a/flux-system/kustomization.yaml b/cluster/flux-system/kustomization.yaml similarity index 100% rename from flux-system/kustomization.yaml rename to cluster/flux-system/kustomization.yaml diff --git a/storage/volumes/nas-pv.yaml b/storage/volumes/nas-pv.yaml index 9b2d196..9de2668 100644 --- a/storage/volumes/nas-pv.yaml +++ b/storage/volumes/nas-pv.yaml @@ -9,5 +9,5 @@ spec: - ReadWriteMany nfs: path: /mnt/thePool/thePoolShare - server: ${NAS_SERVER} + server: 10.0.0.10 persistentVolumeReclaimPolicy: Retain