mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-11-08 17:04:46 +08:00
[helm] Allow setting notification.toml config (#6159)
* [helm] Allow setting notification.toml config * [helm] Set notification config conditionally
This commit is contained in:
@@ -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:
|
||||
|
||||
19
k8s/charts/seaweedfs/templates/notification-configmap.yaml
Normal file
19
k8s/charts/seaweedfs/templates/notification-configmap.yaml
Normal file
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user