Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for PodAdded (0.21 sec)

  1. cni/pkg/nodeagent/fakes_test.go

    }
    
    func (f *fakeZtunnel) Run(ctx context.Context) {
    }
    
    func (f *fakeZtunnel) PodDeleted(ctx context.Context, uid string) error {
    	f.deletedPods.Add(1)
    	return nil
    }
    
    func (f *fakeZtunnel) PodAdded(ctx context.Context, pod *corev1.Pod, netns Netns) error {
    	f.addedPods.Add(1)
    	return f.addError
    }
    
    func (f *fakeZtunnel) Close() error {
    	return nil
    }
    
    // fakeNs is a mock struct for testing
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  2. cni/pkg/nodeagent/ztunnelserver.go

    )
    
    var ztunnelConnected = monitoring.NewGauge("ztunnel_connected",
    	"number of connections to ztunnel")
    
    type ZtunnelServer interface {
    	Run(ctx context.Context)
    	PodDeleted(ctx context.Context, uid string) error
    	PodAdded(ctx context.Context, pod *v1.Pod, netns Netns) error
    	Close() error
    }
    
    /*
    To clean up stale ztunnels
    
    	we may need to ztunnel to send its (uid, bootid / boot time) to us
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  3. cni/pkg/nodeagent/ztunnelserver_test.go

    	}
    	sendAck(ztunClient)
    
    	// now remove the pod
    	ztunnelServer := fixture.ztunServer
    	errChan := make(chan error)
    	pod2, ns2 := podAndNetns()
    	go func() {
    		errChan <- ztunnelServer.PodAdded(ctx, pod2, ns2)
    	}()
    	// read the msg to delete from ztunnel
    	m, fds = readRequest(t, ztunClient)
    	assert.Equal(t, len(fds), 1)
    	assert.Equal(t, m.Payload.(*zdsapi.WorkloadRequest_Add).Add.Uid, string(pod2.UID))
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  4. cni/pkg/nodeagent/net.go

    		return NewErrPartialAdd(err)
    	}
    	return nil
    }
    
    func (s *NetServer) sendPodToZtunnelAndWaitForAck(ctx context.Context, pod *corev1.Pod, netns Netns) error {
    	return s.ztunnelServer.PodAdded(ctx, pod, netns)
    }
    
    // ConstructInitialSnapshot takes a "snapshot" of current ambient pods and
    //
    // 1. Constructs a ztunnel state message to initialize ztunnel
    // 2. Syncs the host ipset
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 12.1K bytes
    - Viewed (1)
Back to top