Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(media/radarr): migrate radarr #3413

Merged
merged 1 commit into from
Jun 22, 2024
Merged

feat(media/radarr): migrate radarr #3413

merged 1 commit into from
Jun 22, 2024

Conversation

blackjid
Copy link
Owner

No description provided.

@bot-x-mod
Copy link
Contributor

bot-x-mod bot commented Jun 22, 2024

--- HelmRelease: media/radarr Service: media/radarr

+++ HelmRelease: media/radarr Service: media/radarr

@@ -0,0 +1,22 @@

+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: radarr
+  labels:
+    app.kubernetes.io/instance: radarr
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: radarr
+    app.kubernetes.io/service: radarr
+spec:
+  type: ClusterIP
+  ports:
+  - port: 80
+    targetPort: 80
+    protocol: TCP
+    name: http
+  selector:
+    app.kubernetes.io/component: radarr
+    app.kubernetes.io/instance: radarr
+    app.kubernetes.io/name: radarr
+
--- HelmRelease: media/radarr Deployment: media/radarr

+++ HelmRelease: media/radarr Deployment: media/radarr

@@ -0,0 +1,129 @@

+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: radarr
+  labels:
+    app.kubernetes.io/component: radarr
+    app.kubernetes.io/instance: radarr
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: radarr
+  annotations:
+    reloader.stakater.com/auto: 'true'
+spec:
+  revisionHistoryLimit: 3
+  replicas: 1
+  strategy:
+    type: Recreate
+  selector:
+    matchLabels:
+      app.kubernetes.io/component: radarr
+      app.kubernetes.io/name: radarr
+      app.kubernetes.io/instance: radarr
+  template:
+    metadata:
+      labels:
+        app.kubernetes.io/component: radarr
+        app.kubernetes.io/instance: radarr
+        app.kubernetes.io/name: radarr
+    spec:
+      enableServiceLinks: false
+      serviceAccountName: default
+      automountServiceAccountToken: true
+      securityContext:
+        fsGroup: 568
+        fsGroupChangePolicy: OnRootMismatch
+        runAsGroup: 568
+        runAsNonRoot: true
+        runAsUser: 568
+        seccompProfile:
+          type: RuntimeDefault
+        supplementalGroups:
+        - 10000
+      hostIPC: false
+      hostNetwork: false
+      hostPID: false
+      dnsPolicy: ClusterFirst
+      initContainers:
+      - envFrom:
+        - secretRef:
+            name: radarr-secret
+        image: ghcr.io/onedr0p/postgres-init:16
+        name: init-db
+        volumeMounts:
+        - mountPath: /config
+          name: config
+        - mountPath: /media
+          name: media
+        - mountPath: /tmp
+          name: tmp
+      containers:
+      - env:
+        - name: RADARR__APP__INSTANCENAME
+          value: Radarr
+        - name: RADARR__APP__THEME
+          value: dark
+        - name: RADARR__AUTH__METHOD
+          value: External
+        - name: RADARR__AUTH__REQUIRED
+          value: DisabledForLocalAddresses
+        - name: RADARR__LOG__DBENABLED
+          value: 'False'
+        - name: RADARR__LOG__LEVEL
+          value: info
+        - name: RADARR__SERVER__PORT
+          value: '80'
+        - name: RADARR__UPDATE__BRANCH
+          value: develop
+        - name: TZ
+          value: America/New_York
+        envFrom:
+        - secretRef:
+            name: radarr-secret
+        image: ghcr.io/onedr0p/radarr-develop:5.7.0.8882@sha256:d6a11184848cc5309b9c0024cf33b40bb6a3613a5b15613bcc51864b23839015
+        livenessProbe:
+          failureThreshold: 3
+          httpGet:
+            path: /ping
+            port: 80
+          initialDelaySeconds: 0
+          periodSeconds: 10
+          timeoutSeconds: 1
+        name: app
+        readinessProbe:
+          failureThreshold: 3
+          httpGet:
+            path: /ping
+            port: 80
+          initialDelaySeconds: 0
+          periodSeconds: 10
+          timeoutSeconds: 1
+        resources:
+          limits:
+            memory: 1Gi
+          requests:
+            cpu: 10m
+        securityContext:
+          allowPrivilegeEscalation: false
+          capabilities:
+            drop:
+            - ALL
+          readOnlyRootFilesystem: true
+        volumeMounts:
+        - mountPath: /config
+          name: config
+        - mountPath: /media
+          name: media
+        - mountPath: /tmp
+          name: tmp
+      volumes:
+      - name: config
+        persistentVolumeClaim:
+          claimName: radarr
+      - name: media
+        nfs:
+          path: /volume1/media
+          server: 192.168.86.90
+      - emptyDir: {}
+        name: tmp
+
--- HelmRelease: media/radarr Ingress: media/radarr

