k8s-at-home / charts

⚠️ Deprecated : Helm charts for applications you run at home
https://docs.k8s-at-home.com
Apache License 2.0
1.45k stars 623 forks source link

[audiobookshelf] persistence values not respected #1550

Closed palmergw closed 2 years ago

palmergw commented 2 years ago

Helm chart name

audiobookshelf

Helm chart version

1.1.1

Container name

ghcr.io/advplyr/audiobookshelf

Container tag

2.0.10

Description

Values specified in the persistence section of the values yaml are ignored and overwritten.

Expected result

When specifying persistence values, they should be respected and not removed from the deployed chart.

Helm values to reproduce

env:
  TZ: America/New York
image:
  pullPolicy: IfNotPresent
  repository: ghcr.io/advplyr/audiobookshelf
  tag: 2.0.10
ingress:
  main:
    enabled: false
persistence:
  config:
    enabled: true
    accessMode: ReadWriteOnce
    mountPath: /config
    size: 1Gi
  media:
    enabled: true
    mountPath: /audiobooks
    existingClaim: readarr-media
    subPath: audiobooks
  metadata:
    enabled: true
    mountPath: /metadata
    size: 1Gi
    accessMode: ReadWriteOnce
service:
  main:
    ports:
      http:
        port: 80
podSecurityContext:
  fsGroup: 568

Additional Information

Immediately upon deploying in Rancher, inspecting the yaml for the installed application shows that persistence values have been nulled out, which is the default for this chart.

apiVersion: catalog.cattle.io/v1
kind: App
metadata:
  annotations:
    objectset.rio.cattle.io/applied: H4sIAAAAAAAA/8xY33PbNhL+V3i4l3ugKFKyHZsznTmf3aaZOo4nlttpa08LAUsSJxDgAKAcXUb/+80CJPXDimOnL30jQXD57e63ux/4mdTgKKeOkvwzoUppR53QyuKtnv8XmLPgEiN0wqhzEhKhx4KTnFQg6xFtGhJ/cZ9+VGBG5XJBcjJeZnH0k1D8u1tgBtxXX1O0BpITWyX4pcSABGohWWYJbbnQc60XtgJZJMvjF9myDWVokENBW+nIOibMgHd2JmqwjtYNyVUrZUwknYN8NgQVtRXJScFPj2gxOTtO53Pg2SSdvGEpm5wen529mc9Pp+kJP52evuH4tc6hXfQkrO+Di4kH/hEKMKAYWJL//pnQRvwMxgqtSE6WGYnJXGq2+IBbL0GC808KKi3EhGnljJYSD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NVZFqlhCrxsfVoUBfZ/F5FEXxC1yIS2ojnxz+j3TDfq3v1j987b/PIn+of/tXPZ1GXia0ESG4xU3PKS/TTOupaO4gV+Ia/fFuFfPD/3vDLLqTvdebX8Z5J2jR2vG33cqOyXmn6YfuPx3YdnNdgBKPja3iMfkX9sd6WYX9/1fWc0hqKuz8npknmD4oHKu7gaCWFfWs0zo/jk1OsseFH0vF6w6fPRM/9kZ+/BdV1LD8ebFuHlonq/P8BAAD//4KXuXK6FwAA
    objectset.rio.cattle.io/id: helm-app
    objectset.rio.cattle.io/owner-gvk: /v1, Kind=Secret
    objectset.rio.cattle.io/owner-name: sh.helm.release.v1.audiobookshelf.v5
    objectset.rio.cattle.io/owner-namespace: default
  creationTimestamp: "2022-05-04T01:09:07Z"
  generation: 10
  labels:
    objectset.rio.cattle.io/hash: fd84af2950bbed12027c0c285997bb8306d8387d
  managedFields:
  - apiVersion: catalog.cattle.io/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .: {}
          f:objectset.rio.cattle.io/applied: {}
          f:objectset.rio.cattle.io/id: {}
          f:objectset.rio.cattle.io/owner-gvk: {}
          f:objectset.rio.cattle.io/owner-name: {}
          f:objectset.rio.cattle.io/owner-namespace: {}
        f:labels:
          .: {}
          f:objectset.rio.cattle.io/hash: {}
        f:ownerReferences:
          .: {}
          k:{"uid":"7f319541-daf3-4c0d-b23a-4083bfea86ae"}: {}
      f:spec:
        .: {}
        f:chart:
          .: {}
          f:metadata:
            .: {}
            f:annotations:
              .: {}
              f:artifacthub.io/changes: {}
              f:catalog.cattle.io/ui-source-repo: {}
              f:catalog.cattle.io/ui-source-repo-type: {}
            f:apiVersion: {}
            f:appVersion: {}
            f:description: {}
            f:home: {}
            f:icon: {}
            f:keywords: {}
            f:kubeVersion: {}
            f:maintainers: {}
            f:name: {}
            f:sources: {}
            f:version: {}
          f:values:
            .: {}
            f:common: {}
            f:env: {}
            f:image: {}
            f:ingress: {}
            f:persistence: {}
            f:service: {}
        f:helmVersion: {}
        f:info:
          .: {}
          f:description: {}
          f:firstDeployed: {}
          f:lastDeployed: {}
          f:notes: {}
          f:readme: {}
          f:status: {}
        f:name: {}
        f:namespace: {}
        f:resources: {}
        f:values:
          .: {}
          f:env: {}
          f:global: {}
          f:image: {}
          f:persistence: {}
          f:podSecurityContext: {}
        f:version: {}
    manager: agent
    operation: Update
    time: "2022-05-04T01:31:27Z"
  - apiVersion: catalog.cattle.io/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:status:
        .: {}
        f:observedGeneration: {}
        f:summary:
          .: {}
          f:state: {}
    manager: agent
    operation: Update
    subresource: status
    time: "2022-05-04T01:31:58Z"
  name: audiobookshelf
  namespace: default
  ownerReferences:
  - apiVersion: v1
    blockOwnerDeletion: false
    controller: true
    kind: Secret
    name: sh.helm.release.v1.audiobookshelf.v5
    uid: 7f319541-daf3-4c0d-b23a-4083bfea86ae
  resourceVersion: "10982505"
  uid: c37faf63-cd4e-40f6-a3e6-1ade743a2f7b
