Эх сурвалжийг харах

Publish new changes in catalog

sonicaj 1 жил өмнө
parent
commit
bb80d8f7bb

+ 6 - 0
community/audiobookshelf/1.0.0/Chart.lock

@@ -0,0 +1,6 @@
+dependencies:
+- name: common
+  repository: file://../../../common
+  version: 1.2.9
+digest: sha256:af1a9a1f87e3e48453c9f25f909f5ebcd7fa6e25162b7b425448ba752bcdbc5c
+generated: "2024-03-25T09:44:39.2606429-05:00"

+ 26 - 0
community/audiobookshelf/1.0.0/Chart.yaml

@@ -0,0 +1,26 @@
+name: audiobookshelf
+description: Audiobookshelf is a self-hosted audiobook and podcast server
+annotations:
+  title: Audiobookshelf
+type: application
+version: 1.0.0
+apiVersion: v2
+appVersion: 2.8.1
+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.9
+home: https://www.audiobookshelf.org/
+icon: https://media.sys.truenas.net/apps/audiobookshelf/icons/icon.svg
+sources:
+  - https://ghcr.io/advplyr/audiobookshelf
+  - https://github.com/truenas/charts/tree/master/library/ix-dev/community/audiobookshelf
+  - https://github.com/advplyr/audiobookshelf
+keywords:
+  - media
+  - audiobook

+ 9 - 0
community/audiobookshelf/1.0.0/README.md

