Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for PushCNIEvent (0.17 sec)

  1. cni/pkg/plugin/cnieventclient_test.go

    		res.WriteHeader(http.StatusOK)
    		res.Write([]byte("server happy"))
    	}))
    	defer func() { testServer.Close() }()
    
    	cniC := fakeCNIEventClient(testServer.URL)
    
    	err := PushCNIEvent(cniC, fakeCmdArgs, []*cniv1.IPConfig{&fakePrevResultIPConfig}, "testpod", "testns")
    
    	assert.NoError(t, err)
    }
    
    func TestPushCNIAddEventNotOK(t *testing.T) {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  2. cni/pkg/plugin/cnieventclient.go

    				return net.Dial("unix", address)
    			},
    		},
    		Timeout: 1000 * time.Millisecond,
    	}
    	eventC := CNIEventClient{
    		client: c,
    		url:    "http://unix" + path,
    	}
    	return eventC
    }
    
    func PushCNIEvent(cniClient CNIEventClient, event *skel.CmdArgs, prevResIps []*cniv1.IPConfig, podName, podNamespace string) error {
    	if event == nil {
    		return fmt.Errorf("unable to push CNI event, CmdArgs event was nil")
    	}
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 2.4K bytes
    - Viewed (0)
  3. cni/pkg/plugin/plugin.go

    		// Only send event if this pod "would be" an ambient-watched pod - otherwise skip
    		if podIsAmbient {
    			cniClient := newCNIClient(conf.CNIEventAddress, constants.CNIAddEventPath)
    			if err = PushCNIEvent(cniClient, args, prevResult.IPs, podName, podNamespace); err != nil {
    				log.Errorf("istio-cni cmdAdd failed to signal node Istio CNI agent: %s", err)
    				return err
    			}
    			return nil
    		}
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Sat Feb 10 00:31:55 GMT 2024
    - 10.4K bytes
    - Viewed (0)
Back to top