diff --git a/library/ix-dev/test/jellyfin/Chart.lock b/library/ix-dev/test/jellyfin/Chart.lock deleted file mode 100644 index 296a292f0b..0000000000 --- a/library/ix-dev/test/jellyfin/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: common - repository: file://../../../common - version: 1.2.3 -digest: sha256:e6ff49b06bf5d4d159e505ae6d153f36cd46170bb519caf90462cd5caebfd0fb -generated: "2023-11-30T14:07:56.924795065+02:00" diff --git a/library/ix-dev/test/jellyfin/Chart.yaml b/library/ix-dev/test/jellyfin/Chart.yaml deleted file mode 100644 index 490dabe4b4..0000000000 --- a/library/ix-dev/test/jellyfin/Chart.yaml +++ /dev/null @@ -1,27 +0,0 @@ -name: jellyfin -description: Jellyfin is a Free Software Media System that puts you in control of - managing and streaming your media. -annotations: - title: Jellyfin -type: application -version: 1.0.16 -apiVersion: v2 -appVersion: 10.8.13 -kubeVersion: '>=1.16.0-0' -maintainers: - - name: truenas - url: https://www.truenas.com/ - email: dev@ixsystems.com -dependencies: - - name: common - repository: file://../../../common - version: 1.2.3 -home: https://jellyfin.org/ -icon: https://jellyfin.org/images/logo.svg -sources: - - https://hub.docker.com/r/jellyfin/jellyfin - - https://github.com/truenas/charts/tree/master/community/jellyfin - - https://jellyfin.org/ -keywords: - - media - - streaming diff --git a/library/ix-dev/test/jellyfin/README.md b/library/ix-dev/test/jellyfin/README.md deleted file mode 100644 index e6cc2f8b26..0000000000 --- a/library/ix-dev/test/jellyfin/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Jellyfin - -[Jellyfin](https://jellyfin.org/) is a Free Software Media System that puts you in control of managing and streaming your media. - -> When application is installed, a container will be launched with **root** privileges. -> This is required in order to apply the correct permissions to the `Jellyfin` directories. -> Afterward, the `Jellyfin` container will run as a **non**-root user (Default: `568`). -> All mounted storage(s) will be `chown`ed only if the parent directory does not match the configured user. diff --git a/library/ix-dev/test/jellyfin/app-readme.md b/library/ix-dev/test/jellyfin/app-readme.md deleted file mode 100644 index e6cc2f8b26..0000000000 --- a/library/ix-dev/test/jellyfin/app-readme.md +++ /dev/null @@ -1,8 +0,0 @@ -# Jellyfin - -[Jellyfin](https://jellyfin.org/) is a Free Software Media System that puts you in control of managing and streaming your media. - -> When application is installed, a container will be launched with **root** privileges. -> This is required in order to apply the correct permissions to the `Jellyfin` directories. -> Afterward, the `Jellyfin` container will run as a **non**-root user (Default: `568`). -> All mounted storage(s) will be `chown`ed only if the parent directory does not match the configured user. diff --git a/library/ix-dev/test/jellyfin/charts/common-1.2.3.tgz b/library/ix-dev/test/jellyfin/charts/common-1.2.3.tgz deleted file mode 100644 index b5cf1ec113..0000000000 Binary files a/library/ix-dev/test/jellyfin/charts/common-1.2.3.tgz and /dev/null differ diff --git a/library/ix-dev/test/jellyfin/ci/basic-values.yaml b/library/ix-dev/test/jellyfin/ci/basic-values.yaml deleted file mode 100644 index 460f2bfda1..0000000000 --- a/library/ix-dev/test/jellyfin/ci/basic-values.yaml +++ /dev/null @@ -1,24 +0,0 @@ -jellyfinNetwork: - webPort: 31000 - -jellyfinRunAs: - user: 1000 - group: 1000 - -jellyfinStorage: - config: - type: hostPath - hostPath: /mnt/{{ .Release.Namespace }}/config - cache: - type: hostPath - hostPath: /mnt/{{ .Release.Namespace }}/cache - transcodes: - type: emptyDir - medium: Memory - size: 1Gi - -# Make sure installation don't fail when 0 GPU are assigned -jellyfinGPU: - nvidia.com/gpu: 0 - intel.com/gpu: 0 -# TODO: Test assigning GPUs on a GPU-enabled system diff --git a/library/ix-dev/test/jellyfin/ci/extra-values.yaml b/library/ix-dev/test/jellyfin/ci/extra-values.yaml deleted file mode 100644 index db993b9465..0000000000 --- a/library/ix-dev/test/jellyfin/ci/extra-values.yaml +++ /dev/null @@ -1,22 +0,0 @@ -jellyfinNetwork: - webPort: 31000 - -jellyfinStorage: - config: - type: hostPath - hostPath: /mnt/{{ .Release.Namespace }}/config - cache: - type: hostPath - hostPath: /mnt/{{ .Release.Namespace }}/cache - transcodes: - type: emptyDir - medium: '' - size: '' - - additionalStorages: - - type: hostPath - hostPath: /mnt/{{ .Release.Namespace }}/movies - mountPath: /movies - - type: hostPath - hostPath: /mnt/{{ .Release.Namespace }}/series - mountPath: /series diff --git a/library/ix-dev/test/jellyfin/ci/hostNet-values.yaml b/library/ix-dev/test/jellyfin/ci/hostNet-values.yaml deleted file mode 100644 index d85fc2ab77..0000000000 --- a/library/ix-dev/test/jellyfin/ci/hostNet-values.yaml +++ /dev/null @@ -1,13 +0,0 @@ -jellyfinNetwork: - hostNetwork: true - -jellyfinStorage: - config: - type: hostPath - hostPath: /mnt/{{ .Release.Namespace }}/config - cache: - type: hostPath - hostPath: /mnt/{{ .Release.Namespace }}/cache - transcodes: - type: hostPath - hostPath: /mnt/{{ .Release.Namespace }}/transcodes diff --git a/library/ix-dev/test/jellyfin/item.yaml b/library/ix-dev/test/jellyfin/item.yaml deleted file mode 100644 index 4292f5a67e..0000000000 --- a/library/ix-dev/test/jellyfin/item.yaml +++ /dev/null @@ -1,12 +0,0 @@ -icon_url: https://jellyfin.org/images/logo.svg -categories: - - media -screenshots: - - https://jellyfin.org/assets/images/10.8-home-4a73a92bf90d1eeffa5081201ca9c7bb.png - - https://jellyfin.org/assets/images/10.8-details-df4f7caaee389ffbaeeaa95b668fa037.png -tags: - - entertainment - - movies - - series - - tv - - streaming diff --git a/library/ix-dev/test/jellyfin/metadata.yaml b/library/ix-dev/test/jellyfin/metadata.yaml deleted file mode 100644 index d806ba85f0..0000000000 --- a/library/ix-dev/test/jellyfin/metadata.yaml +++ /dev/null @@ -1,8 +0,0 @@ -runAsContext: - - userName: jellyfin - groupName: jellyfin - gid: 568 - uid: 568 - description: Jellyfin runs as any non-root user. -capabilities: [] -hostMounts: [] diff --git a/library/ix-dev/test/jellyfin/migrations/migrate b/library/ix-dev/test/jellyfin/migrations/migrate deleted file mode 100755 index 8f7e3dc857..0000000000 --- a/library/ix-dev/test/jellyfin/migrations/migrate +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/python3 -import json -import os -import sys - - -def migrate(values): - storageKey = 'jellyfinStorage' - storages = ['config', 'cache', 'transcodes'] - - - for storage in storages: - check_val = values.get(storageKey, {}).get(storage, {}) - if not isinstance(check_val, dict) or not check_val or check_val.get('type', 'hostPath') == 'hostPath': - continue - - values[storageKey][storage] = {key: value for key, value in check_val.items() if key != 'hostPath'} - - return values - - -if __name__ == '__main__': - if len(sys.argv) != 2: - exit(1) - - if os.path.exists(sys.argv[1]): - with open(sys.argv[1], 'r') as f: - print(json.dumps(migrate(json.loads(f.read())))) diff --git a/library/ix-dev/test/jellyfin/questions.yaml b/library/ix-dev/test/jellyfin/questions.yaml deleted file mode 100644 index 794c9479ff..0000000000 --- a/library/ix-dev/test/jellyfin/questions.yaml +++ /dev/null @@ -1,398 +0,0 @@ -groups: - - name: Jellyfin Configuration - description: Configure Jellyfin - - name: User and Group Configuration - description: Configure User and Group for Jellyfin - - name: Network Configuration - description: Configure Network for Jellyfin - - name: Storage Configuration - description: Configure Storage for Jellyfin - - name: Resources Configuration - description: Configure Resources for Jellyfin - -portals: - web_portal: - protocols: - - "$kubernetes-resource_configmap_portal_protocol" - host: - - "$kubernetes-resource_configmap_portal_host" - ports: - - "$kubernetes-resource_configmap_portal_port" - path: "$kubernetes-resource_configmap_portal_path" - -questions: - - variable: jellyfinConfig - label: "" - group: Jellyfin Configuration - schema: - type: dict - attrs: - - variable: publishServerUrl - label: Published Server URL - description: Optional - The URL that Jellyfin will be advertised. - schema: - type: string - default: "" - - variable: additionalEnvs - label: Additional Environment Variables - description: Configure additional environment variables for Jellyfin. - schema: - type: list - default: [] - items: - - variable: env - label: Environment Variable - schema: - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - required: true - - variable: value - label: Value - schema: - type: string - required: true - - - variable: jellyfinRunAs - label: "" - group: User and Group Configuration - schema: - type: dict - attrs: - - variable: user - label: User ID - description: The user id that Jellyfin will run as. - schema: - type: int - min: 2 - default: 568 - required: true - - variable: group - label: Group ID - description: The group id that Jellyfin will run as. - schema: - type: int - min: 2 - default: 568 - required: true - - - variable: jellyfinNetwork - label: "" - group: Network Configuration - schema: - type: dict - attrs: - - variable: hostNetwork - label: Host Network - description: | - Bind to the host network. While it's recommended to keep this disabled.
- It's required for autodiscovery to work. - schema: - type: boolean - default: false - - variable: webPort - label: Web Port - description: The port for the Jellyfin Web UI. - schema: - type: int - default: 30013 - show_if: [["hostNetwork", "=", false]] - min: 9000 - max: 65535 - required: true - - - variable: jellyfinStorage - label: "" - group: Storage Configuration - schema: - type: dict - attrs: - - variable: config - label: Jellyfin Config Storage - description: The path to store Jellyfin Configuration. - schema: - type: dict - attrs: - - variable: type - label: Type - description: | - ixVolume: Is dataset created automatically by the system.
- Host Path: Is a path that already exists on the system. - schema: - type: string - required: true - default: "ixVolume" - enum: - - value: "hostPath" - description: Host Path (Path that already exists on the system) - - value: "ixVolume" - description: ixVolume (Dataset created automatically by the system) - - variable: datasetName - label: Dataset Name - schema: - type: string - show_if: [["type", "=", "ixVolume"]] - required: true - hidden: true - immutable: true - default: "config" - $ref: - - "normalize/ixVolume" - - variable: hostPath - label: Host Path - schema: - type: hostpath - show_if: [["type", "=", "hostPath"]] - immutable: true - required: true - - variable: cache - label: Jellyfin Cache Storage - description: The path to store Jellyfin Cache. - schema: - type: dict - attrs: - - variable: type - label: Type - description: | - ixVolume: Is dataset created automatically by the system.
- Host Path: Is a path that already exists on the system. - schema: - type: string - required: true - default: "ixVolume" - enum: - - value: "hostPath" - description: Host Path (Path that already exists on the system) - - value: "ixVolume" - description: ixVolume (Dataset created automatically by the system) - - variable: datasetName - label: Dataset Name - schema: - type: string - show_if: [["type", "=", "ixVolume"]] - required: true - hidden: true - immutable: true - default: "cache" - $ref: - - "normalize/ixVolume" - - variable: hostPath - label: Host Path - schema: - type: hostpath - show_if: [["type", "=", "hostPath"]] - immutable: true - required: true - - variable: transcodes - label: Jellyfin Transcodes Storage - description: The path to store Jellyfin Transcodes. - schema: - type: dict - attrs: - - variable: type - label: Type - description: | - ixVolume: Is dataset created automatically by the system.
- Host Path: Is a path that already exists on the system.
- emptyDir: Is a temporary directory that will be created on the disk or in memory. - schema: - type: string - required: true - default: "ixVolume" - enum: - - value: "hostPath" - description: Host Path (Path that already exists on the system) - - value: "ixVolume" - description: ixVolume (Dataset created automatically by the system) - - value: "emptyDir" - description: emptyDir (Temporary directory created on the disk or in memory) - - variable: datasetName - label: Dataset Name - schema: - type: string - show_if: [["type", "=", "ixVolume"]] - required: true - hidden: true - immutable: true - default: "transcodes" - $ref: - - "normalize/ixVolume" - - variable: hostPath - label: Host Path - schema: - type: hostpath - show_if: [["type", "=", "hostPath"]] - immutable: true - required: true - - variable: medium - label: emptyDir Medium - description: | - Disk: Creates a temporary directory on the disk.
- Memory: Creates a temporary directory in memory. - schema: - type: string - show_if: [["type", "=", "emptyDir"]] - default: "" - enum: - - value: "" - description: Disk (Temporary directory created on the disk) - - value: "Memory" - description: Memory (Temporary directory created in memory) - - variable: size - label: emptyDir Size Limit - description: | - The maximum size of the temporary directory.
- For example: 2Gi - schema: - type: string - show_if: [["type", "=", "emptyDir"]] - default: "2Gi" - - - variable: additionalStorages - label: Additional Storage - description: Additional storage for Jellyfin. - schema: - type: list - default: [] - items: - - variable: storageEntry - label: Storage Entry - schema: - type: dict - attrs: - - variable: type - label: Type - description: | - ixVolume: Is dataset created automatically by the system.
- Host Path: Is a path that already exists on the system. - schema: - type: string - required: true - default: "ixVolume" - enum: - - value: "hostPath" - description: Host Path (Path that already exists on the system) - - value: "ixVolume" - description: ixVolume (Dataset created automatically by the system) - - value: "smb-pv-pvc" - description: SMB Share (Mounts a persistent volume claim to a SMB share) - - variable: mountPath - label: Mount Path - description: The path inside the container to mount the storage. - schema: - type: path - required: true - - variable: hostPath - label: Host Path - description: The host path to use for storage. - schema: - type: hostpath - show_if: [["type", "=", "hostPath"]] - required: true - - variable: datasetName - label: Dataset Name - description: The name of the dataset to use for storage. - schema: - type: string - show_if: [["type", "=", "ixVolume"]] - required: true - immutable: true - default: "storage_entry" - $ref: - - "normalize/ixVolume" - - variable: server - label: Server - description: The server for the SMB share. - schema: - type: string - show_if: [["type", "=", "smb-pv-pvc"]] - required: true - - variable: share - label: Share - description: The share name for the SMB share. - schema: - type: string - show_if: [["type", "=", "smb-pv-pvc"]] - required: true - - variable: domain - label: Domain (Optional) - description: The domain for the SMB share. - schema: - type: string - show_if: [["type", "=", "smb-pv-pvc"]] - - variable: username - label: Username - description: The username for the SMB share. - schema: - type: string - show_if: [["type", "=", "smb-pv-pvc"]] - required: true - - variable: password - label: Password - description: The password for the SMB share. - schema: - type: string - show_if: [["type", "=", "smb-pv-pvc"]] - required: true - private: true - - variable: size - label: Size (in Gi) - description: The size of the volume quota. - schema: - type: int - show_if: [["type", "=", "smb-pv-pvc"]] - required: true - min: 1 - default: 1 - - variable: resources - group: Resources Configuration - label: "" - schema: - type: dict - attrs: - - variable: limits - label: Limits - schema: - type: dict - attrs: - - variable: cpu - label: CPU - description: CPU limit for Jellyfin. - schema: - type: string - max_length: 6 - valid_chars: '^(0\.[1-9]|[1-9][0-9]*)(\.[0-9]|m?)$' - valid_chars_error: | - Valid CPU limit formats are
- - Plain Integer - eg. 1
- - Float - eg. 0.5
- - Milicpu - eg. 500m - default: "4000m" - required: true - - variable: memory - label: Memory - description: Memory limit for Jellyfin. - schema: - type: string - max_length: 12 - valid_chars: '^[1-9][0-9]*([EPTGMK]i?|e[0-9]+)?$' - valid_chars_error: | - Valid Memory limit formats are
- - Suffixed with E/P/T/G/M/K - eg. 1G
- - Suffixed with Ei/Pi/Ti/Gi/Mi/Ki - eg. 1Gi
- - Plain Integer in bytes - eg. 1024
- - Exponent - eg. 134e6 - default: "8Gi" - required: true - - - variable: jellyfinGPU - group: Resources Configuration - label: GPU Configuration - schema: - type: dict - $ref: - - "definitions/gpuConfiguration" - attrs: [] diff --git a/library/ix-dev/test/jellyfin/templates/NOTES.txt b/library/ix-dev/test/jellyfin/templates/NOTES.txt deleted file mode 100644 index ba4e01146c..0000000000 --- a/library/ix-dev/test/jellyfin/templates/NOTES.txt +++ /dev/null @@ -1 +0,0 @@ -{{ include "ix.v1.common.lib.chart.notes" $ }} diff --git a/library/ix-dev/test/jellyfin/templates/_jellyfin.tpl b/library/ix-dev/test/jellyfin/templates/_jellyfin.tpl deleted file mode 100644 index 5e5a374c34..0000000000 --- a/library/ix-dev/test/jellyfin/templates/_jellyfin.tpl +++ /dev/null @@ -1,151 +0,0 @@ -{{- define "jellyfin.workload" -}} -workload: - jellyfin: - enabled: true - primary: true - type: Deployment - podSpec: - hostNetwork: {{ .Values.jellyfinNetwork.hostNetwork }} - containers: - jellyfin: - enabled: true - primary: true - imageSelector: image - securityContext: - runAsUser: {{ .Values.jellyfinRunAs.user }} - runAsGroup: {{ .Values.jellyfinRunAs.group }} - env: - {{ with .Values.jellyfinConfig.publishedServerUrl }} - JELLYFIN_PublishedServerUrl: {{ . | quote }} - {{ end }} - {{ with .Values.jellyfinConfig.additionalEnvs }} - envList: - {{ range $env := . }} - - name: {{ $env.name }} - values: {{ $env.value }} - {{ end }} - {{ end }} - probes: - liveness: - enabled: true - type: http - port: 8096 - path: /health - readiness: - enabled: true - type: http - port: 8096 - path: /health - startup: - enabled: true - type: http - port: 8096 - path: /health - initContainers: - {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions" - "UID" .Values.jellyfinRunAs.user - "GID" .Values.jellyfinRunAs.group - "mode" "check" - "type" "init") | nindent 8 }} - -{{/* Service */}} -service: - jellyfin: - enabled: true - primary: true - type: NodePort - targetSelector: jellyfin - ports: - webui: - enabled: true - primary: true - port: {{ .Values.jellyfinNetwork.webPort }} - nodePort: {{ .Values.jellyfinNetwork.webPort }} - targetPort: 8096 - targetSelector: jellyfin - -{{/* Persistence */}} -persistence: - config: - enabled: true - type: {{ .Values.jellyfinStorage.config.type }} - datasetName: {{ .Values.jellyfinStorage.config.datasetName | default "" }} - hostPath: {{ .Values.jellyfinStorage.config.hostPath | default "" }} - targetSelector: - jellyfin: - jellyfin: - mountPath: /config - 01-permissions: - mountPath: /mnt/directories/config - cache: - enabled: true - type: {{ .Values.jellyfinStorage.cache.type }} - datasetName: {{ .Values.jellyfinStorage.cache.datasetName | default "" }} - hostPath: {{ .Values.jellyfinStorage.cache.hostPath | default "" }} - targetSelector: - jellyfin: - jellyfin: - mountPath: /cache - 01-permissions: - mountPath: /mnt/directories/cache - transcode: - enabled: true - type: {{ .Values.jellyfinStorage.transcodes.type }} - datasetName: {{ .Values.jellyfinStorage.transcodes.datasetName | default "" }} - hostPath: {{ .Values.jellyfinStorage.transcodes.hostPath | default "" }} - medium: {{ .Values.jellyfinStorage.transcodes.medium | default "" }} - {{/* Size of the emptyDir */}} - size: {{ .Values.jellyfinStorage.transcodes.size | default "" }} - targetSelector: - jellyfin: - jellyfin: - mountPath: /config/transcodes - {{ if ne .Values.jellyfinStorage.transcodes.type "emptyDir" }} - 01-permissions: - mountPath: /mnt/directories/transcodes - {{ end }} - tmp: - enabled: true - type: emptyDir - targetSelector: - jellyfin: - jellyfin: - mountPath: /tmp - {{- range $idx, $storage := .Values.jellyfinStorage.additionalStorages }} - {{ printf "jellyfin-%v" (int $idx) }}: - {{- $size := "" -}} - {{- if $storage.size -}} - {{- $size = (printf "%vGi" $storage.size) -}} - {{- end }} - enabled: true - type: {{ $storage.type }} - datasetName: {{ $storage.datasetName | default "" }} - hostPath: {{ $storage.hostPath | default "" }} - server: {{ $storage.server | default "" }} - share: {{ $storage.share | default "" }} - domain: {{ $storage.domain | default "" }} - username: {{ $storage.username | default "" }} - password: {{ $storage.password | default "" }} - size: {{ $size }} - {{- if eq $storage.type "smb-pv-pvc" }} - mountOptions: - - key: noperm - {{- end }} - targetSelector: - jellyfin: - jellyfin: - mountPath: {{ $storage.mountPath }} - 01-permissions: - mountPath: /mnt/directories{{ $storage.mountPath }} - {{- end }} -{{ with .Values.jellyfinGPU }} -scaleGPU: - {{ range $key, $value := . }} - - gpu: - {{ $key }}: {{ $value }} - targetSelector: - jellyfin: - - jellyfin - {{ end }} -{{ end }} -{{- end -}} diff --git a/library/ix-dev/test/jellyfin/templates/_portal.tpl b/library/ix-dev/test/jellyfin/templates/_portal.tpl deleted file mode 100644 index c985b5aa83..0000000000 --- a/library/ix-dev/test/jellyfin/templates/_portal.tpl +++ /dev/null @@ -1,16 +0,0 @@ -{{- define "jellyfin.portal" -}} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: portal -data: - path: "/" - {{- $port := .Values.jellyfinNetwork.webPort -}} - {{- if .Values.jellyfinNetwork.hostNetwork -}} - {{- $port = 8096 -}} - {{- end }} - port: {{ $port | quote }} - protocol: http - host: $node_ip -{{- end -}} diff --git a/library/ix-dev/test/jellyfin/templates/common.yaml b/library/ix-dev/test/jellyfin/templates/common.yaml deleted file mode 100644 index ee3c3a7796..0000000000 --- a/library/ix-dev/test/jellyfin/templates/common.yaml +++ /dev/null @@ -1,9 +0,0 @@ -{{- include "ix.v1.common.loader.init" . -}} - -{{/* Merge the templates with Values */}} -{{- $_ := mustMergeOverwrite .Values (include "jellyfin.workload" $ | fromYaml) -}} - -{{/* Create the configmap for portal manually*/}} -{{- include "jellyfin.portal" $ -}} - -{{- include "ix.v1.common.loader.apply" . -}} diff --git a/library/ix-dev/test/jellyfin/upgrade_info.json b/library/ix-dev/test/jellyfin/upgrade_info.json deleted file mode 100644 index 767388094a..0000000000 --- a/library/ix-dev/test/jellyfin/upgrade_info.json +++ /dev/null @@ -1 +0,0 @@ -{"filename": "values.yaml", "keys": ["image"]} diff --git a/library/ix-dev/test/jellyfin/upgrade_strategy b/library/ix-dev/test/jellyfin/upgrade_strategy deleted file mode 100755 index 41e9448b21..0000000000 --- a/library/ix-dev/test/jellyfin/upgrade_strategy +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/python3 -import json -import re -import sys - -from catalog_update.upgrade_strategy import semantic_versioning - - -RE_STABLE_VERSION = re.compile(r'[0-9]+\.[0-9]+\.[0-9]+') - - -def newer_mapping(image_tags): - key = list(image_tags.keys())[0] - tags = {t: t for t in image_tags[key] if RE_STABLE_VERSION.fullmatch(t)} - version = semantic_versioning(list(tags)) - if not version: - return {} - - return { - 'tags': {key: tags[version]}, - 'app_version': version, - } - - -if __name__ == '__main__': - try: - versions_json = json.loads(sys.stdin.read()) - except ValueError: - raise ValueError('Invalid json specified') - - print(json.dumps(newer_mapping(versions_json))) diff --git a/library/ix-dev/test/jellyfin/values.yaml b/library/ix-dev/test/jellyfin/values.yaml deleted file mode 100644 index 5e7c58fbe8..0000000000 --- a/library/ix-dev/test/jellyfin/values.yaml +++ /dev/null @@ -1,33 +0,0 @@ -image: - repository: jellyfin/jellyfin - pullPolicy: IfNotPresent - tag: 10.8.13 - -resources: - limits: - cpu: 4000m - memory: 8Gi - -jellyfinConfig: - publishedServerUrl: '' - additionalEnvs: [] -jellyfinGPU: {} -jellyfinNetwork: - webPort: 30013 - hostNetwork: false -jellyfinRunAs: - user: 568 - group: 568 -jellyfinStorage: - config: - type: ixVolume - datasetName: config - cache: - type: ixVolume - datasetName: cache - transcodes: - type: ixVolume - datasetName: transcodes - medium: '' - size: '' - additionalStorages: [] diff --git a/library/ix-dev/test/sonarr/Chart.lock b/library/ix-dev/test/sonarr/Chart.lock deleted file mode 100644 index 7178e9efbf..0000000000 --- a/library/ix-dev/test/sonarr/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: common - repository: file://../../../common - version: 1.1.1 -digest: sha256:a7dbe3e4d42dbcd4325776e5e01a1d630c7f185f79e7ebf22b1b9cc80f56eed7 -generated: "2023-09-21T15:59:14.078456648+03:00" diff --git a/library/ix-dev/test/sonarr/Chart.yaml b/library/ix-dev/test/sonarr/Chart.yaml deleted file mode 100644 index 9a7d68f970..0000000000 --- a/library/ix-dev/test/sonarr/Chart.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: sonarr -description: Sonarr is a PVR for Usenet and BitTorrent users. -annotations: - title: Sonarr -type: application -version: 1.0.16 -apiVersion: v2 -appVersion: '3.0.10.1567' -kubeVersion: '>=1.16.0-0' -maintainers: - - name: truenas - url: https://www.truenas.com/ - email: dev@ixsystems.com -dependencies: - - name: common - repository: file://../../../common - version: 1.1.1 -home: https://github.com/Sonarr/Sonarr -icon: https://raw.githubusercontent.com/Sonarr/Sonarr/develop/Logo/256.png -sources: - - https://github.com/onedr0p/containers/tree/main/apps/sonarr - - https://github.com/truenas/charts/tree/master/community/sonarr - - https://github.com/Sonarr/Sonarr -keywords: - - media - - series diff --git a/library/ix-dev/test/sonarr/README.md b/library/ix-dev/test/sonarr/README.md deleted file mode 100644 index f345ff022a..0000000000 --- a/library/ix-dev/test/sonarr/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Sonarr - -[Sonarr](https://github.com/Sonarr/Sonarr) is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows and will grab, sort and rename them. - -> When application is installed, a container will be launched with **root** privileges. -> This is required in order to apply the correct permissions to the `Sonarr` directories. -> Afterward, the `Sonarr` container will run as a **non**-root user (Default: `568`). -> All mounted storage(s) will be `chown`ed only if the parent directory does not match the configured user. diff --git a/library/ix-dev/test/sonarr/app-readme.md b/library/ix-dev/test/sonarr/app-readme.md deleted file mode 100644 index f345ff022a..0000000000 --- a/library/ix-dev/test/sonarr/app-readme.md +++ /dev/null @@ -1,8 +0,0 @@ -# Sonarr - -[Sonarr](https://github.com/Sonarr/Sonarr) is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows and will grab, sort and rename them. - -> When application is installed, a container will be launched with **root** privileges. -> This is required in order to apply the correct permissions to the `Sonarr` directories. -> Afterward, the `Sonarr` container will run as a **non**-root user (Default: `568`). -> All mounted storage(s) will be `chown`ed only if the parent directory does not match the configured user. diff --git a/library/ix-dev/test/sonarr/charts/common-1.1.1.tgz b/library/ix-dev/test/sonarr/charts/common-1.1.1.tgz deleted file mode 100644 index 8a94b95393..0000000000 Binary files a/library/ix-dev/test/sonarr/charts/common-1.1.1.tgz and /dev/null differ diff --git a/library/ix-dev/test/sonarr/ci/basic-values.yaml b/library/ix-dev/test/sonarr/ci/basic-values.yaml deleted file mode 100644 index 886fe58f92..0000000000 --- a/library/ix-dev/test/sonarr/ci/basic-values.yaml +++ /dev/null @@ -1,11 +0,0 @@ -sonarrNetwork: - webPort: 31000 - -sonarrRunAs: - user: 1000 - group: 1000 - -sonarrStorage: - config: - type: hostPath - hostPath: /mnt/{{ .Release.Namespace }}/config diff --git a/library/ix-dev/test/sonarr/ci/extra-values.yaml b/library/ix-dev/test/sonarr/ci/extra-values.yaml deleted file mode 100644 index 2d1d330236..0000000000 --- a/library/ix-dev/test/sonarr/ci/extra-values.yaml +++ /dev/null @@ -1,21 +0,0 @@ -sonarrConfig: - additionalEnvs: - - name: SONARR__API_KEY - value: some-long-api-key - - name: SONARR__LOG_LEVEL - value: error - -sonarrNetwork: - webPort: 31000 - -sonarrStorage: - config: - type: hostPath - hostPath: /mnt/{{ .Release.Namespace }}/config - additionalStorages: - - type: hostPath - hostPath: /mnt/{{ .Release.Namespace }}/action_series - mountPath: /action_series - - type: hostPath - hostPath: /mnt/{{ .Release.Namespace }}/adventure_series - mountPath: /adventure_series diff --git a/library/ix-dev/test/sonarr/ci/hostNet-values.yaml b/library/ix-dev/test/sonarr/ci/hostNet-values.yaml deleted file mode 100644 index a23e799a30..0000000000 --- a/library/ix-dev/test/sonarr/ci/hostNet-values.yaml +++ /dev/null @@ -1,8 +0,0 @@ -sonarrNetwork: - webPort: 30000 - hostNetwork: true - -sonarrStorage: - config: - type: hostPath - hostPath: /mnt/{{ .Release.Namespace }}/config diff --git a/library/ix-dev/test/sonarr/item.yaml b/library/ix-dev/test/sonarr/item.yaml deleted file mode 100644 index 8e971a26f9..0000000000 --- a/library/ix-dev/test/sonarr/item.yaml +++ /dev/null @@ -1,9 +0,0 @@ -icon_url: https://raw.githubusercontent.com/Sonarr/Sonarr/develop/Logo/256.png -categories: - - media -screenshots: - - https://sonarr.tv/img/features/calendar.png - - https://sonarr.tv/img/features/manualsearch.png - - https://sonarr.tv/img/features/blocklist.png -tags: - - series diff --git a/library/ix-dev/test/sonarr/metadata.yaml b/library/ix-dev/test/sonarr/metadata.yaml deleted file mode 100644 index c70b059638..0000000000 --- a/library/ix-dev/test/sonarr/metadata.yaml +++ /dev/null @@ -1,8 +0,0 @@ -runAsContext: - - userName: sonarr - groupName: sonarr - gid: 568 - uid: 568 - description: Sonarr can run as any non-root user. -capabilities: [] -hostMounts: [] diff --git a/library/ix-dev/test/sonarr/migrations/migrate b/library/ix-dev/test/sonarr/migrations/migrate deleted file mode 100755 index 3176f197c3..0000000000 --- a/library/ix-dev/test/sonarr/migrations/migrate +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/python3 -import json -import os -import sys - - -def migrate(values): - storageKey = 'sonarrStorage' - storages = ['config'] - - - for storage in storages: - check_val = values.get(storageKey, {}).get(storage, {}) - if not isinstance(check_val, dict) or not check_val or check_val.get('type', 'hostPath') == 'hostPath': - continue - - values[storageKey][storage] = {key: value for key, value in check_val.items() if key != 'hostPath'} - - - return values - - -if __name__ == '__main__': - if len(sys.argv) != 2: - exit(1) - - if os.path.exists(sys.argv[1]): - with open(sys.argv[1], 'r') as f: - print(json.dumps(migrate(json.loads(f.read())))) diff --git a/library/ix-dev/test/sonarr/questions.yaml b/library/ix-dev/test/sonarr/questions.yaml deleted file mode 100644 index e158867171..0000000000 --- a/library/ix-dev/test/sonarr/questions.yaml +++ /dev/null @@ -1,286 +0,0 @@ -groups: - - name: Sonarr Configuration - description: Configure Sonarr - - name: User and Group Configuration - description: Configure User and Group for Sonarr - - name: Network Configuration - description: Configure Network for Sonarr - - name: Storage Configuration - description: Configure Storage for Sonarr - - name: Resources Configuration - description: Configure Resources for Sonarr - -portals: - web_portal: - protocols: - - "$kubernetes-resource_configmap_portal_protocol" - host: - - "$kubernetes-resource_configmap_portal_host" - ports: - - "$kubernetes-resource_configmap_portal_port" - path: "$kubernetes-resource_configmap_portal_path" - -questions: - - variable: sonarrConfig - label: "" - group: Sonarr Configuration - schema: - type: dict - attrs: - - variable: instanceName - label: Instance Name - description: The name of the Sonarr instance. - schema: - type: string - default: "Sonarr" - required: true - - variable: additionalEnvs - label: Additional Environment Variables - description: Configure additional environment variables for Sonarr. - schema: - type: list - default: [] - items: - - variable: env - label: Environment Variable - schema: - type: dict - attrs: - - variable: name - label: Name - schema: - type: string - required: true - - variable: value - label: Value - schema: - type: string - required: true - - - variable: sonarrRunAs - label: "" - group: User and Group Configuration - schema: - type: dict - attrs: - - variable: user - label: User ID - description: The user id that Sonarr will run as. - schema: - type: int - min: 2 - default: 568 - required: true - - variable: group - label: Group ID - description: The group id that Sonarr will run as. - schema: - type: int - min: 2 - default: 568 - required: true - - - variable: sonarrNetwork - label: "" - group: Network Configuration - schema: - type: dict - attrs: - - variable: webPort - label: Web Port - description: The port for the Sonarr Web UI. - schema: - type: int - default: 30027 - min: 9000 - max: 65535 - required: true - - variable: hostNetwork - label: Host Network - description: | - Bind to the host network. It's recommended to keep this disabled.
- schema: - type: boolean - default: false - - - variable: sonarrStorage - label: "" - group: Storage Configuration - schema: - type: dict - attrs: - - variable: config - label: Sonarr Config Storage - description: The path to store Sonarr Configuration. - schema: - type: dict - attrs: - - variable: type - label: Type - description: | - ixVolume: Is dataset created automatically by the system.
- Host Path: Is a path that already exists on the system. - schema: - type: string - required: true - default: "ixVolume" - enum: - - value: "hostPath" - description: Host Path (Path that already exists on the system) - - value: "ixVolume" - description: ixVolume (Dataset created automatically by the system) - - variable: datasetName - label: Dataset Name - schema: - type: string - show_if: [["type", "=", "ixVolume"]] - required: true - hidden: true - immutable: true - default: "config" - $ref: - - "normalize/ixVolume" - - variable: hostPath - label: Host Path - schema: - type: hostpath - show_if: [["type", "=", "hostPath"]] - immutable: true - required: true - - variable: additionalStorages - label: Additional Storage - description: Additional storage for Sonarr. - schema: - type: list - default: [] - items: - - variable: storageEntry - label: Storage Entry - schema: - type: dict - attrs: - - variable: type - label: Type - description: | - ixVolume: Is dataset created automatically by the system.
- Host Path: Is a path that already exists on the system. - schema: - type: string - required: true - default: "ixVolume" - enum: - - value: "hostPath" - description: Host Path (Path that already exists on the system) - - value: "ixVolume" - description: ixVolume (Dataset created automatically by the system) - - value: "smb-pv-pvc" - description: SMB Share (Mounts a persistent volume claim to a SMB share) - - variable: mountPath - label: Mount Path - description: The path inside the container to mount the storage. - schema: - type: path - required: true - - variable: hostPath - label: Host Path - description: The host path to use for storage. - schema: - type: hostpath - show_if: [["type", "=", "hostPath"]] - required: true - - variable: datasetName - label: Dataset Name - description: The name of the dataset to use for storage. - schema: - type: string - show_if: [["type", "=", "ixVolume"]] - required: true - immutable: true - default: "storage_entry" - $ref: - - "normalize/ixVolume" - - variable: server - label: Server - description: The server for the SMB share. - schema: - type: string - show_if: [["type", "=", "smb-pv-pvc"]] - required: true - - variable: share - label: Share - description: The share name for the SMB share. - schema: - type: string - show_if: [["type", "=", "smb-pv-pvc"]] - required: true - - variable: domain - label: Domain (Optional) - description: The domain for the SMB share. - schema: - type: string - show_if: [["type", "=", "smb-pv-pvc"]] - - variable: username - label: Username - description: The username for the SMB share. - schema: - type: string - show_if: [["type", "=", "smb-pv-pvc"]] - required: true - - variable: password - label: Password - description: The password for the SMB share. - schema: - type: string - show_if: [["type", "=", "smb-pv-pvc"]] - required: true - private: true - - variable: size - label: Size (in Gi) - description: The size of the volume quota. - schema: - type: int - show_if: [["type", "=", "smb-pv-pvc"]] - required: true - min: 1 - default: 1 - - - variable: resources - group: Resources Configuration - label: "" - schema: - type: dict - attrs: - - variable: limits - label: Limits - schema: - type: dict - attrs: - - variable: cpu - label: CPU - description: CPU limit for Sonarr. - schema: - type: string - max_length: 6 - valid_chars: '^(0\.[1-9]|[1-9][0-9]*)(\.[0-9]|m?)$' - valid_chars_error: | - Valid CPU limit formats are
- - Plain Integer - eg. 1
- - Float - eg. 0.5
- - Milicpu - eg. 500m - default: "4000m" - required: true - - variable: memory - label: Memory - description: Memory limit for Sonarr. - schema: - type: string - max_length: 12 - valid_chars: '^[1-9][0-9]*([EPTGMK]i?|e[0-9]+)?$' - valid_chars_error: | - Valid Memory limit formats are
- - Suffixed with E/P/T/G/M/K - eg. 1G
- - Suffixed with Ei/Pi/Ti/Gi/Mi/Ki - eg. 1Gi
- - Plain Integer in bytes - eg. 1024
- - Exponent - eg. 134e6 - default: "8Gi" - required: true diff --git a/library/ix-dev/test/sonarr/templates/NOTES.txt b/library/ix-dev/test/sonarr/templates/NOTES.txt deleted file mode 100644 index ba4e01146c..0000000000 --- a/library/ix-dev/test/sonarr/templates/NOTES.txt +++ /dev/null @@ -1 +0,0 @@ -{{ include "ix.v1.common.lib.chart.notes" $ }} diff --git a/library/ix-dev/test/sonarr/templates/_portal.tpl b/library/ix-dev/test/sonarr/templates/_portal.tpl deleted file mode 100644 index 88e40c57bc..0000000000 --- a/library/ix-dev/test/sonarr/templates/_portal.tpl +++ /dev/null @@ -1,12 +0,0 @@ -{{- define "sonarr.portal" -}} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: portal -data: - path: "/" - port: {{ .Values.sonarrNetwork.webPort | quote }} - protocol: http - host: $node_ip -{{- end -}} diff --git a/library/ix-dev/test/sonarr/templates/_sonarr.tpl b/library/ix-dev/test/sonarr/templates/_sonarr.tpl deleted file mode 100644 index 3c2b23b868..0000000000 --- a/library/ix-dev/test/sonarr/templates/_sonarr.tpl +++ /dev/null @@ -1,112 +0,0 @@ -{{- define "sonarr.workload" -}} -workload: - sonarr: - enabled: true - primary: true - type: Deployment - podSpec: - hostNetwork: {{ .Values.sonarrNetwork.hostNetwork }} - containers: - sonarr: - enabled: true - primary: true - imageSelector: image - securityContext: - runAsUser: {{ .Values.sonarrRunAs.user }} - runAsGroup: {{ .Values.sonarrRunAs.group }} - env: - SONARR__PORT: {{ .Values.sonarrNetwork.webPort }} - SONARR__INSTANCE_NAME: {{ .Values.sonarrConfig.instanceName }} - {{ with .Values.sonarrConfig.additionalEnvs }} - envList: - {{ range $env := . }} - - name: {{ $env.name }} - value: {{ $env.value }} - {{ end }} - {{ end }} - probes: - liveness: - enabled: true - type: http - port: "{{ .Values.sonarrNetwork.webPort }}" - path: /ping - readiness: - enabled: true - type: http - port: "{{ .Values.sonarrNetwork.webPort }}" - path: /ping - startup: - enabled: true - type: http - port: "{{ .Values.sonarrNetwork.webPort }}" - path: /ping - initContainers: - {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions" - "UID" .Values.sonarrRunAs.user - "GID" .Values.sonarrRunAs.group - "mode" "check" - "type" "init") | nindent 8 }} - -{{/* Service */}} -service: - sonarr: - enabled: true - primary: true - type: NodePort - targetSelector: sonarr - ports: - webui: - enabled: true - primary: true - port: {{ .Values.sonarrNetwork.webPort }} - nodePort: {{ .Values.sonarrNetwork.webPort }} - targetSelector: sonarr - -{{/* Persistence */}} -persistence: - config: - enabled: true - type: {{ .Values.sonarrStorage.config.type }} - datasetName: {{ .Values.sonarrStorage.config.datasetName | default "" }} - hostPath: {{ .Values.sonarrStorage.config.hostPath | default "" }} - targetSelector: - sonarr: - sonarr: - mountPath: /config - 01-permissions: - mountPath: /mnt/directories/config - tmp: - enabled: true - type: emptyDir - targetSelector: - sonarr: - sonarr: - mountPath: /tmp - {{- range $idx, $storage := .Values.sonarrStorage.additionalStorages }} - {{ printf "sonarr-%v" (int $idx) }}: - {{- $size := "" -}} - {{- if $storage.size -}} - {{- $size = (printf "%vGi" $storage.size) -}} - {{- end }} - enabled: true - type: {{ $storage.type }} - datasetName: {{ $storage.datasetName | default "" }} - hostPath: {{ $storage.hostPath | default "" }} - server: {{ $storage.server | default "" }} - share: {{ $storage.share | default "" }} - domain: {{ $storage.domain | default "" }} - username: {{ $storage.username | default "" }} - password: {{ $storage.password | default "" }} - size: {{ $size }} - {{- if eq $storage.type "smb-pv-pvc" }} - mountOptions: - - key: noperm - {{- end }} - targetSelector: - sonarr: - sonarr: - mountPath: {{ $storage.mountPath }} - 01-permissions: - mountPath: /mnt/directories{{ $storage.mountPath }} - {{- end }} -{{- end -}} diff --git a/library/ix-dev/test/sonarr/templates/common.yaml b/library/ix-dev/test/sonarr/templates/common.yaml deleted file mode 100644 index 23242cb8d3..0000000000 --- a/library/ix-dev/test/sonarr/templates/common.yaml +++ /dev/null @@ -1,9 +0,0 @@ -{{- include "ix.v1.common.loader.init" . -}} - -{{/* Merge the templates with Values */}} -{{- $_ := mustMergeOverwrite .Values (include "sonarr.workload" $ | fromYaml) -}} - -{{/* Create the configmap for portal manually*/}} -{{- include "sonarr.portal" $ -}} - -{{- include "ix.v1.common.loader.apply" . -}} diff --git a/library/ix-dev/test/sonarr/upgrade_info.json b/library/ix-dev/test/sonarr/upgrade_info.json deleted file mode 100644 index 767388094a..0000000000 --- a/library/ix-dev/test/sonarr/upgrade_info.json +++ /dev/null @@ -1 +0,0 @@ -{"filename": "values.yaml", "keys": ["image"]} diff --git a/library/ix-dev/test/sonarr/upgrade_strategy_disable b/library/ix-dev/test/sonarr/upgrade_strategy_disable deleted file mode 100644 index 3e49862388..0000000000 --- a/library/ix-dev/test/sonarr/upgrade_strategy_disable +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/python3 -import json -import re -import sys - -from catalog_update.upgrade_strategy import semantic_versioning - - -RE_STABLE_VERSION = re.compile(r'[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+') - - -def newer_mapping(image_tags): - key = list(image_tags.keys())[0] - tags = {t: t for t in image_tags[key] if RE_STABLE_VERSION.fullmatch(t)} - version = semantic_versioning(list(tags)) - if not version: - return {} - - return { - 'tags': {key: tags[version]}, - 'app_version': version, - } - - -if __name__ == '__main__': - try: - versions_json = json.loads(sys.stdin.read()) - except ValueError: - raise ValueError('Invalid json specified') - - print(json.dumps(newer_mapping(versions_json))) diff --git a/library/ix-dev/test/sonarr/values.yaml b/library/ix-dev/test/sonarr/values.yaml deleted file mode 100644 index c14da6f89b..0000000000 --- a/library/ix-dev/test/sonarr/values.yaml +++ /dev/null @@ -1,24 +0,0 @@ -image: - repository: ghcr.io/onedr0p/sonarr - pullPolicy: IfNotPresent - tag: '3.0.10.1567' - -resources: - limits: - cpu: 4000m - memory: 8Gi - -sonarrConfig: - instanceName: Sonarr - additionalEnvs: [] -sonarrNetwork: - webPort: 30027 - hostNetwork: false -sonarrRunAs: - user: 568 - group: 568 -sonarrStorage: - config: - type: ixVolume - datasetName: config - additionalStorages: []