+++ HelmRelease: media/radarr Ingress: media/radarr

@@ -0,0 +1,25 @@

+---
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  name: radarr
+  labels:
+    app.kubernetes.io/instance: radarr
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: radarr
+  annotations:
+    external-dns.alpha.kubernetes.io/target: internal.donoso.family
+spec:
+  ingressClassName: internal
+  rules:
+  - host: radarr.donoso.family
+    http:
+      paths:
+      - path: /
+        pathType: Prefix
+        backend:
+          service:
+            name: radarr
+            port:
+              number: 80
+

@bot-x-mod
Copy link
Contributor

bot-x-mod bot commented Jun 22, 2024

--- kubernetes/apps Kustomization: flux-system/cluster-apps Kustomization: flux-system/radarr

+++ kubernetes/apps Kustomization: flux-system/cluster-apps Kustomization: flux-system/radarr

@@ -0,0 +1,45 @@

+---
+apiVersion: kustomize.toolkit.fluxcd.io/v1
+kind: Kustomization
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: cluster-apps
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: radarr
+  namespace: flux-system
+spec:
+  commonMetadata:
+    labels:
+      app.kubernetes.io/name: radarr
+  decryption:
+    provider: sops
+    secretRef:
+      name: sops-age
+  dependsOn:
+  - name: cloudnative-pg-cluster
+  - name: external-secrets-stores
+  interval: 30m
+  path: ./kubernetes/apps/media/radarr/app
+  postBuild:
+    substitute:
+      APP: radarr
+    substituteFrom:
+    - kind: ConfigMap
+      name: cluster-settings
+    - kind: Secret
+      name: cluster-secrets
+    - kind: ConfigMap
+      name: cluster-user-settings
+      optional: true
+    - kind: Secret
+      name: cluster-user-secrets
+      optional: true
+  prune: true
+  retryInterval: 1m
+  sourceRef:
+    kind: GitRepository
+    name: home-kubernetes
+  targetNamespace: media
+  timeout: 5m
+  wait: false
+
--- kubernetes/apps/media/radarr/app Kustomization: flux-system/radarr ExternalSecret: media/radarr

+++ kubernetes/apps/media/radarr/app Kustomization: flux-system/radarr ExternalSecret: media/radarr

@@ -0,0 +1,36 @@

+---
+apiVersion: external-secrets.io/v1beta1
+kind: ExternalSecret
+metadata:
+  labels:
+    app.kubernetes.io/name: radarr
+    kustomize.toolkit.fluxcd.io/name: radarr
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: radarr
+  namespace: media
+spec:
+  dataFrom:
+  - extract:
+      key: cloudnative-pg
+  - extract:
+      key: radarr
+  secretStoreRef:
+    kind: ClusterSecretStore
+    name: onepassword-connect
+  target:
+    name: radarr-secret
+    template:
+      data:
+        INIT_POSTGRES_DBNAME: radarr_main
+        INIT_POSTGRES_HOST: postgres16-rw.database.svc.cluster.local
+        INIT_POSTGRES_PASS: '{{ .RADARR_POSTGRES_PASSWORD }}'
+        INIT_POSTGRES_SUPER_PASS: '{{ .POSTGRES_SUPER_PASS }}'
+        INIT_POSTGRES_USER: '{{ .RADARR_POSTGRES_USER }}'
+        RADARR__AUTH__APIKEY: '{{ .RADARR_API_KEY }}'
+        RADARR__POSTGRES__HOST: postgres16-rw.database.svc.cluster.local
+        RADARR__POSTGRES__MAINDB: radarr_main
+        RADARR__POSTGRES__PASSWORD: '{{ .RADARR_POSTGRES_PASSWORD }}'
+        RADARR__POSTGRES__PORT: '5432'
+        RADARR__POSTGRES__USER: '{{ .RADARR_POSTGRES_USER }}'
+      engineVersion: v2
+
--- kubernetes/apps/media/radarr/app Kustomization: flux-system/radarr PersistentVolumeClaim: media/radarr

