Skip to content

Commit ac29c0e

Browse files
committed
docs: Hint on downward API env var
1 parent 7450d85 commit ac29c0e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

crates/stackable-operator/src/cli.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,10 @@ impl ProductConfigPath {
306306
#[derive(clap::Parser, Debug, PartialEq, Eq)]
307307
pub struct OperatorEnvironmentOptions {
308308
/// The namespace the operator is running in, usually `stackable-operators`.
309+
///
310+
/// Note that when running the operator on Kubernetes we recommend to use the
311+
/// [downward API](https://kubernetes.io/docs/concepts/workloads/pods/downward-api/)
312+
/// to let Kubernetes mount the namespace as the `OPERATOR_NAMESPACE` env variable.
309313
#[arg(long, env)]
310314
pub operator_namespace: String,
311315

crates/stackable-operator/src/utils/cluster_info.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ pub struct KubernetesClusterInfoOptions {
2323
pub kubernetes_cluster_domain: Option<DomainName>,
2424

2525
/// Name of the Kubernetes Node that the operator is running on.
26+
///
27+
/// Note that when running the operator on Kubernetes we recommend to use the
28+
/// [downward API](https://kubernetes.io/docs/concepts/workloads/pods/downward-api/)
29+
/// to let Kubernetes mount the namespace as the `KUBERNETES_NODE_NAME` env variable.
2630
#[arg(long, env)]
2731
pub kubernetes_node_name: String,
2832
}

0 commit comments

Comments
 (0)