mirror of
https://github.com/plankanban/planka.git
synced 2026-07-15 21:48:11 +03:00
feat(helm): Add inline custom terms configuration, fix symlink detection (#1585)
This commit is contained in:
@@ -227,6 +227,28 @@ extraEnv:
|
||||
key: api-key
|
||||
```
|
||||
|
||||
### Custom Terms of Service
|
||||
|
||||
You can provide your own End User Terms of Service by passing the markdown files directly via `values.yaml` in the `terms` configuration block. This automates the creation of a corresponding ConfigMap and volume mount.
|
||||
|
||||
```yaml
|
||||
terms:
|
||||
enabled: true
|
||||
customFiles:
|
||||
en-US.md: |
|
||||
# End User Terms of Service
|
||||
...
|
||||
[confirmations]::
|
||||
---
|
||||
✔️ **I have read and accept these End User Terms of Service**
|
||||
de-DE.md: |
|
||||
# Nutzungsbedingungen
|
||||
...
|
||||
[confirmations]::
|
||||
---
|
||||
✔️ **Ich habe diese Nutzungsbedingungen gelesen und akzeptiere sie**
|
||||
```
|
||||
|
||||
### Image Digest Pinning
|
||||
|
||||
For enhanced security and reproducibility, you can pin the container image using its SHA256 digest instead of relying solely on tags. This ensures you always deploy the exact same image, preventing tag mutations or accidental updates.
|
||||
@@ -291,3 +313,4 @@ image:
|
||||
### Complete Example
|
||||
|
||||
See `values-example.yaml` for a comprehensive example that demonstrates all the advanced features including OIDC configuration with custom CA certificates.
|
||||
````
|
||||
|
||||
13
charts/planka/templates/configmap-terms.yaml
Normal file
13
charts/planka/templates/configmap-terms.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
{{- if .Values.terms.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "planka.fullname" . }}-terms
|
||||
labels:
|
||||
{{- include "planka.labels" . | nindent 4 }}
|
||||
data:
|
||||
{{- range $key, $value := .Values.terms.customFiles }}
|
||||
{{ $key }}: |
|
||||
{{- $value | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -77,6 +77,10 @@ spec:
|
||||
subPath: tmp
|
||||
name: emptydir
|
||||
{{- end }}
|
||||
{{- if .Values.terms.enabled }}
|
||||
- mountPath: /app/terms/custom
|
||||
name: planka-terms
|
||||
{{- end }}
|
||||
{{- /* Extra volume mounts */}}
|
||||
{{- range .Values.extraMounts }}
|
||||
- name: {{ .name }}
|
||||
@@ -222,6 +226,11 @@ spec:
|
||||
{{- if .Values.securityContext.readOnlyRootFilesystem }}
|
||||
- name: emptydir
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- if .Values.terms.enabled }}
|
||||
- name: planka-terms
|
||||
configMap:
|
||||
name: {{ include "planka.fullname" . }}-terms
|
||||
{{- end }}
|
||||
{{- /* Extra volumes */}}
|
||||
{{- range .Values.extraMounts }}
|
||||
|
||||
@@ -248,6 +248,22 @@ extraEnv: []
|
||||
## - name: SMTP_FROM
|
||||
## value: "your_email@example.com"
|
||||
|
||||
## End User Terms of Service configuration
|
||||
## Mount custom terms of service markdown files into the Planka deployment
|
||||
##
|
||||
terms:
|
||||
enabled: false
|
||||
# Provide individual language files as key-value pairs
|
||||
# e.g.,
|
||||
# customFiles:
|
||||
# en-US.md: |
|
||||
# # End User Terms of Service
|
||||
# ...
|
||||
# de-DE.md: |
|
||||
# # Nutzungsbedingungen
|
||||
# ...
|
||||
customFiles: {}
|
||||
|
||||
## Extra volume mounts configuration
|
||||
## Mount ConfigMaps, Secrets, and arbitrary volumes to the PLANKA container
|
||||
## This allows mounting any pre-existing ConfigMaps, Secrets, or other volume types
|
||||
|
||||
@@ -32,7 +32,9 @@ module.exports = function defineTermsHook(sails) {
|
||||
});
|
||||
|
||||
return entries
|
||||
.filter((entry) => entry.isFile() && path.extname(entry.name) === '.md')
|
||||
.filter(
|
||||
(entry) => (entry.isFile() || entry.isSymbolicLink()) && path.extname(entry.name) === '.md',
|
||||
)
|
||||
.map((entry) => path.basename(entry.name, '.md'))
|
||||
.sort();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user