type HookSidecarList []HookSidecar
type HookSidecar struct { Image string `json:"image"` ImagePullPolicy k8sv1.PullPolicy `json:"imagePullPolicy"`}
func UnmarshalHookSidecarList(vmiObject *v1.VirtualMachineInstance) (HookSidecarList, error) { hookSidecarList := make(HookSidecarList, 0)
if rawRequestedHookSidecarList, requestedHookSidecarListDefined := vmiObject.GetAnnotations()[HookSidecarListAnnotationName]; requestedHookSidecarListDefined { if err := json.Unmarshal([]byte(rawRequestedHookSidecarList), &hookSidecarList); err != nil { return nil, err } }
return hookSidecarList, nil}
Hi Guys,Doing some more advanced integration w/ the sidecar hooks and was wondering if you'd welcome a change of the type of the sidecars hook.Currently the code is this:type HookSidecarList []HookSidecartype HookSidecar struct {Image string `json:"image"`ImagePullPolicy k8sv1.PullPolicy `json:"imagePullPolicy"`}func UnmarshalHookSidecarList(vmiObject *v1.VirtualMachineInstance) (HookSidecarList, error) {hookSidecarList := make(HookSidecarList, 0)if rawRequestedHookSidecarList, requestedHookSidecarListDefined := vmiObject.GetAnnotations()[HookSidecarListAnnotationName]; requestedHookSidecarListDefined {if err := json.Unmarshal([]byte(rawRequestedHookSidecarList), &hookSidecarList); err != nil {return nil, err}}return hookSidecarList, nil}The issue is that I need to pass the sidecar hook a config-map object *per* sidecar hook.Some design has to go in here, but wondering how do you envision passing code.
--
You received this message because you are subscribed to the Google Groups "kubevirt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubevirt-dev...@googlegroups.com.
To post to this group, send email to kubevi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/8314c864-0e1e-47c1-8f24-91921c579e1c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubevirt-dev/CAMuConzyyR%2B07iVTT9C8XBmE2q2_EQVvnPVAVQQNevqkOv%3Dq8Q%40mail.gmail.com.
Yo Alex,can you give some more context of what you are trying to pass?I'm asking to understand where this is going if it's more about additional data for a container or if it's about more flexibility in defining the containers.
I prefer just to extend current struct with the config map field because this struct does not really need to mirror all corev1.Pod fields.Will it be enough for you?