Open mayooot opened 3 months ago
@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.
The purpose of this pr is to provide
valueFrom
functionality for CRD, like: environment-variable-expose-pod-informationThe main change is to the CRD definition under
api/nvidia/xxx_types.go
, from the custom structEnvVar
tocorev1.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.