func (p *enqueueRequestForPod) addPod(q workqueue.RateLimitingInterface, obj runtime.Object) {
	pod, ok := obj.(*corev1.Pod)
	if !ok {
		return
	}

	sidecarSets, err := p.getPodMatchedSidecarSets(pod)
	if err != nil {
		klog.Errorf("unable to get sidecarSets related with pod %s/%s, err: %v", pod.Namespace, pod.Name, err)
		return
	}

	for _, sidecarSet := range sidecarSets {
		klog.V(3).Infof("Create pod(%s/%s) and reconcile sidecarSet(%s)", pod.Namespace, pod.Name, sidecarSet.Name)
		q.Add(reconcile.Request{
			NamespacedName: types.NamespacedName{
				Name: sidecarSet.Name,
			},
		})
	}
}
// When a pod is added, figure out what sidecarSets it will be a member of and
// enqueue them. obj must have *v1.Pod type.
When a pod is added, figure out what sidecarSets it will be a member of and
enqueue them. obj must have *v1.Pod type.
// When a pod is added figure out what sidecarSets it will be a member of and // enqueue them . obj must have * v1 . Pod type .
func (p *enqueueRequestForPod) addPod(q workqueue.RateLimitingInterface, obj runtime.Object) {
	pod, ok := obj.(*corev1.Pod)
	if !ok {
		return
	}
	sidecarSets, err := p.getPodMatchedSidecarSets(pod)
	if err != nil {
		klog.Errorf("unable to get sidecarSets related with pod %s/%s, err: %v", pod.Namespace, pod.Name, err)
		return
	}
	for _, sidecarSet := range sidecarSets {
		klog.V(3).Infof("Create pod(%s/%s) and reconcile sidecarSet(%s)", pod.Namespace, pod.Name, sidecarSet.Name)
		q.Add(reconcile.Request{
			NamespacedName: types.NamespacedName{
				Name: sidecarSet.Name,
			},
		})
	}
}
func ( p * enqueueRequestForPod ) addPod ( q workqueue . RateLimitingInterface , obj runtime . Object ) { pod , ok := obj . ( * corev1 . Pod ) if ! ok { return } sidecarSets , err := p . getPodMatchedSidecarSets ( pod ) if err != nil { klog . Errorf ( " " , pod . Namespace , pod . Name , err ) return } for _ , sidecarSet := range sidecarSets { klog . V ( 3 ) . Infof ( " " , pod . Namespace , pod . Name , sidecarSet . Name ) q . Add ( reconcile . Request { NamespacedName : types . NamespacedName { Name : sidecarSet . Name , } , } ) } }
When a pod is added, figure out what sidecarSets it will be a member of and
enqueue them.
When a pod is added figure out what sidecarSets it will be a member of and enqueue them .