Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 196 for IntPtr (0.13 sec)

  1. pkg/kube/apimirror/probe.go

    // UnmarshalJSON implements the json.Unmarshaller interface.
    func (intstr *IntOrString) UnmarshalJSON(value []byte) error {
    	if value[0] == '"' {
    		intstr.Type = String
    		return json.Unmarshal(value, &intstr.StrVal)
    	}
    	intstr.Type = Int
    	return json.Unmarshal(value, &intstr.IntVal)
    }
    
    // MarshalJSON implements the json.Marshaller interface.
    func (intstr IntOrString) MarshalJSON() ([]byte, error) {
    	switch intstr.Type {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  2. pkg/controlplane/controller/kubernetesservice/controller_test.go

    				{Name: "baz", Port: 1000, Protocol: "TCP", TargetPort: intstr.FromInt32(1000)},
    			},
    			serviceType: corev1.ServiceTypeClusterIP,
    			service: &corev1.Service{
    				ObjectMeta: om("foo"),
    				Spec: corev1.ServiceSpec{
    					Ports: []corev1.ServicePort{
    						{Name: "foo", Port: 8080, Protocol: "TCP", TargetPort: intstr.FromInt32(8080)},
    					},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jul 13 10:41:06 UTC 2023
    - 15.3K bytes
    - Viewed (0)
  3. pkg/kubelet/lifecycle/handlers_test.go

    	tests := []struct {
    		Name        string
    		Port        intstr.IntOrString
    		ExpectError bool
    		Expected    string
    	}{
    		{
    			Name:     "consistent/with port",
    			Port:     intstr.FromString("70"),
    			Expected: "https://foo:70/bar",
    		}, {
    			Name:        "consistent/without port",
    			Port:        intstr.FromString(""),
    			ExpectError: true,
    		},
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 24.4K bytes
    - Viewed (0)
  4. pkg/controller/daemon/update_test.go

    	ds.Spec.Template.Spec.Containers[0].Image = "foo2/bar2"
    	ds.Spec.UpdateStrategy.Type = apps.RollingUpdateDaemonSetStrategyType
    	intStr := intstr.FromInt32(int32(maxUnavailable))
    	ds.Spec.UpdateStrategy.RollingUpdate = &apps.RollingUpdateDaemonSet{MaxUnavailable: &intStr}
    	manager.dsStore.Update(ds)
    
    	clearExpectations(t, manager, ds, podControl)
    	expectSyncDaemonSets(t, manager, ds, podControl, 0, maxUnavailable, 0)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Feb 10 21:10:35 UTC 2024
    - 28.9K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/util/proxy/proxy_test.go

    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	"k8s.io/apimachinery/pkg/util/intstr"
    	v1listers "k8s.io/client-go/listers/core/v1"
    	"k8s.io/client-go/tools/cache"
    )
    
    func TestResolve(t *testing.T) {
    	matchingEndpoints := func(svc *v1.Service) []*v1.Endpoints {
    		ports := []v1.EndpointPort{}
    		for _, p := range svc.Spec.Ports {
    			if p.TargetPort.Type != intstr.Int {
    				continue
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 01 07:16:27 UTC 2023
    - 8.6K bytes
    - Viewed (0)
  6. pkg/probe/util.go

    package probe
    
    import (
    	"fmt"
    	"strconv"
    
    	v1 "k8s.io/api/core/v1"
    	"k8s.io/apimachinery/pkg/util/intstr"
    )
    
    func ResolveContainerPort(param intstr.IntOrString, container *v1.Container) (int, error) {
    	port := -1
    	var err error
    	switch param.Type {
    	case intstr.Int:
    		port = param.IntValue()
    	case intstr.String:
    		if port, err = findPortByName(container, param.StrVal); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 19 16:51:52 UTC 2022
    - 1.6K bytes
    - Viewed (0)
  7. staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta1/rollingupdatedeployment.go

    package v1beta1
    
    import (
    	intstr "k8s.io/apimachinery/pkg/util/intstr"
    )
    
    // RollingUpdateDeploymentApplyConfiguration represents an declarative configuration of the RollingUpdateDeployment type for use
    // with apply.
    type RollingUpdateDeploymentApplyConfiguration struct {
    	MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
    	MaxSurge       *intstr.IntOrString `json:"maxSurge,omitempty"`
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 04 18:31:34 UTC 2021
    - 2.2K bytes
    - Viewed (0)
  8. staging/src/k8s.io/client-go/applyconfigurations/apps/v1beta2/rollingupdatedaemonset.go

    package v1beta2
    
    import (
    	intstr "k8s.io/apimachinery/pkg/util/intstr"
    )
    
    // RollingUpdateDaemonSetApplyConfiguration represents an declarative configuration of the RollingUpdateDaemonSet type for use
    // with apply.
    type RollingUpdateDaemonSetApplyConfiguration struct {
    	MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
    	MaxSurge       *intstr.IntOrString `json:"maxSurge,omitempty"`
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 04 18:31:34 UTC 2021
    - 2.2K bytes
    - Viewed (0)
  9. pkg/kubelet/prober/prober_test.go

    	}{
    		{&v1.TCPSocketAction{Port: intstr.FromInt32(-1)}, false, "", -1},
    		{&v1.TCPSocketAction{Port: intstr.FromString("")}, false, "", -1},
    		{&v1.TCPSocketAction{Port: intstr.FromString("-1")}, false, "", -1},
    		{&v1.TCPSocketAction{Port: intstr.FromString("not-found")}, false, "", -1},
    		{&v1.TCPSocketAction{Port: intstr.FromString("found")}, true, "1.2.3.4", 93},
    		{&v1.TCPSocketAction{Port: intstr.FromInt32(76)}, true, "1.2.3.4", 76},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 01 07:17:35 UTC 2023
    - 9.7K bytes
    - Viewed (0)
  10. pkg/apis/apps/fuzzer/fuzzer.go

    				j.RollingUpdate = nil
    			} else {
    				rollingUpdate := apps.RollingUpdateDeployment{}
    				if c.RandBool() {
    					rollingUpdate.MaxUnavailable = intstr.FromInt32(c.Rand.Int31())
    					rollingUpdate.MaxSurge = intstr.FromInt32(c.Rand.Int31())
    				} else {
    					rollingUpdate.MaxSurge = intstr.FromString(fmt.Sprintf("%d%%", c.Rand.Int31()))
    				}
    				j.RollingUpdate = &rollingUpdate
    			}
    		},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 01 07:16:15 UTC 2023
    - 5.2K bytes
    - Viewed (0)
Back to top