Files
rustfs/helm/rustfs/templates/configmap.yaml
T

61 lines
1.9 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "rustfs.fullname" . }}-config
namespace: {{ .Release.Namespace }}
labels:
{{- toYaml .Values.commonLabels | nindent 4 }}
data:
{{- with .Values.config.rustfs }}
RUSTFS_ADDRESS: {{ .address | quote }}
RUSTFS_CONSOLE_ADDRESS: {{ .console_address | quote }}
RUSTFS_CONSOLE_ENABLE: {{ .console_enable | quote }}
RUSTFS_OBS_LOG_DIRECTORY: {{ .obs_log_directory | quote }}
RUSTFS_OBS_LOGGER_LEVEL: {{ .log_level | quote }}
RUSTFS_OBS_ENVIRONMENT: {{ .obs_environment | quote }}
{{- if .region }}
RUSTFS_REGION: {{ .region | quote }}
{{- end }}
{{- if .domains }}
RUSTFS_SERVER_DOMAINS: {{ include "rustfs.serverDomains" $ | quote }}
{{- end }}
{{- with .log_rotation }}
{{- if .size }}
RUSTFS_OBS_LOG_ROTATION_SIZE_MB: {{ .size | quote }}
{{- end }}
{{- if .time }}
RUSTFS_OBS_LOG_ROTATION_TIME: {{ .time | quote }}
{{- end }}
{{- if .keep_files }}
RUSTFS_OBS_LOG_KEEP_FILES: {{ .keep_files | quote }}
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.mode.distributed.enabled }}
RUSTFS_VOLUMES: {{ .Values.config.rustfs.volumes | default (include "rustfs.volumes" .) | quote }}
{{- else }}
RUSTFS_VOLUMES: "/data"
{{- end }}
{{- if .Values.mtls.enabled }}
RUSTFS_SERVER_MTLS_ENABLE: "1"
RUSTFS_TLS_KEYLOG: "1"
RUSTFS_TLS_PATH: "/opt/tls"
{{- end }}
{{- if .Values.config.rustfs.metrics.enabled }}
RUSTFS_OBS_METRIC_ENDPOINT: {{ .Values.config.rustfs.metrics.endpoint | quote }}
{{- else }}
RUSTFS_OBS_METRIC_ENDPOINT: ""
RUSTFS_OBS_METRICS_EXPORT_ENABLED: "false"
{{- end }}
{{- with .Values.config.rustfs.scanner }}
{{- if .speed }}
RUSTFS_SCANNER_SPEED: {{ .speed | quote }}
{{- end }}
{{- if .start_delay_secs }}
RUSTFS_DATA_SCANNER_START_DELAY_SECS: {{ .start_delay_secs | quote }}
{{- end }}
{{- if .idle_mode }}
RUSTFS_SCANNER_IDLE_MODE: {{ .idle_mode | quote }}
{{- end }}
{{- end }}