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).
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:
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
Enter the URL of a public GitHub repository