+++ kubernetes/apps/media/radarr/app Kustomization: flux-system/radarr PersistentVolumeClaim: media/radarr

@@ -0,0 +1,18 @@

+---
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+  labels:
+    app.kubernetes.io/name: radarr
+    kustomize.toolkit.fluxcd.io/name: radarr
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: radarr
+  namespace: media
+spec:
+  accessModes:
+  - ReadWriteMany
+  resources:
+    requests:
+      storage: 15Gi
+  storageClassName: ceph-filesystem
+
--- kubernetes/apps/media/radarr/app Kustomization: flux-system/radarr HelmRelease: media/radarr

+++ kubernetes/apps/media/radarr/app Kustomization: flux-system/radarr HelmRelease: media/radarr

@@ -0,0 +1,137 @@

+---
+apiVersion: helm.toolkit.fluxcd.io/v2
+kind: HelmRelease
+metadata:
+  labels:
+    app.kubernetes.io/name: radarr
+    kustomize.toolkit.fluxcd.io/name: radarr
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: radarr
+  namespace: media
+spec:
+  chart:
+    spec:
+      chart: app-template
+      sourceRef:
+        kind: HelmRepository
+        name: bjw-s
+        namespace: flux-system
+      version: 3.2.1
+  dependsOn:
+  - name: longhorn
+    namespace: longhorn-system
+  install:
+    remediation:
+      retries: 3
+  interval: 30m
+  upgrade:
+    cleanupOnFail: true
+    remediation:
+      retries: 3
+      strategy: rollback
+  values:
+    controllers:
+      radarr:
+        annotations:
+          reloader.stakater.com/auto: 'true'
+        containers:
+          app:
+            env:
+              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: 80
+              RADARR__UPDATE__BRANCH: develop
+              TZ: America/New_York
+            envFrom:
+            - secretRef:
+                name: radarr-secret
+            image:
+              repository: ghcr.io/onedr0p/radarr-develop
+              tag: 5.7.0.8882@sha256:d6a11184848cc5309b9c0024cf33b40bb6a3613a5b15613bcc51864b23839015
+            probes:
+              liveness:
+                custom: true
+                enabled: true
+                spec:
+                  failureThreshold: 3
+                  httpGet:
+                    path: /ping
+                    port: 80
+                  initialDelaySeconds: 0
+                  periodSeconds: 10
+                  timeoutSeconds: 1
+              readiness:
+                custom: true
+                enabled: true
+                spec:
+                  failureThreshold: 3
+                  httpGet:
+                    path: /ping
+                    port: 80
+                  initialDelaySeconds: 0
+                  periodSeconds: 10
+                  timeoutSeconds: 1
+            resources:
+              limits:
+                memory: 1Gi
+              requests:
+                cpu: 10m
+            securityContext:
+              allowPrivilegeEscalation: false
+              capabilities:
+                drop:
+                - ALL
+              readOnlyRootFilesystem: true
+        initContainers:
+          init-db:
+            envFrom:
+            - secretRef:
+                name: radarr-secret
+            image:
+              repository: ghcr.io/onedr0p/postgres-init
+              tag: 16
+    defaultPodOptions:
+      securityContext:
+        fsGroup: 568
+        fsGroupChangePolicy: OnRootMismatch
+        runAsGroup: 568
+        runAsNonRoot: true
+        runAsUser: 568
+        seccompProfile:
+          type: RuntimeDefault
+        supplementalGroups:
+        - 10000
+    ingress:
+      app:
+        annotations:
+          external-dns.alpha.kubernetes.io/target: internal.donoso.family
+        className: internal
+        hosts:
+        - host: '{{ .Release.Name }}.donoso.family'
+          paths:
+          - path: /
+            service:
+              identifier: app
+              port: http
+    persistence:
+      config:
+        existingClaim: radarr
+      media:
+        globalMounts:
+        - path: /media
+        path: /volume1/media
+        server: 192.168.86.90
+        type: nfs
+      tmp:
+        type: emptyDir
+    service:
+      app:
+        controller: radarr
+        ports:
+          http:
+            port: 80
+

@blackjid blackjid merged commit 9510866 into main Jun 22, 2024
4 of 5 checks passed
@blackjid blackjid deleted the add_radarr branch June 22, 2024 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant