Back to all reviewers

Environment-aware configuration design

kubeflow/kubeflow
Based on 3 comments
Yaml

Design configurations that work consistently across different environments without requiring environment-specific modifications. Configurations should be parameterized and adaptable to various deployment contexts (development, production, air-gapped environments).

Configurations Yaml

Reviewer Prompt

Design configurations that work consistently across different environments without requiring environment-specific modifications. Configurations should be parameterized and adaptable to various deployment contexts (development, production, air-gapped environments).

Key practices:

  • Avoid hardcoding environment-specific values
  • Parameterize configurations to accept values from environment variables
  • Consider accessibility constraints (like air-gapped environments)
  • Test configurations across different target environments

For example, instead of:

# Only works in master branch with "latest" tag
export CURRENT_CENTRALDB_IMG=docker.io/kubeflownotebookswg/centraldashboard:latest
kustomize build overlays/kserve | kubectl apply -f -

Use a more flexible approach:

# Works across different branches and environments
IMG=$:$
kustomize build overlays/kserve | kubectl apply -f -
kubectl patch deployment $DEPLOYMENT -n kubeflow --patch \
  '{"spec": {"template": {"spec": {"containers": [{"name": "'"$CONTAINER"'","image": "'"$IMG"'"}]}}}}'

Additionally, for UI resources, consider providing configuration options that work in restricted network environments:

# Configurable options for different environments
imageOptions:
  - source: internal  # For air-gapped environments
  - source: external  # For internet-connected environments
3
Comments Analyzed
Yaml
Primary Language
Configurations
Category

Source Discussions