spec:
  chart:
    metadata:
      annotations:
        artifacthub.io/changes: |-
          - kind: changed
            description: Upgraded `common` chart dependency to version 4.4.1
        catalog.cattle.io/ui-source-repo: k8s-at-home
        catalog.cattle.io/ui-source-repo-type: cluster
      apiVersion: v2
      appVersion: 2.0.3
      description: Self-hosted audiobook server for managing and playing your audiobooks
      home: https://github.com/k8s-at-home/charts/tree/master/charts/stable/audiobookshelf
      icon: https://github.com/advplyr/audiobookshelf/blob/master/static/Logo.png
      keywords:
      - audiobookshelf
      - books
      - audiobooks
      kubeVersion: '>= 1.16.0-0'
      maintainers:
      - email: tvories@gmail.com
        name: tvories
      name: audiobookshelf
      sources:
      - https://github.com/advplyr/audiobookshelf
      version: 1.1.1
    values:
      common:
        additionalContainers: {}
        addons:
          codeserver:
            args:
            - --auth
            - none
            enabled: false
            env: {}
            git:
              deployKey: ""
              deployKeyBase64: ""
              deployKeySecret: ""
            image:
              pullPolicy: IfNotPresent
              repository: codercom/code-server
              tag: 3.9.2
            ingress:
              annotations: {}
              enabled: false
              hosts:
              - host: code.chart-example.local
                paths:
                - path: /
                  pathType: Prefix
              labels: {}
              tls: null
            securityContext:
              runAsUser: 0
            service:
              annotations: {}
              enabled: true
              labels: {}
              ports:
                codeserver:
                  enabled: true
                  port: 12321
                  protocol: TCP
                  targetPort: codeserver
              type: ClusterIP
            volumeMounts: null
            workingDir: ""
          netshoot:
            enabled: false
            env: {}
            image:
              pullPolicy: Always
              repository: nicolaka/netshoot
              tag: latest
            securityContext:
              capabilities:
                add:
                - NET_ADMIN
          promtail:
            args: null
            enabled: false
            env: {}
            image:
              pullPolicy: IfNotPresent
              repository: grafana/promtail
              tag: 2.2.0
            logs: null
            loki: ""
            securityContext:
              runAsUser: 0
            volumeMounts: null
          vpn:
            additionalVolumeMounts: null
            args: null
            enabled: false
            env: {}
            livenessProbe: {}
            networkPolicy:
              annotations: {}
              enabled: false
              labels: {}
              podSelectorLabels: {}
            openvpn:
              image:
                pullPolicy: IfNotPresent
                repository: dperson/openvpn-client
                tag: latest
            scripts: {}
            securityContext:
              capabilities:
                add:
                - NET_ADMIN
                - SYS_MODULE
            type: openvpn
            wireguard:
              image:
                pullPolicy: IfNotPresent
                repository: ghcr.io/k8s-at-home/wireguard
                tag: v1.0.20210914
        affinity: {}
        args: null
        automountServiceAccountToken: true
        autoscaling:
          enabled: false
        command: null
        configmap:
          config:
            annotations: {}
            data: {}
            enabled: false
            labels: {}
        controller:
          annotations: {}
          enabled: true
          labels: {}
          replicas: 1
          revisionHistoryLimit: 3
          rollingUpdate: {}
          type: deployment
        dnsConfig: {}
        enableServiceLinks: true
        envFrom: null
        global:
          annotations: {}
          cattle:
            clusterId: c-s7v85
            clusterName: herd1
            rkePathPrefix: ""
            rkeWindowsPathPrefix: ""
            systemDefaultRegistry: ""
            url: https://rancher.plmr.cloud
          labels: {}
          systemDefaultRegistry: ""
        hostAliases: null
        hostNetwork: false
        image: {}
        imagePullSecrets: null
        ingress:
          main:
            annotations: {}
            enabled: false
            hosts:
            - host: chart-example.local
              paths:
              - path: /
                pathType: Prefix
                service:
                  name: null
                  port: null
            labels: {}
            primary: true
            tls: null
        initContainers: {}
        lifecycle: {}
        nodeSelector: {}
        persistence:
          config:
            accessMode: ReadWriteOnce
            enabled: false
            readOnly: false
            retain: false
            size: 1Gi
            type: pvc
          shared:
            enabled: false
            mountPath: /shared
            type: emptyDir
        podAnnotations: {}
        podLabels: {}
        podSecurityContext: {}
        probes:
          liveness:
            custom: false
            enabled: true
            spec:
              failureThreshold: 3
              initialDelaySeconds: 0
              periodSeconds: 10
              timeoutSeconds: 1
          readiness:
            custom: false
            enabled: true
            spec:
              failureThreshold: 3
              initialDelaySeconds: 0
              periodSeconds: 10
              timeoutSeconds: 1
          startup:
            custom: false
            enabled: true
            spec:
              failureThreshold: 30
              initialDelaySeconds: 0
              periodSeconds: 5
              timeoutSeconds: 1
        resources: {}
        secret: {}
        securityContext: {}
        service:
          main:
            annotations: {}
            enabled: true
            ipFamilies: null
            labels: {}
            ports:
              http:
                enabled: true
                primary: true
                protocol: HTTP
            primary: true
            type: ClusterIP
        serviceAccount:
          annotations: {}
          create: false
          name: ""
        termination: {}
        tolerations: null
        topologySpreadConstraints: null
        volumeClaimTemplates: null
      env:
        TZ: UTC
      image:
        pullPolicy: IfNotPresent
        repository: ghcr.io/advplyr/audiobookshelf
        tag: null
      ingress:
        main:
          enabled: false
      persistence: null
      service:
        main:
          ports:
            http:
              port: 80
  helmVersion: 3
  info:
    description: Upgrade complete
    firstDeployed: "2022-05-04T01:09:06Z"
    lastDeployed: "2022-05-04T01:31:26Z"
    notes: |2-

      1. Get the application URL by running these commands:
        export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=audiobookshelf,app.kubernetes.io/instance=audiobookshelf" -o jsonpath="{.items[0].metadata.name}")
        echo "Visit http://127.0.0.1:8080 to use your application"
        kubectl port-forward $POD_NAME 8080:80
    readme: |
      # audiobookshelf

      ![Version: 1.1.1](https://img.shields.io/badge/Version-1.1.1-informational?style=flat-square) ![AppVersion: 2.0.3](https://img.shields.io/badge/AppVersion-2.0.3-informational?style=flat-square)

      Self-hosted audiobook server for managing and playing your audiobooks

      **This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/k8s-at-home/charts/issues/new/choose)**

      ## Source Code

      * <https://github.com/advplyr/audiobookshelf>

      ## Requirements

      Kubernetes: `>= 1.16.0-0`

      ## Dependencies

      | Repository | Name | Version |
      |------------|------|---------|
      | https://library-charts.k8s-at-home.com | common | 4.4.1 |

      ## TL;DR

      ```console
      helm repo add k8s-at-home https://k8s-at-home.com/charts/
      helm repo update
      helm install audiobookshelf k8s-at-home/audiobookshelf
  ## Installing the Chart

  To install the chart with the release name `audiobookshelf`

  ```console
  helm install audiobookshelf k8s-at-home/audiobookshelf
  ```

  ## Uninstalling the Chart

  To uninstall the `audiobookshelf` deployment

  ```console
  helm uninstall audiobookshelf
  ```

  The command removes all the Kubernetes components associated with the chart **including persistent volumes** and deletes the release.

  ## Configuration

  Read through the [values.yaml](./values.yaml) file. It has several commented out suggested values.
  Other values may be used from the [values.yaml](https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml) from the [common library](https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common).

  Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.

  ```console
  helm install audiobookshelf \
    --set env.TZ="America/New York" \
      k8s-at-home/audiobookshelf
  ```

  Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart.

  ```console
  helm install audiobookshelf k8s-at-home/audiobookshelf -f values.yaml
  ```

  ## Custom configuration

  N/A

  ## Values

  **Important**: When deploying an application Helm chart you can add more values from our common library chart [here](https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common)

  | Key | Type | Default | Description |
  |-----|------|---------|-------------|
  | env | object | See below | environment variables. See more environment variables in the [audiobookshelf documentation](https://hub.docker.com/r/advplyr/audiobookshelf) |
  | env.TZ | string | `"UTC"` | Set the container timezone |
  | image.pullPolicy | string | `"IfNotPresent"` | image pull policy |
  | image.repository | string | `"ghcr.io/advplyr/audiobookshelf"` | image repository |
  | image.tag | string | chart.appVersion | image tag |
  | ingress.main | object | See values.yaml | Enable and configure ingress settings for the chart under this key. |
  | persistence | string | See values.yaml | Configure persistence settings for the chart under this key. |
  | service | object | See values.yaml | Configures service settings for the chart. |

  ## Changelog

  ### Version 1.1.1

  #### Added

  N/A

  #### Changed

  * Upgraded `common` chart dependency to version 4.4.1

  #### Fixed

  N/A

  ### Older versions

  A historical overview of changes can be found on [ArtifactHUB](https://artifacthub.io/packages/helm/k8s-at-home/audiobookshelf?modal=changelog)

  ## Support

  - See the [Docs](https://docs.k8s-at-home.com/our-helm-charts/getting-started/)
  - Open an [issue](https://github.com/k8s-at-home/charts/issues/new/choose)
  - Ask a [question](https://github.com/k8s-at-home/organization/discussions)
  - Join our [Discord](https://discord.gg/sTMX7Vh) community

  ----------------------------------------------
  Autogenerated from chart metadata using [helm-docs v0.1.1](https://github.com/k8s-at-home/helm-docs/releases/v0.1.1)
status: deployed

name: audiobookshelf namespace: default resources:



### Repo link

_No response_
onedr0p commented 2 years ago

Are you able to deploy any other chart in our repository? This smells like a Rancher issue but I want to confirm.

bjw-s commented 2 years ago

I am suspecting the same thing, since the chart does not seem to contain any hardcoded overrides.

palmergw commented 2 years ago

I am able to deploy other charts from your repo no problem. What I noticed about this chart being different from the others, is that it loads a default chart like below:

env:
  TZ: UTC
image:
  pullPolicy: IfNotPresent
  repository: ghcr.io/advplyr/audiobookshelf
  tag: null
ingress:
  main:
    enabled: false
persistence: null
service:
  main:
    ports:
      http:
        port: 80

While other charts are often <parameter>: {} instead of null. This doesn't mean it's NOT a Rancher issue, or even a Helm issue, but I had such success with other charts my mind didn't run there first. I do know that none of the other charts I've tried have specifically had persistence as null, or even an empty object if I recall correctly.

Changes to env or image do stick.

bjw-s commented 2 years ago

I've just submitted a potential fix, hopefully this fixes your issue. Please feel free to re-open this issue if the problem still occurs.

palmergw commented 2 years ago

Worked like a charm. Thanks so much!