From afcaaf66fceef8366d65b689f14526db8563fe26 Mon Sep 17 00:00:00 2001 From: majinghe <42570491+majinghe@users.noreply.github.com> Date: Sat, 14 Mar 2026 21:44:44 +0800 Subject: [PATCH] feat: add support for obs enpoint support in helm chart (#2160) --- helm/README.md | 17 +++++++++++++--- helm/rustfs/Chart.yaml | 4 ++-- helm/rustfs/templates/configmap.yaml | 30 +++++++++++++++++++++++++--- helm/rustfs/values.yaml | 19 +++++++++++++++--- 4 files changed, 59 insertions(+), 11 deletions(-) diff --git a/helm/README.md b/helm/README.md index 9ba44b9e4..7305b7ed2 100644 --- a/helm/README.md +++ b/helm/README.md @@ -32,9 +32,20 @@ RustFS helm chart supports **standalone and distributed mode**. For standalone m | config.rustfs.log_rotation.keep_files | int | `"30"` | Default log keep files for rustfs. | | config.rustfs.metrics.enabled | bool | `false` | Toggle metrics export. | | config.rustfs.metrics.endpoint | string | `""` | Dedicated metrics endpoint. | -| config.rustfs.scanner.speed | string | `""` | Scanner speed preset: `fastest`, `fast`, `default`, `slow`, `slowest` | -| config.rustfs.scanner.start_delay_secs | string | `""` | Override scanner cycle interval in seconds with `RUSTFS_SCANNER_START_DELAY_SECS` | -| config.rustfs.scanner.idle_mode | string | `""` | Override scanner idle throttling flag (`RUSTFS_SCANNER_IDLE_MODE`) | +| config.rustfs.scanner.speed | string | `""` | Scanner speed preset: `fastest`, `fast`, `default`, `slow`, `slowest`. | +| config.rustfs.scanner.start_delay_secs | string | `""` | Override scanner cycle interval in seconds with `RUSTFS_SCANNER_START_DELAY_SECS`. | +| config.rustfs.scanner.idle_mode | string | `""` | Override scanner idle throttling flag (`RUSTFS_SCANNER_IDLE_MODE`). | +| config.rustfs.obs_endpoint.enabled | bool | `false` | Whether to send metrics/logs/traces/profilings to remote endpoint, eg, OLTP. | +| config.rustfs.obs_endpoint.base_endpoint | string | `""` | Root OTLP/HTTP endpoint, e.g. http://otel-collector:4318. | +| config.rustfs.obs_endpoint.use_stdout | bool | `false` | Whether to output logs to stdout in addition the OLTP. | +| config.rustfs.obs_endpoint.metrics.enabled | bool | `false` | Whether to send metrics to remote endpoint. | +| config.rustfs.obs_endpoint.metrics.endpoint | string | `""` | Remote endpoint url for metrics. | +| config.rustfs.obs_endpoint.trace.enabled | bool | `false` | Whether to send trace to remote endpoint. | +| config.rustfs.obs_endpoint.trace.endpoint | string | `""` | Remote endpoint url for trace. | +| config.rustfs.obs_endpoint.logs.enabled | bool | `false` | Whether to send logs to remote endpoint. | +| config.rustfs.obs_endpoint.logs.endpoint | string | `""` | Remote endpoint url for logs. | +| config.rustfs.obs_endpoint.profiling.enabled | bool | `false` | Whether to send profiling to remote endpoint. | +| config.rustfs.obs_endpoint.profiling.endpoint | string | `""` | Remote endpoint url for profiling. | | containerSecurityContext.capabilities.drop[0] | string | `"ALL"` | | | containerSecurityContext.readOnlyRootFilesystem | bool | `true` | | | containerSecurityContext.runAsNonRoot | bool | `true` | | diff --git a/helm/rustfs/Chart.yaml b/helm/rustfs/Chart.yaml index 14acdd9e4..f61a791d3 100644 --- a/helm/rustfs/Chart.yaml +++ b/helm/rustfs/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: rustfs description: RustFS helm chart to deploy RustFS on kubernetes cluster. type: application -version: 0.0.83 -appVersion: "1.0.0-alpha.83" +version: 0.0.86 +appVersion: "1.0.0-alpha.86" home: https://rustfs.com icon: https://media.sys.truenas.net/apps/rustfs/icons/icon.svg maintainers: diff --git a/helm/rustfs/templates/configmap.yaml b/helm/rustfs/templates/configmap.yaml index e2137dd39..6fab0eeb2 100644 --- a/helm/rustfs/templates/configmap.yaml +++ b/helm/rustfs/templates/configmap.yaml @@ -41,11 +41,35 @@ data: 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 }} + {{- 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 }} + {{- 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 }} + {{- else }} + RUSTFS_OBS_PROFILING_ENDPOINT: "" + RUSTFS_OBS_PROFILING_ENABLED: "false" + {{- end }} + {{- end }} {{- end }} {{- with .Values.config.rustfs.scanner }} {{- if .speed }} diff --git a/helm/rustfs/values.yaml b/helm/rustfs/values.yaml index cd029fbf2..9acd3533e 100644 --- a/helm/rustfs/values.yaml +++ b/helm/rustfs/values.yaml @@ -79,9 +79,22 @@ config: start_delay_secs: "" # Enable/disable scanner sleeps for throttling idle_mode: "" - metrics: - enabled: false - endpoint: "" # If specified, rustfs will export metrics to this OTLP endpoint. e.g. "http://localhost:4318/v1/metrics" + obs_endpoint: + enabled: false # If true, rustfs will export metrics, traces, logs and profiling data to the specified OTLP endpoints. If false, the individual settings for metrics, traces, logs and profiling endpoints will be ignored and all data will not be exported. + base_endpoint: "" #Root OTLP/HTTP endpoint, e.g. http://otel-collector:4318 + use_stdout: false # If true, rustfs will also export logs to stdout in addition to the OTLP logs endpoint. + metrics: + enabled: false + endpoint: "" # If specified, rustfs will export metrics to this OTLP endpoint. e.g. "http://localhost:4318/v1/metrics" + trace: + enabled: false + endpoint: "" # If specified, rustfs will export traces to this OTLP endpoint. e.g. "http://localhost:4318/v1/traces" + logs: + enabled: false + endpoint: "" # If specified, rustfs will export logs to this OTLP endpoint. e.g. "http://localhost:4318/v1/logs" + profiling: + enabled: false + endpoint: "" # If specified, rustfs will export profiling data to this endpoint. e.g. "http://localhost:6060/debug/pprof/profile" # This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/ serviceAccount: