Fix the processing of environment variables
@siegfriedweber がすでに取り組んでいます。
2026年7月16日 から。
評価
この issue はまだ評価されていません。
説明
Problem description
Environment variables are handled inconsistently in the operators.
Some operators apply the overrides at the end (https://github.com/stackabletech/opensearch-operator/blob/de6bff9911d9a9d1f55266ace24d05034f00120e/rust/operator-binary/src/controller/build/node_config.rs#L402) and others apply them in between (https://github.com/stackabletech/airflow-operator/blob/e5ef43c4b3d98b85b1fcb853beed1bfc72a7366a/rust/operator-binary/src/controller/build/properties/env_vars.rs#L259-L271). It is unclear if an override is effective or not.
Some operators use a set to assemble all environment variables (https://github.com/stackabletech/opensearch-operator/blob/de6bff9911d9a9d1f55266ace24d05034f00120e/rust/operator-binary/src/controller/build/node_config.rs#L349) and others add additional environment variables to the list (https://github.com/stackabletech/hbase-operator/blob/c06e9a4fe10d090233dc348a389d24f6c960686e/rust/operator-binary/src/controller/build/resource/statefulset.rs#L187-L192). It is unclear if an environment variable is duplicated by an override. If the override is removed, then also an environment variable provided by the operator could vanish (see kubernetes/kubernetes#58477).
The environment variables which are assembled in a set, are sorted alphabetically and the ones which are appended to the container directly, are ordered as they appear in the code. If dependent environment variables are used, then it is a game of chance if they appear in the right order. The OpenSearch operator uses dependent environment variables internally (https://github.com/stackabletech/opensearch-operator/blob/de6bff9911d9a9d1f55266ace24d05034f00120e/rust/operator-binary/src/controller/build/node_config.rs#L345) and prefixes POD_NAME with _ to force the correct order. This does not work reliably for overrides where dependent environment variables are also actually used.
Solution
Provide one consistent solution which is implemented (and documented) in all operators.
All environment variables must be assembled in one EnvVarSet. Duplicates are not possible. The overrides must be applied last. The iterator of the EnvVarSet ensures that dependent environment variables are ordered correctly and deterministically (i.e. alphabetically or directly after the referenced variables).
part of stackabletech/internal-issues#167
Tasks
- stackabletech/operator-rs#1249
- 主要言語
- 言語のデータがありません
- スター
- 2
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
stackabletech/issues のほかの issue
-
Metadata store: MVP オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
stackabletech/issues#892 ·
-
Metadata Store オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
stackabletech/issues#891 · コメント 1 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 50/100
stackabletech/issues#890 ·
-
epic
stackabletech/issues#889 · 担当者 2 名 ·
-
stackabletech/issues#888 · コメント 1 件 · 担当者 1 名 ·