Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for collectServiceNodePorts (0.3 sec)

  1. pkg/registry/core/service/portallocator/controller/repair.go

    	}
    	return nil
    }
    
    // collectServiceNodePorts returns nodePorts specified in the Service.
    // Please note that:
    //  1. same nodePort with *same* protocol will be duplicated as it is
    //  2. same nodePort with *different* protocol will be deduplicated
    func collectServiceNodePorts(service *corev1.Service) []int {
    	var servicePorts []int
    	// map from nodePort to set of protocols
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Sep 30 15:46:06 UTC 2023
    - 10.4K bytes
    - Viewed (0)
  2. pkg/registry/core/service/storage/alloc.go

    	nodePorts := collectServiceNodePorts(service)
    
    	for _, nodePort := range nodePorts {
    		nodePortOp.ReleaseDeferred(nodePort)
    	}
    }
    
    func (al *Allocators) updateNodePorts(after After, before Before, nodePortOp *portallocator.PortAllocationOperation) error {
    	oldService, newService := before.Service, after.Service
    
    	oldNodePortsNumbers := collectServiceNodePorts(oldService)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 21:05:05 UTC 2023
    - 37.3K bytes
    - Viewed (0)
  3. pkg/registry/core/service/portallocator/controller/repair_test.go

    				},
    				HealthCheckNodePort: 112,
    			},
    			expected: []int{111, 112, 112},
    		},
    	}
    	for _, tc := range tests {
    		t.Run(tc.name, func(t *testing.T) {
    			ports := collectServiceNodePorts(&corev1.Service{
    				ObjectMeta: metav1.ObjectMeta{Namespace: "one", Name: "one"},
    				Spec:       tc.serviceSpec,
    			})
    			sort.Ints(ports)
    			if !reflect.DeepEqual(tc.expected, ports) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Sep 30 15:46:06 UTC 2023
    - 10.6K bytes
    - Viewed (0)
Back to top