Browse Source
[helm] Allow setting notification.toml config (#6159)
* [helm] Allow setting notification.toml config
* [helm] Set notification config conditionally
pull/6156/merge
Davide Calabrese
2 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
43 additions and
0 deletions
-
k8s/charts/seaweedfs/templates/filer-statefulset.yaml
-
k8s/charts/seaweedfs/templates/notification-configmap.yaml
-
k8s/charts/seaweedfs/values.yaml
|
|
@ -234,6 +234,12 @@ spec: |
|
|
|
- name: data-filer |
|
|
|
mountPath: /data |
|
|
|
{{- end }} |
|
|
|
{{- if .Values.filer.notificationConfig }} |
|
|
|
- name: notification-config |
|
|
|
readOnly: true |
|
|
|
mountPath: /etc/seaweedfs/notification.toml |
|
|
|
subPath: notification.toml |
|
|
|
{{- end }} |
|
|
|
{{- if .Values.global.enableSecurity }} |
|
|
|
- name: security-config |
|
|
|
readOnly: true |
|
|
@ -349,6 +355,11 @@ spec: |
|
|
|
secretName: seaweedfs-s3-secret |
|
|
|
{{- end }} |
|
|
|
{{- end }} |
|
|
|
{{- if .Values.filer.notificationConfig }} |
|
|
|
- name: notification-config |
|
|
|
configMap: |
|
|
|
name: {{ template "seaweedfs.name" . }}-notification-config |
|
|
|
{{- end }} |
|
|
|
{{- if .Values.global.enableSecurity }} |
|
|
|
- name: security-config |
|
|
|
configMap: |
|
|
|
|
|
@ -0,0 +1,19 @@ |
|
|
|
{{- if and .Values.filer.enabled .Values.filer.notificationConfig }} |
|
|
|
apiVersion: v1 |
|
|
|
kind: ConfigMap |
|
|
|
metadata: |
|
|
|
name: {{ template "seaweedfs.name" . }}-notification-config |
|
|
|
namespace: {{ .Release.Namespace }} |
|
|
|
labels: |
|
|
|
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} |
|
|
|
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
|
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }} |
|
|
|
app.kubernetes.io/instance: {{ .Release.Name }} |
|
|
|
{{- if .Values.filer.annotations }} |
|
|
|
annotations: |
|
|
|
{{- toYaml .Values.filer.annotations | nindent 4 }} |
|
|
|
{{- end }} |
|
|
|
data: |
|
|
|
notification.toml: |- |
|
|
|
{{ .Values.filer.notificationConfig | nindent 4 }} |
|
|
|
{{- end }} |
|
|
@ -546,6 +546,19 @@ filer: |
|
|
|
# Disable http request, only gRpc operations are allowed |
|
|
|
disableHttp: false |
|
|
|
|
|
|
|
# Add a custom notification.toml to configure filer notifications |
|
|
|
# Example: |
|
|
|
# notificationConfig: |- |
|
|
|
# [notification.kafka] |
|
|
|
# enabled = false |
|
|
|
# hosts = [ |
|
|
|
# "localhost:9092" |
|
|
|
# ] |
|
|
|
# topic = "seaweedfs_filer" |
|
|
|
# offsetFile = "./last.offset" |
|
|
|
# offsetSaveIntervalSeconds = 10 |
|
|
|
notificationConfig: "" |
|
|
|
|
|
|
|
# DEPRECATE: enablePVC, storage, storageClass |
|
|
|
# Consider replacing with filer.data section below instead. |
|
|
|
|
|
|
|