Skip to content

Latest commit

 

History

History
executable file
·
156 lines (116 loc) · 15.5 KB

File metadata and controls

executable file
·
156 lines (116 loc) · 15.5 KB

Bookstack - open source wiki

Bookstack is a simple, easy-to-use platform for organising and storing information.

TL;DR;

$ helm install stellarhosted/bookstack

Introduction

This chart bootstraps a Bookstack deployment on a Kubernetes cluster using the Helm package manager.

It also uses the MariaDB chart which satisfies the database requirements of the application.

Prerequisites

  • Kubernetes 1.22+ with Beta APIs enabled
  • PV provisioner support in the underlying infrastructure

Changelog

All changes for this chart are kept in the CHANGELOG.md

Installing the Chart

To install the chart with the release name my-release:

$ helm update --install my-release stellarhosted/bookstack

The command deploys Bookstack on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following table lists the configurable parameters of the Redmine chart and their default values.

Parameter Description Default
env additional env variables {}
replicaCount Number of replicas to start 1
deploymentStrategy Deployment strategy {}
securityContext Pod security context {'fsGroup': 33}
app.key Laravel app key. base64:<b64 encoded string of 16 or 32 bytes>. mandatory
app.url URL used to connect to boostack mandatory
image.repository Bookstack image name solidnerd/bookstack
image.tag Bookstack image tag 0.30.4
image.pullPolicy Bookstack image pull policy IfNotPresent
externalDatabase.host Host of the external database nil
externalDatabase.port Port of the external database 3306
externalDatabase.user Existing username in the external db bookstack
externalDatabase.password Password for the above username nil
externalDatabase.database Name of the existing database bookstack
externalDatabase.tlsCert TLS cert file to setup TLS connection with externalDatabase nil
mariadb.enabled Whether to use the MariaDB chart true
mariadb.auth.database Database to create bookstack
mariadb.auth.username Database user to create bookstack
mariadb.auth.password Password for the database nil
mariadb.auth.rootPassword MariaDB admin password nil
mariadb.primary.persistence.enabled Enable MariaDB persistence using PVC false
mariadb.primary.persistence.storageClass PVC Storage Class for MariaDB volume nil (uses alpha storage class annotation)
mariadb.primary.persistence.accessModes PVC Access Mode list for MariaDB volume [ReadWriteOnce]
mariadb.primary.persistence.size PVC Storage Request for MariaDB volume 8Gi
service.type Desired service type ClusterIP
service.port Service exposed port 80
podSecurityPolicy.enabled Create & use Pod Security Policy resources false
rbac.create Use Role-based Access Control true
serviceAccount.create Should we create a ServiceAccount true
serviceAccount.name Name of the ServiceAccount to use null
persistence.uploads.enabled Enable persistence using PVC for uploads true
persistence.uploads.storageClass PVC Storage Class nil (uses alpha storage class annotation)
persistence.uploads.accessMode PVC Access Mode ReadWriteOnce
persistence.uploads.size PVC Storage Request 8Gi
persistence.uploads.existingClaim If PVC exists & bounded for uploads nil (when nil, new one is requested)
persistence.storage.enabled Enable persistence using PVC for uploads true
persistence.storage.storageClass PVC Storage Class nil (uses alpha storage class annotation)
persistence.storage.accessMode PVC Access Mode ReadWriteOnce
persistence.storage.size PVC Storage Request 8Gi
persistence.storage.existingClaim If PVC exists & bounded for storage nil (when nil, new one is requested)
ingress.enabled Enable or disable the ingress false
ingress.className Ingress class name mandatory if ingress.enabled is true
ingress.hosts The virtual host name(s) {}
ingress.annotations An array of service annotations nil
ingress.tls[i].secretName The secret kubernetes.io/tls nil
ingress.tls[i].hosts[j] The virtual host name nil
resources Resources allocation (Requests and Limits) {}
ldap.enabled Enable or disable LDAP authentication. See official docs for details false
ldap.server LDAP server address nil
ldap.base_dn Base DN where users will be searched nil
ldap.dn User which will make search queries. Leave empty to search anonymously. nil
ldap.pass Password of user performing search queries. nil
ldap.userFilter A filter to use when searching for users nil
ldap.version Set the LDAP version to use when connecting to the server. Required especially when using AD. nil

The above parameters map to the env variables defined in the Bookstack image and the MariaDB/MySQL database settings. For more information please refer to the Bookstack image documentation.

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

$ helm upgrade --install my-release \
  --set image.pullPolicy=Always \
    stellarhosted/bookstack

The above command sets the image pull policy to Always.

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

$ helm upgrade --install my-release -f values.yaml stellarhosted/bookstack

Tip: You can use the default values.yaml

Replicas

Bookstack writes uploaded files to a persistent volume. By default that volume cannot be shared between pods (RWO). In such a configuration the replicas option must be set to 1. If the persistent volume supports more than one writer (RWX), ie NFS, replicaCount can be greater than 1.

Persistence

The Bookstack image stores the uploaded data at the public/uploads path, relative to the document root of the Bookstack application. Other misc. data is stored under the public/storage path, also relative to the document root of the application.

Persistent Volume Claims are used to keep the data across deployments. The volume is created using dynamic volume provisioning.

See the Configuration section to configure the PVC or to disable persistence.

Existing PersistentVolumeClaims

The following example includes two PVCs, one for uploads and another for misc. data.

  1. Create the PersistentVolume
  2. Create the PersistentVolumeClaim
  3. Create the directory, on a worker
  4. Install the chart
$ helm upgrade --install test --set persistence.uploads.existingClaim=PVC_UPLOADS,persistence.storage.existingClaim=PVC_STORAGE stellarhosted/bookstack