home-ops icon indicating copy to clipboard operation
home-ops copied to clipboard

feat(pinchflat): new service deploy on the cluster

Open axeII opened this issue 1 year ago • 3 comments

Description of the change

Better to download data from yt.

Benefits or applicable issues

Potential replacement fro the metube

axeII avatar Sep 30 '24 15:09 axeII

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time

See detailed report in MegaLinter reports Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

axeII avatar Sep 30 '24 15:09 axeII

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

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

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

+++ kubernetes/apps/default/pinchflat/app Kustomization: flux-system/pinchflat HelmRelease: default/pinchflat

@@ -0,0 +1,124 @@

+---
+apiVersion: helm.toolkit.fluxcd.io/v2
+kind: HelmRelease
+metadata:
+  labels:
+    app.kubernetes.io/name: pinchflat
+    kustomize.toolkit.fluxcd.io/name: pinchflat
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: pinchflat
+  namespace: default
+spec:
+  chart:
+    spec:
+      chart: app-template
+      sourceRef:
+        kind: HelmRepository
+        name: bjw-s-charts
+        namespace: flux-system
+      version: 3.4.0
+  dependsOn:
+  - name: longhorn
+    namespace: longhorn-system
+  install:
+    remediation:
+      retries: 3
+  interval: 30m
+  upgrade:
+    cleanupOnFail: true
+    remediation:
+      retries: 3
+      strategy: rollback
+  values:
+    controllers:
+      pinchflat:
+        annotations:
+          reloader.stakater.com/auto: 'true'
+        containers:
+          app:
+            env:
+              PORT: 80
+              TZ: Europe/Prague
+              TZ_DATA_DIR: /tmp/elixir_tz_data
+            image:
+              repository: ghcr.io/kieraneglin/pinchflat
+              tag: v2024.9.12@sha256:f8f2ba632c80a4e2aefb5ef341d1f834c09405b3c27a98136c349ed713cc1631
+            probes:
+              liveness:
+                custom: true
+                enabled: true
+                spec:
+                  failureThreshold: 3
+                  httpGet:
+                    path: /healthcheck
+                    port: 80
+                  initialDelaySeconds: 0
+                  periodSeconds: 10
+                  timeoutSeconds: 1
+              readiness:
+                custom: true
+                enabled: true
+                spec:
+                  failureThreshold: 3
+                  httpGet:
+                    path: /healthcheck
+                    port: 80
+                  initialDelaySeconds: 0
+                  periodSeconds: 10
+                  timeoutSeconds: 1
+            resources:
+              limits:
+                memory: 4Gi
+              requests:
+                cpu: 10m
+            securityContext:
+              allowPrivilegeEscalation: false
+              capabilities:
+                drop:
+                - ALL
+              readOnlyRootFilesystem: true
+    defaultPodOptions:
+      nodeSelector:
+        feature.node.kubernetes.io/custom-nvidia-gpu: 'true'
+      securityContext:
+        fsGroup: 1000
+        fsGroupChangePolicy: OnRootMismatch
+        runAsGroup: 1000
+        runAsNonRoot: true
+        runAsUser: 1000
+        seccompProfile:
+          type: RuntimeDefault
+        supplementalGroups:
+        - 44
+        - 10000
+    ingress:
+      app:
+        className: internal
+        hosts:
+        - host: '{{ .Release.Name }}...PLACEHOLDER..'
+          paths:
+          - path: /
+            service:
+              identifier: app
+              port: http
+    persistence:
+      config:
+        existingClaim: pinchflat
+      downloads:
+        type: emptyDir
+      media:
+        globalMounts:
+        - path: /media/Library/YouTube
+          subPath: videos
+        path: /mnt/ThiccBoi/SiccBoi/data/media
+        server: 192.168.69.69
+        type: nfs
+      tmp:
+        type: emptyDir
+    service:
+      app:
+        controller: pinchflat
+        ports:
+          http:
+            port: 80
+

bot-akira[bot] avatar Sep 30 '24 15:09 bot-akira[bot]

