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/overseer): upgrade overseer kustomization and helmrelease #1988

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

blackjid
Copy link
Owner

No description provided.

@bot-x-mod
Copy link
Contributor

bot-x-mod bot commented Dec 18, 2023

--- kubernetes/main HelmRelease: media/overseerr Service: media/overseerr

+++ kubernetes/main HelmRelease: media/overseerr Service: media/overseerr

@@ -1,21 +1,22 @@

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

+++ kubernetes/main HelmRelease: media/overseerr StatefulSet: media/overseerr

@@ -1,91 +0,0 @@

----
-apiVersion: apps/v1
-kind: StatefulSet
-metadata:
-  name: overseerr
-  labels:
-    app.kubernetes.io/instance: overseerr
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/name: overseerr
-spec:
-  revisionHistoryLimit: 3
-  replicas: 1
-  podManagementPolicy: OrderedReady
-  updateStrategy:
-    type: RollingUpdate
-  selector:
-    matchLabels:
-      app.kubernetes.io/name: overseerr
-      app.kubernetes.io/instance: overseerr
-  serviceName: overseerr
-  template:
-    metadata:
-      labels:
-        app.kubernetes.io/name: overseerr
-        app.kubernetes.io/instance: overseerr
-    spec:
-      serviceAccountName: default
-      automountServiceAccountToken: true
-      securityContext:
-        fsGroup: 568
-        fsGroupChangePolicy: OnRootMismatch
-        runAsGroup: 568
-        runAsUser: 568
-      dnsPolicy: ClusterFirst
-      enableServiceLinks: true
-      containers:
-      - name: overseerr
-        image: ghcr.io/sct/overseerr:1.33.2
-        imagePullPolicy: null
-        env:
-        - name: LOG_LEVEL
-          value: info
-        - name: PORT
-          value: '80'
-        - name: TZ
-          value: America/Santiago
-        ports:
-        - name: http
-          containerPort: 80
-          protocol: TCP
-        volumeMounts:
-        - mountPath: /app/config
-          name: config
-        livenessProbe:
-          failureThreshold: 3
-          initialDelaySeconds: 0
-          periodSeconds: 10
-          tcpSocket:
-            port: 80
-          timeoutSeconds: 1
-        readinessProbe:
-          failureThreshold: 3
-          initialDelaySeconds: 0
-          periodSeconds: 10
-          tcpSocket:
-            port: 80
-          timeoutSeconds: 1
-        startupProbe:
-          failureThreshold: 30
-          initialDelaySeconds: 0
-          periodSeconds: 5
-          tcpSocket:
-            port: 80
-          timeoutSeconds: 1
-        resources:
-          limits:
-            memory: 1500Mi
-          requests:
-            cpu: 10m
-            memory: 250Mi
-  volumeClaimTemplates:
-  - metadata:
-      name: config
-    spec:
-      accessModes:
-      - ReadWriteOnce
-      resources:
-        requests:
-          storage: 1Gi
-      storageClassName: ceph-block
-
--- kubernetes/main HelmRelease: media/overseerr Ingress: media/overseerr

+++ kubernetes/main HelmRelease: media/overseerr Ingress: media/overseerr

@@ -5,19 +5,30 @@

   name: overseerr
   labels:
     app.kubernetes.io/instance: overseerr
     app.kubernetes.io/managed-by: Helm
     app.kubernetes.io/name: overseerr
   annotations:
-    external-dns.alpha.kubernetes.io/target: ingress.donoso.family
+    external-dns.alpha.kubernetes.io/target: external.donoso.family
 spec:
   ingressClassName: external
   tls:
   - hosts:
+    - overseerr.donoso.family
     - requests.donoso.family
   rules:
+  - host: overseerr.donoso.family
+    http:
+      paths:
+      - path: /
+        pathType: Prefix
+        backend:
+          service:
+            name: overseerr
+            port:
+              number: 80
   - host: requests.donoso.family
     http:
       paths:
       - path: /
         pathType: Prefix
         backend:
--- kubernetes/main HelmRelease: media/overseerr Deployment: media/overseerr

+++ kubernetes/main HelmRelease: media/overseerr Deployment: media/overseerr

@@ -0,0 +1,92 @@

