Create configurations that can be easily managed outside your application code. Design configuration parameters to be externalized through appropriate mechanisms like environment variables, config files, or Kubernetes custom resources (CRs). This improves manageability, enables GitOps workflows, and supports different deployment environments.

For Kubernetes-based applications, consider using Custom Resources to abstract complex configurations:

# Example: Using a custom resource for simplified configuration
apiVersion: kubeflow.org/v2
kind: Profile
metadata:
  name: ml
spec:
  resourceQuotaSpec:
    hard:
      cpu: "2"
      memory: 2Gi
      requests.nvidia.com/gpu: "1"
      persistentvolumeclaims: "1"
      requests.storage: "5Gi"
  # Optional: Add LimitRange configurations here

Key practices:

When handling package installation in environments like notebooks, be aware of how configuration choices affect persistence across restarts and different environments.