--- HelmRelease: default/pinchflat Service: default/pinchflat

+++ HelmRelease: default/pinchflat Service: default/pinchflat

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

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

+++ HelmRelease: default/pinchflat Deployment: default/pinchflat

@@ -0,0 +1,109 @@

+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: pinchflat
+  labels:
+    app.kubernetes.io/component: pinchflat
+    app.kubernetes.io/instance: pinchflat
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: pinchflat
+  annotations:
+    reloader.stakater.com/auto: 'true'
+spec:
+  revisionHistoryLimit: 3
+  replicas: 1
+  strategy:
+    type: Recreate
+  selector:
+    matchLabels:
+      app.kubernetes.io/component: pinchflat
+      app.kubernetes.io/name: pinchflat
+      app.kubernetes.io/instance: pinchflat
+  template:
+    metadata:
+      labels:
+        app.kubernetes.io/component: pinchflat
+        app.kubernetes.io/instance: pinchflat
+        app.kubernetes.io/name: pinchflat
+    spec:
+      enableServiceLinks: false
+      serviceAccountName: default
+      automountServiceAccountToken: true
+      securityContext:
+        fsGroup: 1000
+        fsGroupChangePolicy: OnRootMismatch
+        runAsGroup: 1000
+        runAsNonRoot: true
+        runAsUser: 1000
+        seccompProfile:
+          type: RuntimeDefault
+        supplementalGroups:
+        - 44
+        - 10000
+      hostIPC: false
+      hostNetwork: false
+      hostPID: false
+      dnsPolicy: ClusterFirst
+      nodeSelector:
+        feature.node.kubernetes.io/custom-nvidia-gpu: 'true'
+      containers:
+      - env:
+        - name: PORT
+          value: '80'
+        - name: TZ
+          value: Europe/Prague
+        - name: TZ_DATA_DIR
+          value: /tmp/elixir_tz_data
+        image: ghcr.io/kieraneglin/pinchflat:v2024.9.12@sha256:f8f2ba632c80a4e2aefb5ef341d1f834c09405b3c27a98136c349ed713cc1631
+        livenessProbe:
+          failureThreshold: 3
+          httpGet:
+            path: /healthcheck
+            port: 80
+          initialDelaySeconds: 0
+          periodSeconds: 10
+          timeoutSeconds: 1
+        name: app
+        readinessProbe:
+          failureThreshold: 3
+          httpGet:
+            path: /healthcheck
+            port: 80
+          initialDelaySeconds: 0
+          periodSeconds: 10
+          timeoutSeconds: 1
+        resources:
+          limits:
+            memory: 4Gi
+          requests:
+            cpu: 10m
+        securityContext:
+          allowPrivilegeEscalation: false
+          capabilities:
+            drop:
+            - ALL
+          readOnlyRootFilesystem: true
+        volumeMounts:
+        - mountPath: /config
+          name: config
+        - mountPath: /downloads
+          name: downloads
+        - mountPath: /media/Library/YouTube
+          name: media
+          subPath: videos
+        - mountPath: /tmp
+          name: tmp
+      volumes:
+      - name: config
+        persistentVolumeClaim:
+          claimName: pinchflat
+      - emptyDir: {}
+        name: downloads
+      - name: media
+        nfs:
+          path: /mnt/ThiccBoi/SiccBoi/data/media
+          server: 192.168.69.69
+      - emptyDir: {}
+        name: tmp
+
--- HelmRelease: default/pinchflat Ingress: default/pinchflat

+++ HelmRelease: default/pinchflat Ingress: default/pinchflat

@@ -0,0 +1,23 @@

+---
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  name: pinchflat
+  labels:
+    app.kubernetes.io/instance: pinchflat
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: pinchflat
+spec:
+  ingressClassName: internal
+  rules:
+  - host: pinchflat...PLACEHOLDER..
+    http:
+      paths:
+      - path: /
+        pathType: Prefix
+        backend:
+          service:
+            name: pinchflat
+            port:
+              number: 80
+

bot-akira[bot] avatar Sep 30 '24 15:09 bot-akira[bot]