Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 1,697 for intPtr (0.19 sec)

  1. pkg/controller/deployment/rolling_test.go

    	"testing"
    
    	apps "k8s.io/api/apps/v1"
    	"k8s.io/apimachinery/pkg/util/intstr"
    	"k8s.io/client-go/kubernetes/fake"
    	core "k8s.io/client-go/testing"
    	"k8s.io/client-go/tools/record"
    	"k8s.io/klog/v2/ktesting"
    )
    
    func TestDeploymentController_reconcileNewReplicaSet(t *testing.T) {
    	tests := []struct {
    		deploymentReplicas  int32
    		maxSurge            intstr.IntOrString
    		oldReplicas         int32
    		newReplicas         int32
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 08 09:10:50 UTC 2023
    - 11K bytes
    - Viewed (0)
  2. pkg/apis/policy/validation/validation_test.go

    	}
    }
    
    func TestValidateMinAvailablePodDisruptionBudgetSpec(t *testing.T) {
    	successCases := []intstr.IntOrString{
    		intstr.FromString("0%"),
    		intstr.FromString("1%"),
    		intstr.FromString("100%"),
    		intstr.FromInt32(0),
    		intstr.FromInt32(1),
    		intstr.FromInt32(100),
    	}
    	for _, c := range successCases {
    		spec := policy.PodDisruptionBudgetSpec{
    			MinAvailable: &c,
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 07 20:44:13 UTC 2023
    - 9.1K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/util/intstr/instr_fuzz.go

    limitations under the License.
    */
    
    package intstr
    
    import (
    	fuzz "github.com/google/gofuzz"
    )
    
    // Fuzz satisfies fuzz.Interface
    func (intstr *IntOrString) Fuzz(c fuzz.Continue) {
    	if intstr == nil {
    		return
    	}
    	if c.RandBool() {
    		intstr.Type = Int
    		c.Fuzz(&intstr.IntVal)
    		intstr.StrVal = ""
    	} else {
    		intstr.Type = String
    		intstr.IntVal = 0
    		c.Fuzz(&intstr.StrVal)
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 24 19:47:49 UTC 2021
    - 1K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. src/encoding/gob/encode.go

    	defer enc.freeEncoderState(state)
    	state.fieldnum = -1
    	for i := 0; i < len(engine.instr); i++ {
    		instr := &engine.instr[i]
    		if i >= value.NumField() {
    			// encStructTerminator
    			instr.op(instr, state, reflect.Value{})
    			break
    		}
    		field := value.FieldByIndex(instr.index)
    		if instr.indir > 0 {
    			field = encIndirect(field, instr.indir)
    			// TODO: Is field guaranteed valid? If so we could avoid this check.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 02:00:26 UTC 2024
    - 19K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top