From ee2f92d36868f75c579e2ce14ca6a1e14d55808f Mon Sep 17 00:00:00 2001 From: rgembalik Date: Fri, 11 Jan 2019 16:36:14 +0100 Subject: [PATCH] Expose LDAP parameters for bootstack via values (#10209) * [stable/bookstack] add support for ldap auth Signed-off-by: Rafal Gembalik * Remove default values for ldap parameters Signed-off-by: Rafal Gembalik * Remove default values for ldap parameters Signed-off-by: Rafal Gembalik * bump chart to v1 since its in stable. Signed-off-by: Paul Czarkowski --- stable/bookstack/Chart.yaml | 2 +- stable/bookstack/README.md | 7 +++++++ stable/bookstack/templates/deployment.yaml | 16 ++++++++++++++++ stable/bookstack/values.yaml | 10 ++++++++++ 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/stable/bookstack/Chart.yaml b/stable/bookstack/Chart.yaml index 0ac5fe36c1..ebf6b60d26 100644 --- a/stable/bookstack/Chart.yaml +++ b/stable/bookstack/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: 0.24.3 description: BookStack is a simple, self-hosted, easy-to-use platform for organising and storing information. name: bookstack -version: 0.1.3 +version: 1.0.0 home: https://www.bookstackapp.com/ sources: - https://github.com/BookStackApp/BookStack diff --git a/stable/bookstack/README.md b/stable/bookstack/README.md index b1dcf22177..77f83263f8 100644 --- a/stable/bookstack/README.md +++ b/stable/bookstack/README.md @@ -87,6 +87,13 @@ The following table lists the configurable parameters of the Redmine chart and t | `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](https://www.bookstackapp.com/docs/admin/ldap-auth/) | `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](https://hub.docker.com/r/solidnerd/bookstack/) and the MariaDB/MySQL database settings. For more information please refer to the [Bookstack](https://hub.docker.com/r/solidnerd/bookstack/) image documentation. diff --git a/stable/bookstack/templates/deployment.yaml b/stable/bookstack/templates/deployment.yaml index 4d71bd2cee..bc12ddd502 100644 --- a/stable/bookstack/templates/deployment.yaml +++ b/stable/bookstack/templates/deployment.yaml @@ -37,6 +37,22 @@ spec: path: / port: http env: + {{- if .Values.ldap.enabled }} + - name: AUTH_METHOD + value: ldap + - name: LDAP_SERVER + value: {{ .Values.ldap.server | quote }} + - name: LDAP_BASE_DN + value: {{ .Values.ldap.base_dn | quote }} + - name: LDAP_DN + value: {{ .Values.ldap.dn | quote }} + - name: LDAP_PASS + value: {{ .Values.ldap.pass | quote }} + - name: LDAP_USER_FILTER + value: {{ .Values.ldap.userFilter | quote }} + - name: LDAP_VERSION + value: {{ .Values.ldap.version | quote }} + {{- end }} {{- if .Values.mariadb.enabled }} - name: DB_HOST value: {{ template "bookstack.mariadb.fullname" . }} diff --git a/stable/bookstack/values.yaml b/stable/bookstack/values.yaml index 96f55fe441..4b5e63632e 100644 --- a/stable/bookstack/values.yaml +++ b/stable/bookstack/values.yaml @@ -160,3 +160,13 @@ nodeSelector: {} tolerations: [] affinity: {} + +## Enable ldap authentication. See https://www.bookstackapp.com/docs/admin/ldap-auth/ for details on how to set it up. +ldap: + enabled: false + server: + base_dn: + dn: + pass: + userFilter: + version: