I'm working on a MutatingAdmissionWebhook monitoring Deployment objects in Go. The webhook is running and receives the request correctly.
I am trying to read through the Deployment->Spec->Container->env List.
I am able to get the env list, but I have ConfigMapKeyRef defined for these env vars, which is coming in as nil.
When I dumped the ValueFrom here is what I got
%!(EXTRA *v1.EnvVarSource=&EnvVarSource{FieldRef:nil,ResourceFieldRef:nil,
ConfigMapKeyRef:nil,SecretKeyRef:&SecretKeySelector{
LocalObjectReference:LocalObjectReference{Name:myuser,},Key:username,Optional:nil,},})
I am expecting to find a full name of the ConfigMap in the ConfigMapKeyRef.
I'm running Kubernetes Client v1.14.0
Any help to solve this?
Thanks,
-Sreeni