diff --git a/community/transmission/1.0.0/Chart.lock b/community/transmission/1.0.0/Chart.lock new file mode 100644 index 0000000000..403ea38467 --- /dev/null +++ b/community/transmission/1.0.0/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: file://../../../common + version: 1.1.1 +digest: sha256:a7dbe3e4d42dbcd4325776e5e01a1d630c7f185f79e7ebf22b1b9cc80f56eed7 +generated: "2023-10-16T17:29:21.813857406+03:00" diff --git a/community/transmission/1.0.0/Chart.yaml b/community/transmission/1.0.0/Chart.yaml new file mode 100644 index 0000000000..171cfc8371 --- /dev/null +++ b/community/transmission/1.0.0/Chart.yaml @@ -0,0 +1,27 @@ +name: transmission +description: Transmission is designed for easy, powerful use. +annotations: + title: Transmission +type: application +version: 1.0.0 +apiVersion: v2 +appVersion: 4.0.4 +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://transmissionbt.com/ +icon: https://media.sys.truenas.net/apps/transmission/icons/icon.png +sources: + - https://github.com/onedr0p/containers/tree/main/apps/transmission + - https://github.com/truenas/charts/tree/master/community/transmission + - https://transmissionbt.com/ +keywords: + - media + - torrent + - download diff --git a/community/transmission/1.0.0/README.md b/community/transmission/1.0.0/README.md new file mode 100644 index 0000000000..bd24652324 --- /dev/null +++ b/community/transmission/1.0.0/README.md @@ -0,0 +1,9 @@ +# Transmission + +[Transmission](https://transmissionbt.com/) is designed for easy, powerful use. + +> When application is installed, a container will be launched with **root** privileges. +> This is required in order to apply the correct permissions to the Transmission directories. +> Afterward, the `Transmission` container will run as a **non**-root user (Default: `568`). + +For additional configuration via environment variables, see [Container's source env var list](https://github.com/onedr0p/containers/tree/main/apps/transmission). diff --git a/community/transmission/1.0.0/app-readme.md b/community/transmission/1.0.0/app-readme.md new file mode 100644 index 0000000000..bd24652324 --- /dev/null +++ b/community/transmission/1.0.0/app-readme.md @@ -0,0 +1,9 @@ +# Transmission + +[Transmission](https://transmissionbt.com/) is designed for easy, powerful use. + +> When application is installed, a container will be launched with **root** privileges. +> This is required in order to apply the correct permissions to the Transmission directories. +> Afterward, the `Transmission` container will run as a **non**-root user (Default: `568`). + +For additional configuration via environment variables, see [Container's source env var list](https://github.com/onedr0p/containers/tree/main/apps/transmission). diff --git a/community/transmission/1.0.0/charts/common-1.1.1.tgz b/community/transmission/1.0.0/charts/common-1.1.1.tgz new file mode 100644 index 0000000000..40f6fac483 Binary files /dev/null and b/community/transmission/1.0.0/charts/common-1.1.1.tgz differ diff --git a/community/transmission/1.0.0/ci/basic-values.yaml b/community/transmission/1.0.0/ci/basic-values.yaml new file mode 100644 index 0000000000..9803c056c5 --- /dev/null +++ b/community/transmission/1.0.0/ci/basic-values.yaml @@ -0,0 +1,15 @@ +transmissionNetwork: + webPort: 31000 + peerPort: 31001 + +transmissionRunAs: + user: 1000 + group: 1000 + +transmissionStorage: + config: + type: pvc + downloadsComplete: + type: pvc + downloadsIncomplete: + type: pvc diff --git a/community/transmission/1.0.0/ci/extra-values.yaml b/community/transmission/1.0.0/ci/extra-values.yaml new file mode 100644 index 0000000000..6640d7fdad --- /dev/null +++ b/community/transmission/1.0.0/ci/extra-values.yaml @@ -0,0 +1,29 @@ +sonarrConfig: + additionalEnvs: + - name: TRANSMISSION__SPEED_LIMIT_DOWN + value: 200 + - name: TRANSMISSION__SPEED_LIMIT_UP + value: 100 + - name: TRANSMISSION__RPC_PASSWORD + value: "password" + - name: TRANSMISSION__RPC_USERNAME + value: "username" + - name: TRANSMISSION__RPC_AUTHENTICATION_REQUIRED + value: "true" + +transmissionNetwork: + webPort: 31000 + peerPort: 31001 + +transmissionStorage: + config: + type: pvc + downloadsComplete: + type: pvc + downloadsIncomplete: + type: pvc + additionalStorages: + - type: pvc + mountPath: /data1 + - type: pvc + mountPath: /data2 diff --git a/community/transmission/1.0.0/ci/hostNet-values.yaml b/community/transmission/1.0.0/ci/hostNet-values.yaml new file mode 100644 index 0000000000..d84333132f --- /dev/null +++ b/community/transmission/1.0.0/ci/hostNet-values.yaml @@ -0,0 +1,12 @@ +transmissionNetwork: + webPort: 31000 + peerPort: 31001 + hostNetwork: true + +transmissionStorage: + config: + type: pvc + downloadsComplete: + type: pvc + downloadsIncomplete: + type: pvc diff --git a/community/transmission/1.0.0/ix_values.yaml b/community/transmission/1.0.0/ix_values.yaml new file mode 100644 index 0000000000..51d729ae8a --- /dev/null +++ b/community/transmission/1.0.0/ix_values.yaml @@ -0,0 +1,38 @@ +image: + repository: ghcr.io/onedr0p/transmission + pullPolicy: IfNotPresent + tag: 4.0.4 + +resources: + limits: + cpu: 4000m + memory: 8Gi + +transmissionConfig: + additionalEnvs: [] + +transmissionNetwork: + webPort: 30096 + peerPort: 50413 + hostNetwork: false + +transmissionRunAs: + user: 568 + group: 568 + +transmissionStorage: + config: + type: ixVolume + datasetName: config + downloadsComplete: + type: ixVolume + datasetName: downloads-complete + downloadsIncomplete: + type: ixVolume + datasetName: downloads-incomplete + additionalStorages: [] + +notes: + custom: | + Settings can be configured via Environment Variables. + See https://github.com/onedr0p/containers/tree/main/apps/transmission for available options. diff --git a/community/transmission/1.0.0/metadata.yaml b/community/transmission/1.0.0/metadata.yaml new file mode 100644 index 0000000000..a63091a1bc --- /dev/null +++ b/community/transmission/1.0.0/metadata.yaml @@ -0,0 +1,8 @@ +runAsContext: + - userName: transmission + groupName: transmission + gid: 568 + uid: 568 + description: Transmission can run as any non-root user. +capabilities: [] +hostMounts: [] diff --git a/community/transmission/1.0.0/questions.yaml b/community/transmission/1.0.0/questions.yaml new file mode 100644 index 0000000000..7e6fcaadb9 --- /dev/null +++ b/community/transmission/1.0.0/questions.yaml @@ -0,0 +1,318 @@ +groups: + - name: Transmission Configuration + description: Configure Transmission + - name: User and Group Configuration + description: Configure User and Group for Transmission + - name: Network Configuration + description: Configure Network for Transmission + - name: Storage Configuration + description: Configure Storage for Transmission + - name: Resources Configuration + description: Configure Resources for Transmission + +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: transmissionConfig + label: "" + group: Transmission Configuration + schema: + type: dict + attrs: + - variable: additionalEnvs + label: Additional Environment Variables + description: Configure additional environment variables for Transmission. + 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: transmissionRunAs + label: "" + group: User and Group Configuration + schema: + type: dict + attrs: + - variable: user + label: User ID + description: The user id that Transmission will run as. + schema: + type: int + min: 2 + default: 568 + required: true + - variable: group + label: Group ID + description: The group id that Transmission will run as. + schema: + type: int + min: 2 + default: 568 + required: true + + - variable: transmissionNetwork + label: "" + group: Network Configuration + schema: + type: dict + attrs: + - variable: webPort + label: Web Port + description: The port for the Transmission Web UI. + schema: + type: int + default: 30096 + min: 9000 + max: 65535 + required: true + - variable: peerPort + label: Peer Port + description: The port for the Transmission Torrent protocol. Both TCP and UDP + schema: + type: int + default: 50413 + 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: transmissionStorage + label: "" + group: Storage Configuration + schema: + type: dict + attrs: + - variable: config + label: Transmission Config Storage + description: The path to store Transmission 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: downloadsComplete + label: Transmission Complete Downloads Storage + description: The path to store Transmission Complete Downloads. + 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: "downloads-complete" + $ref: + - "normalize/ixVolume" + - variable: hostPath + label: Host Path + schema: + type: hostpath + show_if: [["type", "=", "hostPath"]] + immutable: true + required: true + - variable: downloadsIncomplete + label: Transmission Incomplete Downloads Storage + description: The path to store Transmission Incomplete Downloads. + 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: "downloads-incomplete" + $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: Transmission additional storage + 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) + - 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: resources + label: Resources Configuration + group: Resources Configuration + schema: + type: dict + attrs: + - variable: limits + label: Limits + schema: + type: dict + attrs: + - variable: cpu + label: CPU + description: CPU limit for Transmission. + 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 Transmission. + 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/community/transmission/1.0.0/templates/NOTES.txt b/community/transmission/1.0.0/templates/NOTES.txt new file mode 100644 index 0000000000..ba4e01146c --- /dev/null +++ b/community/transmission/1.0.0/templates/NOTES.txt @@ -0,0 +1 @@ +{{ include "ix.v1.common.lib.chart.notes" $ }} diff --git a/community/transmission/1.0.0/templates/_configuration.tpl b/community/transmission/1.0.0/templates/_configuration.tpl new file mode 100644 index 0000000000..3e608dc4d2 --- /dev/null +++ b/community/transmission/1.0.0/templates/_configuration.tpl @@ -0,0 +1,13 @@ +{{- define "transmission.configuration" -}} +configmap: + transmission-config: + enabled: true + data: + TRANSMISSION__RPC_ENABLED: "true" + TRANSMISSION__RPC_BIND_ADDRESS: "0.0.0.0" + TRANSMISSION__RPC_PORT: {{ .Values.transmissionNetwork.webPort | quote }} + TRANSMISSION__PEER_PORT: {{ .Values.transmissionNetwork.peerPort | quote }} + TRANSMISSION__DOWNLOAD_DIR: "/downloads/complete" + TRANSMISSION__INCOMPLETE_DIR_ENABLED: "true" + TRANSMISSION__INCOMPLETE_DIR: "/downloads/incomplete" +{{- end -}} diff --git a/community/transmission/1.0.0/templates/_persistence.tpl b/community/transmission/1.0.0/templates/_persistence.tpl new file mode 100644 index 0000000000..0dcb88c98f --- /dev/null +++ b/community/transmission/1.0.0/templates/_persistence.tpl @@ -0,0 +1,49 @@ +{{- define "transmission.persistence" -}} +persistence: + config: + enabled: true + type: {{ .Values.transmissionStorage.config.type }} + datasetName: {{ .Values.transmissionStorage.config.datasetName | default "" }} + hostPath: {{ .Values.transmissionStorage.config.hostPath | default "" }} + targetSelector: + transmission: + transmission: + mountPath: /config + 01-permissions: + mountPath: /mnt/directories/config + download-complete: + enabled: true + type: {{ .Values.transmissionStorage.downloadsComplete.type }} + datasetName: {{ .Values.transmissionStorage.downloadsComplete.datasetName | default "" }} + hostPath: {{ .Values.transmissionStorage.downloadsComplete.hostPath | default "" }} + targetSelector: + transmission: + transmission: + mountPath: /downloads/complete + 01-permissions: + mountPath: /mnt/directories/complete + download-incomplete: + enabled: true + type: {{ .Values.transmissionStorage.downloadsIncomplete.type }} + datasetName: {{ .Values.transmissionStorage.downloadsIncomplete.datasetName | default "" }} + hostPath: {{ .Values.transmissionStorage.downloadsIncomplete.hostPath | default "" }} + targetSelector: + transmission: + transmission: + mountPath: /downloads/incomplete + 01-permissions: + mountPath: /mnt/directories/incomplete + {{- range $idx, $storage := .Values.transmissionStorage.additionalStorages }} + {{ printf "transmission-%v" (int $idx) }}: + enabled: true + type: {{ $storage.type }} + datasetName: {{ $storage.datasetName | default "" }} + hostPath: {{ $storage.hostPath | default "" }} + targetSelector: + transmission: + transmission: + mountPath: {{ $storage.mountPath }} + 01-permissions: + mountPath: /mnt/directories{{ $storage.mountPath }} + {{- end }} +{{- end -}} diff --git a/community/transmission/1.0.0/templates/_portal.tpl b/community/transmission/1.0.0/templates/_portal.tpl new file mode 100644 index 0000000000..29d7477190 --- /dev/null +++ b/community/transmission/1.0.0/templates/_portal.tpl @@ -0,0 +1,12 @@ +{{- define "transmission.portal" -}} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: portal +data: + path: "/transmission/web" + port: {{ .Values.transmissionNetwork.webPort | quote }} + protocol: http + host: $node_ip +{{- end -}} diff --git a/community/transmission/1.0.0/templates/_service.tpl b/community/transmission/1.0.0/templates/_service.tpl new file mode 100644 index 0000000000..3c8440ffe4 --- /dev/null +++ b/community/transmission/1.0.0/templates/_service.tpl @@ -0,0 +1,32 @@ +{{- define "transmission.service" -}} +service: + transmission: + enabled: true + primary: true + type: NodePort + targetSelector: transmission + ports: + webui: + enabled: true + primary: true + port: {{ .Values.transmissionNetwork.webPort }} + nodePort: {{ .Values.transmissionNetwork.webPort }} + targetSelector: transmission + transmission-peer: + enabled: true + type: NodePort + targetSelector: transmission + ports: + tcp: + enabled: true + primary: true + port: {{ .Values.transmissionNetwork.peerPort }} + nodePort: {{ .Values.transmissionNetwork.peerPort }} + targetSelector: transmission + udp: + enabled: true + port: {{ .Values.transmissionNetwork.peerPort }} + nodePort: {{ .Values.transmissionNetwork.peerPort }} + protocol: udp + targetSelector: transmission +{{- end -}} diff --git a/community/transmission/1.0.0/templates/_transmission.tpl b/community/transmission/1.0.0/templates/_transmission.tpl new file mode 100644 index 0000000000..63244c5380 --- /dev/null +++ b/community/transmission/1.0.0/templates/_transmission.tpl @@ -0,0 +1,47 @@ +{{- define "transmission.workload" -}} +workload: + transmission: + enabled: true + primary: true + type: Deployment + podSpec: + hostNetwork: {{ .Values.transmissionNetwork.hostNetwork }} + containers: + transmission: + enabled: true + primary: true + imageSelector: image + securityContext: + runAsUser: {{ .Values.transmissionRunAs.user }} + runAsGroup: {{ .Values.transmissionRunAs.group }} + {{ with .Values.transmissionConfig.additionalEnvs }} + envList: + {{ range $env := . }} + - name: {{ $env.name }} + value: {{ $env.value }} + {{ end }} + {{ end }} + envFrom: + - configMapRef: + name: transmission-config + probes: + liveness: + enabled: true + type: tcp + port: {{ .Values.transmissionNetwork.webPort }} + readiness: + enabled: true + type: tcp + port: {{ .Values.transmissionNetwork.webPort }} + startup: + enabled: true + type: tcp + port: {{ .Values.transmissionNetwork.webPort }} + initContainers: + {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions" + "UID" .Values.transmissionRunAs.user + "GID" .Values.transmissionRunAs.group + "mode" "check" + "type" "init") | nindent 8 }} + +{{- end -}} diff --git a/community/transmission/1.0.0/templates/common.yaml b/community/transmission/1.0.0/templates/common.yaml new file mode 100644 index 0000000000..177a4472a0 --- /dev/null +++ b/community/transmission/1.0.0/templates/common.yaml @@ -0,0 +1,12 @@ +{{- include "ix.v1.common.loader.init" . -}} + +{{/* Merge the templates with Values */}} +{{- $_ := mustMergeOverwrite .Values (include "transmission.workload" $ | fromYaml) -}} +{{- $_ := mustMergeOverwrite .Values (include "transmission.configuration" $ | fromYaml) -}} +{{- $_ := mustMergeOverwrite .Values (include "transmission.service" $ | fromYaml) -}} +{{- $_ := mustMergeOverwrite .Values (include "transmission.persistence" $ | fromYaml) -}} + +{{/* Create the configmap for portal manually*/}} +{{- include "transmission.portal" $ -}} + +{{- include "ix.v1.common.loader.apply" . -}} diff --git a/community/transmission/item.yaml b/community/transmission/item.yaml new file mode 100644 index 0000000000..346878b356 --- /dev/null +++ b/community/transmission/item.yaml @@ -0,0 +1,7 @@ +icon_url: https://media.sys.truenas.net/apps/transmission/icons/icon.png +categories: + - media +screenshots: [] +tags: + - torrent + - download