I am using the go-client library.
I am searching for mounted secrets inside the workload.
In my example we have two workloads: daemonset
and deployments
.
Although both of them are different objects, they have similar structure:
type DaemonSet struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Spec DaemonSetSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
Status DaemonSetStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}
type Deployment struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
Spec DeploymentSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
Status DeploymentStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}
I am getting errors of:
Unresolved reference
This happens because the compilation doesn't know what object I am referring to: v1beta2.DaemonSetList
or v1beta2.DeploymentList
.
How can I resolve it for both of them ?