@@ -0,0 +1,9 @@
+# Audiobookshelf
+
+[Audiobookshelf](https://www.audiobookshelf.org/) is a self-hosted audiobook and podcast server.
+
+> The following applies only when the storage type is set to **ixVolume**
+> When application is installed, a container will be launched with **root** privileges.
+> This is required in order to apply the correct permissions to the `Audiobookshelf` directories.
+> Afterward, the `Audiobookshelf` 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.

+ 9 - 0
community/audiobookshelf/1.0.0/app-readme.md

@@ -0,0 +1,9 @@
+# Audiobookshelf
+
+[Audiobookshelf](https://www.audiobookshelf.org/) is a self-hosted audiobook and podcast server.
+
+> The following applies only when the storage type is set to **ixVolume**
+> When application is installed, a container will be launched with **root** privileges.
+> This is required in order to apply the correct permissions to the `Audiobookshelf` directories.
+> Afterward, the `Audiobookshelf` 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.

BIN
community/audiobookshelf/1.0.0/charts/common-1.2.9.tgz


+ 12 - 0
community/audiobookshelf/1.0.0/ci/basic-values.yaml

@@ -0,0 +1,12 @@
+audiobookshelfNetwork:
+  webPort: 31000
+
+audiobookshelfRunAs:
+  user: 1000
+  group: 1000
+
+audiobookshelfStorage:
+  config:
+    type: pvc
+  metadata:
+    type: pvc

+ 13 - 0
community/audiobookshelf/1.0.0/ci/extra-values.yaml

@@ -0,0 +1,13 @@
+audiobookshelfNetwork:
+  webPort: 31000
+
+audiobookshelfStorage:
+  config:
+    type: pvc
+  metadata:
+    type: pvc
+  additionalStorages:
+  - type: pvc
+    mountPath: /data1
+  - type: pvc
+    mountPath: /data2

+ 28 - 0
community/audiobookshelf/1.0.0/ix_values.yaml

@@ -0,0 +1,28 @@
+image:
+  repository: ghcr.io/advplyr/audiobookshelf
+  pullPolicy: IfNotPresent
+  tag: 2.8.1
+
+resources:
+  limits:
+    cpu: 4000m
+    memory: 8Gi
+
+audiobookshelfConfig:
+  additionalEnvs: []
+audiobookshelfNetwork:
+  webPort: 30067
+  hostNetwork: false
+audiobookshelfRunAs:
+  user: 568
+  group: 568
+audiobookshelfStorage:
+  config:
+    type: ixVolume
+    ixVolumeConfig:
+      datasetName: config
+  metadata:
+    type: ixVolume
+    ixVolumeConfig:
+      datasetName: metadata
+  additionalStorages: []

+ 8 - 0
community/audiobookshelf/1.0.0/metadata.yaml

@@ -0,0 +1,8 @@
+runAsContext:
+  - userName: audiobookshelf
+    groupName: audiobookshelf
+    gid: 568
+    uid: 568
+    description: Audiobookshelf can run as any non-root user.
+capabilities: []
+hostMounts: []

+ 456 - 0
community/audiobookshelf/1.0.0/questions.yaml

@@ -0,0 +1,456 @@
+groups:
+  - name: Audiobookshelf Configuration
+    description: Configure Audiobookshelf
+  - name: User and Group Configuration
+    description: Configure User and Group for Audiobookshelf
+  - name: Network Configuration
+    description: Configure Network for Audiobookshelf
+  - name: Storage Configuration
+    description: Configure Storage for Audiobookshelf
+  - name: Resources Configuration
+    description: Configure Resources for Audiobookshelf
+
+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: TZ
+    group: Audiobookshelf Configuration
+    label: Timezone
+    schema:
+      type: string
+      default: Etc/UTC
+      required: true
+      $ref:
+        - definitions/timezone
+
+  - variable: audiobookshelfConfig
+    label: ""
+    group: Audiobookshelf Configuration
+    schema:
+      type: dict
+      attrs:
+        - variable: additionalEnvs
+          label: Additional Environment Variables
+          description: Configure additional environment variables for Audiobookshelf.
+          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: audiobookshelfRunAs
+    label: ""
+    group: User and Group Configuration
+    schema:
+      type: dict
+      attrs:
+        - variable: user
+          label: User ID
+          description: The user id that Audiobookshelf will run as.
+          schema:
+            type: int
+            min: 2
+            default: 568
+            required: true
+        - variable: group
+          label: Group ID
+          description: The group id that Audiobookshelf will run as.
+          schema:
+            type: int
+            min: 2
+            default: 568
+            required: true
+
+  - variable: audiobookshelfNetwork
+    label: ""
+    group: Network Configuration
+    schema:
+      type: dict
+      attrs:
+        - variable: webPort
+          label: Web Port
+          description: The port for the Audiobookshelf Web UI.
+          schema:
+            type: int
+            default: 30067
+            min: 9000
+            max: 65535
+            required: true
+        - variable: hostNetwork
+          label: Host Network
+          description: |
+            Bind to the host network. It's recommended to keep this disabled.</br>
+          schema:
+            type: boolean
+            default: false
+
+  - variable: audiobookshelfStorage
+    label: ""
+    group: Storage Configuration
+    schema:
+      type: dict
+      attrs:
+        - variable: config
+          label: Audiobookshelf Config Storage
+          description: The path to store Audiobookshelf Configuration and Database.
+          schema:
+            type: dict
+            attrs:
+              - variable: type
+                label: Type
+                description: |
+                  ixVolume: Is dataset created automatically by the system.</br>
+                  Host Path: Is a path that already exists on the system.
+                schema:
+                  type: string
+                  required: true
+                  immutable: 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: ixVolumeConfig
+                label: ixVolume Configuration
+                description: The configuration for the ixVolume dataset.
+                schema:
+                  type: dict
+                  show_if: [["type", "=", "ixVolume"]]
+                  $ref:
+                    - "normalize/ixVolume"
+                  attrs:
+                    - variable: aclEnable
+                      label: Enable ACL
+                      description: Enable ACL for the dataset.
+                      schema:
+                        type: boolean
+                        default: false
+                    - variable: datasetName
+                      label: Dataset Name
+                      description: The name of the dataset to use for storage.
+                      schema:
+                        type: string
+                        required: true
+                        immutable: true
+                        hidden: true
+                        default: "config"
+                    - variable: aclEntries
+                      label: ACL Configuration
+                      schema:
+                        type: dict
+                        show_if: [["aclEnable", "=", true]]
+                        attrs: []
+              - variable: hostPathConfig
+                label: Host Path Configuration
+                schema:
+                  type: dict
+                  show_if: [["type", "=", "hostPath"]]
+                  attrs:
+                    - variable: aclEnable
+                      label: Enable ACL
+                      description: Enable ACL for the dataset.
+                      schema:
+                        type: boolean
+                        default: false
+                    - variable: acl
+                      label: ACL Configuration
+                      schema:
+                        type: dict
+                        show_if: [["aclEnable", "=", true]]
+                        attrs: []
+                        $ref:
+                          - "normalize/acl"
+                    - variable: hostPath
+                      label: Host Path
+                      description: The host path to use for storage.
+                      schema:
+                        type: hostpath
+                        show_if: [["aclEnable", "=", false]]
+                        required: true
+
+        - variable: metadata
+          label: Audiobookshelf Metadata Storage
+          description: The path to store Audiobookshelf cache, streams, covers, downloads, backups and logs.
+          schema:
+            type: dict
+            attrs:
+              - variable: type
+                label: Type
+                description: |
+                  ixVolume: Is dataset created automatically by the system.</br>
+                  Host Path: Is a path that already exists on the system.
+                schema:
+                  type: string
+                  required: true
+                  immutable: 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: ixVolumeConfig
+                label: ixVolume Configuration
+                description: The configuration for the ixVolume dataset.
+                schema:
+                  type: dict
+                  show_if: [["type", "=", "ixVolume"]]
+                  $ref:
+                    - "normalize/ixVolume"
+                  attrs:
+                    - variable: aclEnable
+                      label: Enable ACL
+                      description: Enable ACL for the dataset.
+                      schema:
+                        type: boolean
+                        default: false
+                    - variable: datasetName
+                      label: Dataset Name
+                      description: The name of the dataset to use for storage.
+                      schema:
+                        type: string
+                        required: true
+                        immutable: true
+                        hidden: true
+                        default: "metadata"
+                    - variable: aclEntries
+                      label: ACL Configuration
+                      schema:
+                        type: dict
+                        show_if: [["aclEnable", "=", true]]
+                        attrs: []
+              - variable: hostPathConfig
+                label: Host Path Configuration
+                schema:
+                  type: dict
+                  show_if: [["type", "=", "hostPath"]]
+                  attrs:
+                    - variable: aclEnable
+                      label: Enable ACL
+                      description: Enable ACL for the dataset.
+                      schema:
+                        type: boolean
+                        default: false
+                    - variable: acl
+                      label: ACL Configuration
+                      schema:
+                        type: dict
+                        show_if: [["aclEnable", "=", true]]
+                        attrs: []
+                        $ref:
+                          - "normalize/acl"
+                    - variable: hostPath
+                      label: Host Path
+                      description: The host path to use for storage.
+                      schema:
+                        type: hostpath
+                        show_if: [["aclEnable", "=", false]]
+                        required: true
+
+        - variable: additionalStorages
+          label: Additional Storage
+          description: Additional storage for Audiobookshelf.
+          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.</br>
+                        Host Path: Is a path that already exists on the system.</br>
+                        SMB Share: Is a SMB share that is mounted to a persistent volume claim.
+                      schema:
+                        type: string
+                        required: true
+                        default: "ixVolume"
+                        immutable: true
+                        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: readOnly
+                      label: Read Only
+                      description: Mount the volume as read only.
+                      schema:
+                        type: boolean
+                        default: false
+                    - variable: mountPath
+                      label: Mount Path
+                      description: The path inside the container to mount the storage.
+                      schema:
+                        type: path
+                        required: true
+                    - variable: hostPathConfig
+                      label: Host Path Configuration
+                      schema:
+                        type: dict
+                        show_if: [["type", "=", "hostPath"]]
+                        attrs:
+                          - variable: aclEnable
+                            label: Enable ACL
+                            description: Enable ACL for the dataset.
+                            schema:
+                              type: boolean
+                              default: false
+                          - variable: acl
+                            label: ACL Configuration
+                            schema:
+                              type: dict
+                              show_if: [["aclEnable", "=", true]]
+                              attrs: []
+                              $ref:
+                                - "normalize/acl"
+                          - variable: hostPath
+                            label: Host Path
+                            description: The host path to use for storage.
+                            schema:
+                              type: hostpath
+                              show_if: [["aclEnable", "=", false]]
+                              required: true
+                    - variable: ixVolumeConfig
+                      label: ixVolume Configuration
+                      description: The configuration for the ixVolume dataset.
+                      schema:
+                        type: dict
+                        show_if: [["type", "=", "ixVolume"]]
+                        $ref:
+                          - "normalize/ixVolume"
+                        attrs:
+                          - variable: aclEnable
+                            label: Enable ACL
+                            description: Enable ACL for the dataset.
+                            schema:
+                              type: boolean
+                              default: false
+                          - variable: datasetName
+                            label: Dataset Name
+                            description: The name of the dataset to use for storage.
+                            schema:
+                              type: string
+                              required: true
+                              immutable: true
+                              default: "storage_entry"
+                          - variable: aclEntries
+                            label: ACL Configuration
+                            schema:
+                              type: dict
+                              show_if: [["aclEnable", "=", true]]
+                              attrs: []
+                    - variable: smbConfig
+                      label: SMB Share Configuration
+                      description: The configuration for the SMB Share.
+                      schema:
+                        type: dict
+                        show_if: [["type", "=", "smb-pv-pvc"]]
+                        attrs:
+                          - variable: server
+                            label: Server
+                            description: The server for the SMB share.
+                            schema:
+                              type: string
+                              required: true
+                          - variable: share
+                            label: Share
+                            description: The share name for the SMB share.
+                            schema:
+                              type: string
+                              required: true
+                          - variable: domain
+                            label: Domain (Optional)
+                            description: The domain for the SMB share.
+                            schema:
+                              type: string
+                          - variable: username
+                            label: Username
+                            description: The username for the SMB share.
+                            schema:
+                              type: string
+                              required: true
+                          - variable: password
+                            label: Password
+                            description: The password for the SMB share.
+                            schema:
+                              type: string
+                              required: true
+                              private: true
+                          - variable: size
+                            label: Size (in Gi)
+                            description: The size of the volume quota.
+                            schema:
+                              type: int
+                              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 Audiobookshelf.
+                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</br>
+                    - Plain Integer - eg. 1</br>
+                    - Float - eg. 0.5</br>
+                    - Milicpu - eg. 500m
+                  default: "4000m"
+                  required: true
+              - variable: memory
+                label: Memory
+                description: Memory limit for Audiobookshelf.
+                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</br>
+                    - Suffixed with E/P/T/G/M/K - eg. 1G</br>
+                    - Suffixed with Ei/Pi/Ti/Gi/Mi/Ki - eg. 1Gi</br>
+                    - Plain Integer in bytes - eg. 1024</br>
+                    - Exponent - eg. 134e6
+                  default: "8Gi"
+                  required: true

+ 1 - 0
community/audiobookshelf/1.0.0/templates/NOTES.txt

@@ -0,0 +1 @@
+{{ include "ix.v1.common.lib.chart.notes" $ }}

+ 50 - 0
community/audiobookshelf/1.0.0/templates/_audiobookshelf.tpl

@@ -0,0 +1,50 @@
+{{- define "audiobookshelf.workload" -}}
+workload:
+  audiobookshelf:
+    enabled: true
+    primary: true
+    type: Deployment
+    podSpec:
+      hostNetwork: {{ .Values.audiobookshelfNetwork.hostNetwork }}
+      containers:
+        audiobookshelf:
+          enabled: true
+          primary: true
+          imageSelector: image
+          securityContext:
+            runAsUser: {{ .Values.audiobookshelfRunAs.user }}
+            runAsGroup: {{ .Values.audiobookshelfRunAs.group }}
+          env:
+            PORT: {{ .Values.audiobookshelfNetwork.webPort }}
+            CONFIG_PATH: /config
+            METADATA_PATH: /metadata
+          {{ with .Values.audiobookshelfConfig.additionalEnvs }}
+          envList:
+            {{ range $env := . }}
+            - name: {{ $env.name }}
+              value: {{ $env.value }}
+            {{ end }}
+          {{ end }}
+          probes:
+            liveness:
+              enabled: true
+              type: http
+              port: "{{ .Values.audiobookshelfNetwork.webPort }}"
+              path: /healthcheck
+            readiness:
+              enabled: true
+              type: http
+              port: "{{ .Values.audiobookshelfNetwork.webPort }}"
+              path: /healthcheck
+            startup:
+              enabled: true
+              type: http
+              port: "{{ .Values.audiobookshelfNetwork.webPort }}"
+              path: /healthcheck
+      initContainers:
+      {{- include "ix.v1.common.app.permissions" (dict "containerName" "01-permissions"
+                                                        "UID" .Values.audiobookshelfRunAs.user
+                                                        "GID" .Values.audiobookshelfRunAs.group
+                                                        "mode" "check"
+                                                        "type" "install") | nindent 8 }}
+{{- end -}}

+ 40 - 0
community/audiobookshelf/1.0.0/templates/_persistence.tpl

@@ -0,0 +1,40 @@
+{{- define "audiobookshelf.persistence" -}}
+persistence:
+  config:
+    enabled: true
+    {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.audiobookshelfStorage.config) | nindent 4 }}
+    targetSelector:
+      audiobookshelf:
+        audiobookshelf:
+          mountPath: /config
+        {{- if and (eq .Values.audiobookshelfStorage.config.type "ixVolume")
+                  (not (.Values.audiobookshelfStorage.config.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories/config
+        {{- end }}
+  metadata:
+    enabled: true
+    {{- include "ix.v1.common.app.storageOptions" (dict "storage" .Values.audiobookshelfStorage.metadata) | nindent 4 }}
+    targetSelector:
+      audiobookshelf:
+        audiobookshelf:
+          mountPath: /metadata
+        {{- if and (eq .Values.audiobookshelfStorage.metadata.type "ixVolume")
+                  (not (.Values.audiobookshelfStorage.metadata.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories/metadata
+        {{- end }}
+  {{- range $idx, $storage := .Values.audiobookshelfStorage.additionalStorages }}
+  {{ printf "audiobookshelf-%v:" (int $idx) }}
+    enabled: true
+    {{- include "ix.v1.common.app.storageOptions" (dict "storage" $storage) | nindent 4 }}
+    targetSelector:
+      audiobookshelf:
+        audiobookshelf:
+          mountPath: {{ $storage.mountPath }}
+        {{- if and (eq $storage.type "ixVolume") (not ($storage.ixVolumeConfig | default dict).aclEnable) }}
+        01-permissions:
+          mountPath: /mnt/directories{{ $storage.mountPath }}
+        {{- end }}
+  {{- end }}
+{{- end -}}

+ 12 - 0
community/audiobookshelf/1.0.0/templates/_portal.tpl

@@ -0,0 +1,12 @@
+{{- define "audiobookshelf.portal" -}}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: portal
+data:
+  path: "/"
+  port: {{ .Values.audiobookshelfNetwork.webPort | quote }}
+  protocol: http
+  host: $node_ip
+{{- end -}}

+ 15 - 0
community/audiobookshelf/1.0.0/templates/_service.tpl

@@ -0,0 +1,15 @@
+{{- define "audiobookshelf.service" -}}
+service:
+  audiobookshelf:
+    enabled: true
+    primary: true
+    type: NodePort
+    targetSelector: audiobookshelf
+    ports:
+      webui:
+        enabled: true
+        primary: true
+        port: {{ .Values.audiobookshelfNetwork.webPort }}
+        nodePort: {{ .Values.audiobookshelfNetwork.webPort }}
+        targetSelector: audiobookshelf
+{{- end -}}

+ 11 - 0
community/audiobookshelf/1.0.0/templates/common.yaml

@@ -0,0 +1,11 @@
+{{- include "ix.v1.common.loader.init" . -}}
+
+{{/* Merge the templates with Values */}}
+{{- $_ := mustMergeOverwrite .Values (include "audiobookshelf.workload" $ | fromYaml) -}}
+{{- $_ := mustMergeOverwrite .Values (include "audiobookshelf.service" $ | fromYaml) -}}
+{{- $_ := mustMergeOverwrite .Values (include "audiobookshelf.persistence" $ | fromYaml) -}}
+
+{{/* Create the configmap for portal manually*/}}
+{{- include "audiobookshelf.portal" $ -}}
+
+{{- include "ix.v1.common.loader.apply" . -}}

+ 10 - 0
community/audiobookshelf/item.yaml

@@ -0,0 +1,10 @@
+icon_url: https://media.sys.truenas.net/apps/audiobookshelf/icons/icon.svg
+screenshots:
+  - https://media.sys.truenas.net/apps/audiobookshelf/screenshots/screenshot1.png
+  - https://media.sys.truenas.net/apps/audiobookshelf/screenshots/screenshot2.png
+  - https://media.sys.truenas.net/apps/audiobookshelf/screenshots/screenshot3.png
+  - https://media.sys.truenas.net/apps/audiobookshelf/screenshots/screenshot4.jpg
+categories:
+  - media
+tags:
+  - audiobook