gpu-operator icon indicating copy to clipboard operation
gpu-operator copied to clipboard

Add Env valueFrom function

Open mayooot opened this issue 1 year ago • 1 comments

The purpose of this pr is to provide valueFrom functionality for CRD, like: environment-variable-expose-pod-information

The main change is to the CRD definition under api/nvidia/xxx_types.go, from the custom struct EnvVar to corev1.EnvVar.

Why did you add this feature?

We modified the k8s-device-plugin code to support multiple gpu spec via valueFrom. And for the gpu-operator modification, we've tested it ourselves to make sure it's not a problem.

The main reason for this is that we believe that the EnvVar struct should be consistent with the K8s API instead of using a custom struct.

mayooot avatar Jun 07 '24 03:06 mayooot

@mayooot one of the primary reason was that ClusterPolicy CRD is already overloaded with many operands and close to 256KB limit. We cannot upgrade operator anymore after this limit. We need to get this information by other means and handle the translation in the code while updating the spec.

shivamerla avatar Jul 02 '24 01:07 shivamerla

@mayooot one of the primary reason was that ClusterPolicy CRD is already overloaded with many operands and close to 256KB limit. We cannot upgrade operator anymore after this limit. We need to get this information by other means and handle the translation in the code while updating the spec.

@shivamerla Hi, does this function support that? If yes, I can continue working on it :)

mayooot avatar Jul 16 '25 13:07 mayooot