mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-21 11:56:38 +00:00
e2f394a897
* helm chart: one data drive per node - fix1 * refactor(helm): prevent negative or 0 replicaCount Co-authored-by: Copilot <copilot@github.com> * refactor(helm): remove env REPLICA_COUNT * feat(helm): default no logs directory to force stdout Co-authored-by: Copilot <copilot@github.com> * feat(helm): add drivesPerNode * feat(helm): correct default parity with 4 nodes / 1 drive per node * conditional render of RUSTFS_OBS_LOG_DIRECTORY * feat(chart): add table doc for parity * fix(chart): handle invalid annotation objects * fix(chart): move logging and obsevability options together; default for kubernetes output to stdout * feat(chart): better table doc for parity * fix(chart): leave RUSTFS_OBS_LOG_DIRECTORY empty, or the defaults will attempt to write to readonly fs * fix(chart): chart defaults as the previous version: 4 nodes with 4 drives per node * feat(chart): render RUSTFS_STORAGE_CLASS_STANDARD in configmap * minor fix for pvcAnnotations Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Cristian Chiru <cristi.chiru@gmail.com> * fix(chart): better drivesPerNode handling * fix(chart): obs_log_directory default non empty again to preserve previous deployments compatibility * fix(chart): proper drivesPerNode impl * fix(chart): values clarification for empty vs unset `obs_log_directory` * feat(chart): add service externalIPs * feat(helm): add optional service labels * fix(helm): merge service labels * fix(helm): storageclass pvcAnnotations * fix(chart): move logging and obsevability options together; default for kubernetes output to stdout * fix(helm): remove duplicate keys * fix(helm): default drivesPerNode null, keep legacy chart behavior * feat(helm): add template test for externalIPs * fix(helm): per-pool drivesPerNode inference, restore regression tests Repairs the drivesPerNode feature from #2693 so it renders and stays upgrade-safe: - define the missing drives inference (rustfs.poolDrives) and compute it per pool inside rustfs.pools, so mixed 4x4 + 16x1 pool deployments keep their exact legacy volumeClaimTemplates when drivesPerNode is unset - restore the $poolsEnabled definition dropped in the rebase (chart failed to render at all) - fix .Values references inside the pool range (dot is the pool there) and keep per-pool storageclass pvcAnnotations overrides working - make rustfs.volumes derive the drive range from pool drives instead of the pod count, and relax the pools.list 4-or-16 restriction to >= 2 - reject drivesPerNode=0 explicitly instead of silently inferring - keep default rendering identical to main: storage_class_standard stays unrendered by default, obs_endpoint.use_stdout stays false, clusterDomain value restored - restore the clusterDomain/mTLS SAN/explicit-volumes regression tests that the branch deleted, keeping the new topology tests --------- Signed-off-by: Cristian Chiru <cristi.chiru@gmail.com> Co-authored-by: Cristian Chiru <cristi.chiru@gmail.com> Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
148 lines
5.6 KiB
YAML
148 lines
5.6 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 }}
|
|
{{- if .ec.storage_class_standard }}
|
|
RUSTFS_STORAGE_CLASS_STANDARD: {{ .ec.storage_class_standard | 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.obs_endpoint.enabled }}
|
|
RUSTFS_OBS_ENDPOINT: {{ .Values.config.rustfs.obs_endpoint.base_endpoint | quote }}
|
|
RUSTFS_OBS_USE_STDOUT: {{ .Values.config.rustfs.obs_endpoint.use_stdout | quote }}
|
|
{{- with .Values.config.rustfs.obs_endpoint }}
|
|
{{- if .metrics.enabled }}
|
|
RUSTFS_OBS_METRIC_ENDPOINT: {{ .metrics.endpoint | quote }}
|
|
{{- else }}
|
|
RUSTFS_OBS_METRIC_ENDPOINT: ""
|
|
RUSTFS_OBS_METRICS_EXPORT_ENABLED: "false"
|
|
{{- end }}
|
|
{{- if .trace.enabled }}
|
|
RUSTFS_OBS_TRACE_ENDPOINT: {{ .trace.endpoint | quote }}
|
|
{{- else }}
|
|
RUSTFS_OBS_TRACE_ENDPOINT: ""
|
|
RUSTFS_OBS_TRACES_EXPORT_ENABLED: "false"
|
|
{{- end }}
|
|
{{- if .logs.enabled }}
|
|
RUSTFS_OBS_LOG_ENDPOINT: {{ .logs.endpoint | quote }}
|
|
{{- else }}
|
|
RUSTFS_OBS_LOG_ENDPOINT: ""
|
|
RUSTFS_OBS_LOGS_EXPORT_ENABLED: "false"
|
|
{{- end }}
|
|
{{- if .profiling.enabled }}
|
|
RUSTFS_OBS_PROFILING_ENDPOINT: {{ .profiling.endpoint | quote }}
|
|
RUSTFS_OBS_PROFILING_EXPORT_ENABLED: "true"
|
|
{{- else }}
|
|
RUSTFS_OBS_PROFILING_ENDPOINT: ""
|
|
RUSTFS_OBS_PROFILING_EXPORT_ENABLED: "false"
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- with .Values.config.rustfs.scanner }}
|
|
{{- if ne (toString .speed) "" }}
|
|
RUSTFS_SCANNER_SPEED: {{ .speed | quote }}
|
|
{{- end }}
|
|
{{- if ne (toString .delay) "" }}
|
|
RUSTFS_SCANNER_DELAY: {{ .delay | quote }}
|
|
{{- end }}
|
|
{{- if ne (toString .max_wait_secs) "" }}
|
|
RUSTFS_SCANNER_MAX_WAIT_SECS: {{ .max_wait_secs | quote }}
|
|
{{- end }}
|
|
{{- if ne (toString .cycle_secs) "" }}
|
|
RUSTFS_SCANNER_CYCLE: {{ .cycle_secs | quote }}
|
|
{{- end }}
|
|
{{- if ne (toString .start_delay_secs) "" }}
|
|
RUSTFS_SCANNER_START_DELAY_SECS: {{ .start_delay_secs | quote }}
|
|
{{- end }}
|
|
{{- if ne (toString .cycle_max_duration_secs) "" }}
|
|
RUSTFS_SCANNER_CYCLE_MAX_DURATION_SECS: {{ .cycle_max_duration_secs | quote }}
|
|
{{- end }}
|
|
{{- if ne (toString .cycle_max_objects) "" }}
|
|
RUSTFS_SCANNER_CYCLE_MAX_OBJECTS: {{ .cycle_max_objects | quote }}
|
|
{{- end }}
|
|
{{- if ne (toString .cycle_max_directories) "" }}
|
|
RUSTFS_SCANNER_CYCLE_MAX_DIRECTORIES: {{ .cycle_max_directories | quote }}
|
|
{{- end }}
|
|
{{- if ne (toString .bitrot_cycle_secs) "" }}
|
|
RUSTFS_SCANNER_BITROT_CYCLE_SECS: {{ .bitrot_cycle_secs | quote }}
|
|
{{- end }}
|
|
{{- if ne (toString .idle_mode) "" }}
|
|
RUSTFS_SCANNER_IDLE_MODE: {{ .idle_mode | quote }}
|
|
{{- end }}
|
|
{{- if ne (toString .cache_save_timeout_secs) "" }}
|
|
RUSTFS_SCANNER_CACHE_SAVE_TIMEOUT_SECS: {{ .cache_save_timeout_secs | quote }}
|
|
{{- end }}
|
|
{{- if ne (toString .max_concurrent_set_scans) "" }}
|
|
RUSTFS_SCANNER_MAX_CONCURRENT_SET_SCANS: {{ .max_concurrent_set_scans | quote }}
|
|
{{- end }}
|
|
{{- if ne (toString .max_concurrent_disk_scans) "" }}
|
|
RUSTFS_SCANNER_MAX_CONCURRENT_DISK_SCANS: {{ .max_concurrent_disk_scans | quote }}
|
|
{{- end }}
|
|
{{- if ne (toString .yield_every_n_objects) "" }}
|
|
RUSTFS_SCANNER_YIELD_EVERY_N_OBJECTS: {{ .yield_every_n_objects | quote }}
|
|
{{- end }}
|
|
{{- if ne (toString .alert_excess_versions) "" }}
|
|
RUSTFS_SCANNER_ALERT_EXCESS_VERSIONS: {{ .alert_excess_versions | quote }}
|
|
{{- end }}
|
|
{{- if ne (toString .alert_excess_version_size) "" }}
|
|
RUSTFS_SCANNER_ALERT_EXCESS_VERSION_SIZE: {{ .alert_excess_version_size | quote }}
|
|
{{- end }}
|
|
{{- if ne (toString .alert_excess_folders) "" }}
|
|
RUSTFS_SCANNER_ALERT_EXCESS_FOLDERS: {{ .alert_excess_folders | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.config.rustfs.timeout_profile }}
|
|
RUSTFS_DRIVE_TIMEOUT_PROFILE: {{ .Values.config.rustfs.timeout_profile | quote }}
|
|
{{- end }}
|
|
{{- if .Values.config.rustfs.kms.enabled }}
|
|
{{- if eq .Values.config.rustfs.kms.type "vault" }}
|
|
{{- with .Values.config.rustfs.kms.vault }}
|
|
RUSTFS_KMS_ENABLE: "true"
|
|
RUSTFS_KMS_BACKEND: {{ .vault_backend | quote }}
|
|
RUSTFS_KMS_VAULT_ADDRESS: {{ .vault_address | quote }}
|
|
RUSTFS_KMS_VAULT_TOKEN: {{ .vault_token | quote }}
|
|
RUSTFS_KMS_DEFAULT_KEY_ID: {{ .default_key | quote }}
|
|
{{- if eq .vault_backend "vault-transit" }}
|
|
RUSTFS_KMS_VAULT_MOUNT_PATH: {{ .vault_mount_path | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|