diff --git a/charts/bookstack/Chart.yaml b/charts/bookstack/Chart.yaml index 2a97020c1..014cde37f 100644 --- a/charts/bookstack/Chart.yaml +++ b/charts/bookstack/Chart.yaml @@ -4,7 +4,7 @@ description: A simple, self-hosted, easy-to-use platform for organising and stor home: https://charts.gabe565.com/charts/bookstack icon: https://raw.githubusercontent.com/gabe565/charts/main/charts/bookstack/icon.svg type: application -version: 0.5.1 +version: 0.6.0 # renovate datasource=docker depName=ghcr.io/linuxserver/bookstack appVersion: version-v23.02.1 kubeVersion: ">=1.22.0-0" @@ -27,5 +27,5 @@ sources: - https://ghcr.io/linuxserver/bookstack annotations: artifacthub.io/changes: |- - - kind: changed - description: Update ghcr.io/linuxserver/bookstack Docker tag to version-v23.02.1 + - kind: added + description: Add optional CronJob that copies shelf permissions to all child books diff --git a/charts/bookstack/README.md b/charts/bookstack/README.md index 3179dc9b7..0524d7e0f 100644 --- a/charts/bookstack/README.md +++ b/charts/bookstack/README.md @@ -2,7 +2,7 @@ bookstack logo -![Version: 0.5.1](https://img.shields.io/badge/Version-0.5.1-informational?style=flat) +![Version: 0.6.0](https://img.shields.io/badge/Version-0.6.0-informational?style=flat) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat) ![AppVersion: version-v23.02.1](https://img.shields.io/badge/AppVersion-version--v23.02.1-informational?style=flat) @@ -93,6 +93,10 @@ N/A | mariadb | object | See [values.yaml](./values.yaml) | Enable and configure mariadb database subchart under this key. For more options see [mariadb chart documentation](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) | | persistence.config | object | See [values.yaml](./values.yaml) | Configure persistence settings for the chart under this key. | | service | object | See [values.yaml](./values.yaml) | Configures service settings for the chart. | +| shelfPermissionsCron.command | list | See [values.yaml](./values.yaml) | Shelf permissions CronJob command | +| shelfPermissionsCron.controller.cronjob.schedule | string | `"0 0 * * *"` | Shelf permissions CronJob time | +| shelfPermissionsCron.enabled | bool | `false` | Enables a CronJob that copies shelf permissions to all child books. [[ref]](https://bookstackapp.com/docs/admin/commands/#copy-shelf-permission) | +| shelfPermissionsCron.nameOverride | string | `"copy-shelf-permissions"` | Shelf permissions CronJob name | --- Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs) diff --git a/charts/bookstack/templates/cronjob.yaml b/charts/bookstack/templates/cronjob.yaml new file mode 100644 index 000000000..37e51fb1f --- /dev/null +++ b/charts/bookstack/templates/cronjob.yaml @@ -0,0 +1,11 @@ +{{- with .Values.shelfPermissionsCron }} + {{- if .enabled }} + {{- $ctx := deepCopy $ }} + {{- include "bjw-s.common.values.init" $ctx -}} + {{- $_ := merge $ctx.Values (include "bookstack.harcodedValues" $ | fromYaml) -}} + {{- $_ = mergeOverwrite $ctx.Values . }} + {{- $_ = set $ctx.Values "service" dict }} + {{- $_ = set $ctx.Values "persistence" dict }} + {{- include "bjw-s.common.class.cronjob" $ctx }} + {{- end }} +{{- end }} diff --git a/charts/bookstack/values.yaml b/charts/bookstack/values.yaml index 5c81a47b9..70e83a062 100644 --- a/charts/bookstack/values.yaml +++ b/charts/bookstack/values.yaml @@ -53,3 +53,24 @@ mariadb: enabled: false # storageClass: "" # size: 8Gi + +shelfPermissionsCron: + # -- Enables a CronJob that copies shelf permissions to all child books. + # [[ref]](https://bookstackapp.com/docs/admin/commands/#copy-shelf-permission) + enabled: false + # -- Shelf permissions CronJob name + nameOverride: copy-shelf-permissions + controller: + # @ignored + type: cronjob + cronjob: + # -- Shelf permissions CronJob time + schedule: 0 0 * * * + # -- Shelf permissions CronJob command + # @default -- See [values.yaml](./values.yaml) + command: + - php + - /app/www/artisan + - bookstack:copy-shelf-permissions + - --no-interaction + - --all