+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: overseerr
+  labels:
+    app.kubernetes.io/component: main
+    app.kubernetes.io/instance: overseerr
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: overseerr
+  annotations:
+    reloader.stakater.com/auto: 'true'
+spec:
+  revisionHistoryLimit: 3
+  replicas: 1
+  strategy:
+    type: Recreate
+  selector:
+    matchLabels:
+      app.kubernetes.io/component: main
+      app.kubernetes.io/name: overseerr
+      app.kubernetes.io/instance: overseerr
+  template:
+    metadata:
+      labels:
+        app.kubernetes.io/component: main
+        app.kubernetes.io/instance: overseerr
+        app.kubernetes.io/name: overseerr
+    spec:
+      enableServiceLinks: true
+      serviceAccountName: default
+      automountServiceAccountToken: true
+      securityContext:
+        fsGroup: 568
+        fsGroupChangePolicy: OnRootMismatch
+        runAsGroup: 568
+        runAsNonRoot: true
+        runAsUser: 568
+      hostIPC: false
+      hostNetwork: false
+      hostPID: false
+      dnsPolicy: ClusterFirst
+      containers:
+      - env:
+        - name: LOG_LEVEL
+          value: info
+        - name: PORT
+          value: '80'
+        - name: TZ
+          value: America/Santiago
+        image: ghcr.io/sct/overseerr:1.33.2@sha256:714ea6db2bc007a2262d112bef7eec74972eb33d9c72bddb9cbd98b8742de950
+        livenessProbe:
+          failureThreshold: 3
+          httpGet:
+            path: /api/v1/status
+            port: 80
+          initialDelaySeconds: 0
+          periodSeconds: 10
+          timeoutSeconds: 1
+        name: main
+        readinessProbe:
+          failureThreshold: 3
+          httpGet:
+            path: /api/v1/status
+            port: 80
+          initialDelaySeconds: 0
+          periodSeconds: 10
+          timeoutSeconds: 1
+        resources:
+          limits:
+            memory: 2Gi
+          requests:
+            cpu: 100m
+            memory: 256Mi
+        securityContext:
+          allowPrivilegeEscalation: false
+          capabilities:
+            drop:
+            - ALL
+          readOnlyRootFilesystem: true
+        volumeMounts:
+        - mountPath: /app/config
+          name: config
+        - mountPath: /tmp
+          name: tmp
+      volumes:
+      - name: config
+        persistentVolumeClaim:
+          claimName: config-overseerr-0
+      - emptyDir: {}
+        name: tmp
+

@bot-x-mod
Copy link
Contributor

bot-x-mod bot commented Dec 18, 2023

--- kubernetes/main/apps Kustomization: flux-system/cluster-apps HelmRelease: media/overseerr

+++ kubernetes/main/apps Kustomization: flux-system/cluster-apps HelmRelease: media/overseerr

@@ -1,82 +0,0 @@

----
-apiVersion: helm.toolkit.fluxcd.io/v2beta2
-kind: HelmRelease
-metadata:
-  labels:
-    kustomize.toolkit.fluxcd.io/name: cluster-apps
-    kustomize.toolkit.fluxcd.io/namespace: flux-system
-  name: overseerr
-  namespace: media
-spec:
-  chart:
-    spec:
-      chart: app-template
-      sourceRef:
-        kind: HelmRepository
-        name: bjw-s
-        namespace: flux-system
-      version: 1.5.1
-  dependsOn:
-  - name: rook-ceph-cluster
-    namespace: rook-ceph
-  - name: volsync
-    namespace: volsync
-  install:
-    createNamespace: true
-    remediation:
-      retries: 3
-  interval: 30m
-  maxHistory: 2
-  uninstall:
-    keepHistory: false
-  upgrade:
-    cleanupOnFail: true
-    remediation:
-      retries: 3
-  values:
-    controller:
-      type: statefulset
-    env:
-      LOG_LEVEL: info
-      PORT: 80
-      TZ: America/Santiago
-    image:
-      repository: ghcr.io/sct/overseerr
-      tag: 1.33.2
-    ingress:
-      main:
-        annotations:
-          external-dns.alpha.kubernetes.io/target: ingress.donoso.family
-        enabled: true
-        hosts:
-        - host: requests.donoso.family
-          paths:
-          - path: /
-            pathType: Prefix
-        ingressClassName: external
-        tls:
-        - hosts:
-          - requests.donoso.family
-    podSecurityContext:
-      fsGroup: 568
-      fsGroupChangePolicy: OnRootMismatch
-      runAsGroup: 568
-      runAsUser: 568
-    resources:
-      limits:
-        memory: 1500Mi
-      requests:
-        cpu: 10m
-        memory: 250Mi
-    service:
-      main:
-        ports:
-          http:
-            port: 80
-    volumeClaimTemplates:
-    - accessMode: ReadWriteOnce
-      mountPath: /app/config
-      name: config
-      size: 1Gi
-      storageClass: ceph-block
-
--- kubernetes/main/apps Kustomization: flux-system/cluster-apps ExternalSecret: media/overseerr-restic

