Files
harmony/examples/install_rook_ceph/env.sh
Sylvain Tremblay a661b1d078 fix(examples): drop unneeded env vars from install_rook_ceph/env.sh
Two vars in the previous env.sh were either dead code or actively broken
for this example's flow:

  HARMONY_PROFILE
    Only read by K8sAnywhereTopology::current_target(), which is only
    invoked by Scores implementing MultiTargetTopology (ntfy, application
    packaging, app monitoring). None of the Scores in install_rook_ceph
    require that trait, so the value is never read and the panic case
    is never reached. Removed.

  HARMONY_USE_SYSTEM_KUBECONFIG=true
    Setting this to true is actively worse: try_get_or_install_k8s_client
    hits `todo!()` at k8s_anywhere.rs:900 when this branch is taken. The
    correct way to point at an existing kubeconfig is the standard
    KUBECONFIG env var (or the default $HOME/.kube/config fallback in
    get_kube_config_path()). Removed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 07:49:16 -04:00

32 lines
1.4 KiB
Bash

# shellcheck shell=bash
# Source this file before running the example:
# source env.sh && cargo run -p example-install-rook-ceph
# ---------- Target an existing cluster (no local K3D) ------------------------
# This example is meant to drive a real cluster (pico OKD, vanilla K8s with an
# ingress, etc.) — not a throwaway local one. Force K8sAnywhereTopology to use
# whatever cluster the kubeconfig points at.
export HARMONY_USE_LOCAL_K3D=false
# K8sAnywhereTopology resolves the kubeconfig via:
# 1. KUBECONFIG env var
# 2. fallback: $HOME/.kube/config
# Uncomment if your config isn't in the default location.
# export KUBECONFIG=/path/to/your/kubeconfig
# Pin to a specific kubectl context if your kubeconfig has more than one.
# export HARMONY_K8S_CONTEXT=my-pico-okd
# ---------- Harmony state storage (per-example boilerplate) ------------------
# This example doesn't actually touch harmony_secret or the SQLite DB, but
# other examples in the workspace use this same boilerplate and these vars
# don't cost anything when unread.
export HARMONY_SECRET_NAMESPACE=install-rook-ceph
export HARMONY_SECRET_STORE=file
export HARMONY_DATABASE_URL=sqlite://harmony_install_rook_ceph.sqlite
# ---------- Logging ----------------------------------------------------------
# The RookCephClusterScore wait loops log every `ceph health` transition at
# info level; debug shows polling cadence.
export RUST_LOG=harmony=debug