Skip to content

Commit

Permalink
Merge pull request #21 from jordanopensource/task/add_ldap_configs
Browse files Browse the repository at this point in the history
[etherpad] add the ldap plugin options to the chart
  • Loading branch information
George Khoury authored Jun 5, 2022
2 parents c16e910 + 82c4790 commit 5f19580
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/etherpad/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 0.1.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
20 changes: 20 additions & 0 deletions charts/etherpad/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ data:
DEFAULT_PAD_TEXT: {{ .Values.general.defaultPadText }}
IP: {{ .Values.general.ip }}
PORT: {{ .Values.general.port | quote }}
{{- if not .Values.existingSecret.enabled }}
ADMIN_PASSWORD: {{ .Values.general.adminCredentials.password | quote }}
USER_PASSWORD: {{ .Values.general.userPassword | quote }}
{{- end }}
# Database configs
DB_TYPE: {{ .Values.database.type }}
DB_HOST: {{ .Values.database.host }}
Expand Down Expand Up @@ -74,6 +78,22 @@ data:
IMPORT_EXPORT_RATE_LIMIT_WINDOW: {{ .Values.advanced.limits.rateLimitWindow | quote }}
COMMIT_RATE_LIMIT_DURATION: {{ .Values.advanced.limits.rateLimitDuration | quote }}
COMMIT_RATE_LIMIT_POINTS: {{ .Values.advanced.limits.rateLimitPoints | quote }}
# ldap configs if enabled
{{- if .Values.ldap.enabled }}
LDAP_URL: {{ .Values.ldap.url }}
LDAP_ACCOUNT_BASE: {{ .Values.ldap.accountBase }}
LDAP_ACCOUNT_PATTERN: {{ .Values.ldap.accountPattern }}
LDAP_DISPLAY_NAME_ATTRIBUTE: {{ .Values.ldap.displayNameAttribute }}
LDAP_SEARCH_DN: {{ .Values.ldap.searchDN }}
{{- if not .Values.existingSecret.enabled }}
LDAP_PASSWORD: {{ .Values.ldap.ldapPassword }}
{{- end }}
LDAP_GROUP_SEARCH_BASE: {{ .Values.ldap.groupSearchBase }}
LDAP_GROUP_ATTRIBUTE: {{ .Values.ldap.groupAttribute }}
LDAP_SEARCH_SCOPE: {{ .Values.ldap.searchScope }}
LDAP_GROUP_SEARCH: {{ .Values.ldap.groupSearch }}
LDAP_ANONYMOUS_READ_ONLY: {{ .Values.ldap.anonymousReadOnly | quote }}
{{- end }}
{{- range $key, $value := .Values.env }}
{{ $key }}: {{ $value | quote }}
{{- end }}
7 changes: 7 additions & 0 deletions charts/etherpad/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.existingSecret.enabled}}
env:
{{- if .Values.ldap.enabled }}
- name: LDAP_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.existingSecret.secretName }}
key: {{ .Values.existingSecret.ldapPasswordKey }}
{{- end }}
- name: ADMIN_PASSWORD
valueFrom:
secretKeyRef:
Expand Down
17 changes: 17 additions & 0 deletions charts/etherpad/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,23 @@ existingSecret:
adminPasswordKey: admin_password
userPasswordKey: user_password
databasePasswordKey: db_password
ldapPasswordKey: ldap_password

# if you are using the ldap authentication plugin, you can configure it here
ldap:
enabled: false
url: ""
accountBase: ""
accountPattern: ""
displayNameAttribute: ""
searchDN: ""
ldapPassword: ""
groupSearchBase: ""
groupAttribute: ""
groupAttributeIsDN: ""
searchScope: ""
groupSearch: ""
anonymousReadOnly: false

serviceAccount:
# Specifies whether a service account should be created
Expand Down

0 comments on commit 5f19580

Please sign in to comment.