+++ kubernetes/main/apps Kustomization: flux-system/cluster-apps ExternalSecret: media/overseerr-restic

@@ -1,27 +0,0 @@

----
-apiVersion: external-secrets.io/v1beta1
-kind: ExternalSecret
-metadata:
-  labels:
-    kustomize.toolkit.fluxcd.io/name: cluster-apps
-    kustomize.toolkit.fluxcd.io/namespace: flux-system
-  name: overseerr-restic
-  namespace: media
-spec:
-  dataFrom:
-  - extract:
-      key: volsync-restic-template
-  secretStoreRef:
-    kind: ClusterSecretStore
-    name: onepassword-connect
-  target:
-    creationPolicy: Owner
-    name: overseerr-restic-secret
-    template:
-      data:
-        AWS_ACCESS_KEY_ID: '{{ .AWS_ACCESS_KEY_ID }}'
-        AWS_SECRET_ACCESS_KEY: '{{ .AWS_SECRET_ACCESS_KEY }}'
-        RESTIC_PASSWORD: '{{ .RESTIC_PASSWORD }}'
-        RESTIC_REPOSITORY: '{{ .REPOSITORY_TEMPLATE }}/overseerr'
-      engineVersion: v2
-
--- kubernetes/main/apps Kustomization: flux-system/cluster-apps ReplicationSource: media/overseerr

+++ kubernetes/main/apps Kustomization: flux-system/cluster-apps ReplicationSource: media/overseerr

@@ -1,28 +0,0 @@

----
-apiVersion: volsync.backube/v1alpha1
-kind: ReplicationSource
-metadata:
-  labels:
-    kustomize.toolkit.fluxcd.io/name: cluster-apps
-    kustomize.toolkit.fluxcd.io/namespace: flux-system
-  name: overseerr
-  namespace: media
-spec:
-  restic:
-    cacheCapacity: 1Gi
-    copyMethod: Snapshot
-    moverSecurityContext:
-      fsGroup: 568
-      runAsGroup: 568
-      runAsUser: 568
-    pruneIntervalDays: 7
-    repository: overseerr-restic-secret
-    retain:
-      daily: 7
-      within: 3d
-    storageClassName: ceph-block
-    volumeSnapshotClassName: csi-ceph-blockpool
-  sourcePVC: config-overseerr-0
-  trigger:
-    schedule: 0 7 * * *
-
--- kubernetes/main/apps Kustomization: flux-system/cluster-apps Kustomization: flux-system/overseerr

+++ kubernetes/main/apps Kustomization: flux-system/cluster-apps Kustomization: flux-system/overseerr

@@ -0,0 +1,34 @@

+---
+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: overseerr
+  namespace: flux-system
+spec:
+  commonMetadata:
+    labels:
+      app.kubernetes.io/name: overseerr
+  decryption:
+    provider: sops
+    secretRef:
+      name: sops-age
+  interval: 30m
+  path: ./kubernetes/main/apps/media/overseerr/app
+  postBuild:
+    substituteFrom:
+    - kind: ConfigMap
+      name: cluster-settings
+    - kind: Secret
+      name: cluster-secrets
+  prune: true
+  retryInterval: 1m
+  sourceRef:
+    kind: GitRepository
+    name: home-kubernetes
+  targetNamespace: media
+  timeout: 5m
+  wait: false
+
--- kubernetes/main/apps/media/overseerr/app Kustomization: flux-system/overseerr HelmRelease: media/overseerr

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

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

+---
+apiVersion: helm.toolkit.fluxcd.io/v2beta2
+kind: HelmRelease
+metadata:
+  labels:
+    app.kubernetes.io/name: overseerr
+    kustomize.toolkit.fluxcd.io/name: overseerr
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: overseerr
+  namespace: media
+spec:
+  chart:
+    spec:
+      chart: app-template
+      sourceRef:
+        kind: HelmRepository
+        name: bjw-s
+        namespace: flux-system
+      version: 2.4.0
+  dependsOn:
+  - name: rook-ceph-cluster
+    namespace: rook-ceph
+  - name: volsync
+    namespace: volsync
+  install:
+    remediation:
+      retries: 3
+  interval: 30m
+  uninstall:
+    keepHistory: false
+  upgrade:
+    cleanupOnFail: true
+    remediation:
+      retries: 3
+  values:
+    controllers:
+      main:
+        annotations:
+          reloader.stakater.com/auto: 'true'
+        containers:
+          main:
+            env:
+              LOG_LEVEL: info
+              PORT: 80
+              TZ: America/Santiago
+            image:
+              repository: ghcr.io/sct/overseerr
+              tag: 1.33.2@sha256:714ea6db2bc007a2262d112bef7eec74972eb33d9c72bddb9cbd98b8742de950
+            probes:
+              liveness:
+                custom: true
+                enabled: true
+                spec:
+                  failureThreshold: 3
+                  httpGet:
+                    path: /api/v1/status
+                    port: 80
+                  initialDelaySeconds: 0
+                  periodSeconds: 10
+                  timeoutSeconds: 1
+              readiness:
+                custom: true
+                enabled: true
+                spec:
+                  failureThreshold: 3
+                  httpGet:
+                    path: /api/v1/status
+                    port: 80
+                  initialDelaySeconds: 0
+                  periodSeconds: 10
+                  timeoutSeconds: 1
+              startup:
+                enabled: false
+            resources:
+              limits:
+                memory: 2Gi
+              requests:
+                cpu: 100m
+                memory: 256Mi
+            securityContext:
+              allowPrivilegeEscalation: false
+              capabilities:
+                drop:
+                - ALL
+              readOnlyRootFilesystem: true
+        pod:
+          securityContext:
+            fsGroup: 568
+            fsGroupChangePolicy: OnRootMismatch
+            runAsGroup: 568
+            runAsNonRoot: true
+            runAsUser: 568
+    ingress:
+      main:
+        annotations:
+          external-dns.alpha.kubernetes.io/target: external.donoso.family
+        className: external
+        enabled: true
+        hosts:
+        - host: '{{ .Release.Name }}.donoso.family'
+          paths:
+          - path: /
+            service:
+              name: main
+              port: http
+        - host: requests.donoso.family
+          paths:
+          - path: /
+            service:
+              name: main
+              port: http
+        tls:
+        - hosts:
+          - '{{ .Release.Name }}.donoso.family'
+          - requests.donoso.family
+    persistence:
+      config:
+        enabled: true
+        existingClaim: config-overseerr-0
+        globalMounts:
+        - path: /app/config
+      tmp:
+        type: emptyDir
+    service:
+      main:
+        ports:
+          http:
+            port: 80
+
--- kubernetes/main/apps/media/overseerr/app Kustomization: flux-system/overseerr ExternalSecret: media/overseerr-restic

+++ kubernetes/main/apps/media/overseerr/app Kustomization: flux-system/overseerr ExternalSecret: media/overseerr-restic

@@ -0,0 +1,28 @@

+---
+apiVersion: external-secrets.io/v1beta1
+kind: ExternalSecret
+metadata:
+  labels:
+    app.kubernetes.io/name: overseerr
+    kustomize.toolkit.fluxcd.io/name: overseerr
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: overseerr-restic
+  namespace: media
+spec:
+  dataFrom:
+  - extract:
+      key: volsync-restic-template
+  secretStoreRef:
+    kind: ClusterSecretStore
+    name: onepassword-connect
+  target:
+    creationPolicy: Owner
+    name: overseerr-restic-secret
+    template:
+      data:
+        AWS_ACCESS_KEY_ID: '{{ .AWS_ACCESS_KEY_ID }}'
+        AWS_SECRET_ACCESS_KEY: '{{ .AWS_SECRET_ACCESS_KEY }}'
+        RESTIC_PASSWORD: '{{ .RESTIC_PASSWORD }}'
+        RESTIC_REPOSITORY: '{{ .REPOSITORY_TEMPLATE }}/overseerr'
+      engineVersion: v2
+
--- kubernetes/main/apps/media/overseerr/app Kustomization: flux-system/overseerr ReplicationSource: media/overseerr

+++ kubernetes/main/apps/media/overseerr/app Kustomization: flux-system/overseerr ReplicationSource: media/overseerr

@@ -0,0 +1,29 @@

+---
+apiVersion: volsync.backube/v1alpha1
+kind: ReplicationSource
+metadata:
+  labels:
+    app.kubernetes.io/name: overseerr
+    kustomize.toolkit.fluxcd.io/name: overseerr
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: overseerr
+  namespace: media
+spec:
+  restic:
+    cacheCapacity: 1Gi
+    copyMethod: Snapshot
+    moverSecurityContext:
+      fsGroup: 568
+      runAsGroup: 568
+      runAsUser: 568
+    pruneIntervalDays: 7
+    repository: overseerr-restic-secret
+    retain:
+      daily: 7
+      within: 3d
+    storageClassName: ceph-block
+    volumeSnapshotClassName: csi-ceph-blockpool
+  sourcePVC: config-overseerr-0
+  trigger:
+    schedule: 0 7 * * *
+

@blackjid blackjid merged commit ccc302a into main Dec 18, 2023
4 checks passed
@blackjid blackjid deleted the upgrade_overseer branch December 18, 2023 01:55
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