Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Example: platform-wide MLflow tracing credentials for the operator to copy into session namespaces.
# Apply to the operator namespace (same pattern as ambient-admin-langfuse-secret).
#
# kubectl create secret generic ambient-admin-mlflow-observability-secret -n <operator-ns> \
# --from-literal=MLFLOW_TRACING_ENABLED=true \
# --from-literal=MLFLOW_TRACKING_URI=https://mlflow.example.com \
# --from-literal=MLFLOW_TRACKING_AUTH=kubernetes-namespaced \
# --from-literal=MLFLOW_EXPERIMENT_NAME=ambient-code-sessions \
# --from-literal=MLFLOW_WORKSPACE=my-workspace \
# --from-literal=OBSERVABILITY_BACKENDS=langfuse,mlflow
#
# Keys:
# MLFLOW_TRACING_ENABLED - "true" to enable secret copy + runner env injection
# MLFLOW_TRACKING_URI - required on the runner for MLflow tracing
# MLFLOW_TRACKING_AUTH - auth method; use "kubernetes-namespaced" for MLflow 3.11+ on K8s
# so MLflow sends Authorization (service account JWT) and X-MLFLOW-WORKSPACE
# MLFLOW_EXPERIMENT_NAME - optional (runner default: ambient-code-sessions)
# MLFLOW_WORKSPACE - optional; fixed workspace id for X-MLFLOW-WORKSPACE instead of pod namespace
# OBSERVABILITY_BACKENDS - optional; comma list: langfuse, mlflow (runner default: langfuse only if unset)
apiVersion: v1
kind: Secret
metadata:
name: ambient-admin-mlflow-observability-secret
namespace: CHANGE_ME_OPERATOR_NAMESPACE
type: Opaque
stringData:
MLFLOW_TRACING_ENABLED: "true"
MLFLOW_TRACKING_URI: "https://mlflow.example.com"
MLFLOW_TRACKING_AUTH: "kubernetes-namespaced"
MLFLOW_EXPERIMENT_NAME: "ambient-code-sessions"
OBSERVABILITY_BACKENDS: "langfuse,mlflow"
13 changes: 13 additions & 0 deletions components/manifests/base/core/operator-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,19 @@ spec:
name: ambient-admin-langfuse-secret
key: LANGFUSE_SECRET_KEY
optional: true # Optional: only needed if Langfuse enabled
# MLflow tracing (runner); optional secret managed by platform admin
- name: MLFLOW_TRACING_ENABLED
valueFrom:
secretKeyRef:
name: ambient-admin-mlflow-observability-secret
key: MLFLOW_TRACING_ENABLED
optional: true
- name: OBSERVABILITY_BACKENDS
valueFrom:
secretKeyRef:
name: ambient-admin-mlflow-observability-secret
key: OBSERVABILITY_BACKENDS
optional: true
# Google OAuth client credentials for workspace-mcp
- name: GOOGLE_OAUTH_CLIENT_ID
valueFrom:
Expand Down
5 changes: 3 additions & 2 deletions components/operator/internal/handlers/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ func TransitionToStopped(ctx context.Context, session *unstructured.Unstructured
// Cleanup secrets
deleteCtx, cancel := context.WithTimeout(ctx, 30*time.Second)
defer cancel()
_ = deleteAmbientVertexSecret(deleteCtx, namespace)
_ = deleteAmbientLangfuseSecret(deleteCtx, namespace)
_ = deleteAmbientVertexSecret(deleteCtx, namespace, name)
_ = deleteAmbientLangfuseSecret(deleteCtx, namespace, name)
_ = deleteAmbientMlflowObservabilitySecret(deleteCtx, namespace, name)

return nil
}
Expand Down
Loading
Loading