Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 102 for IntPtr (0.22 sec)

  1. pkg/apis/apps/validation/validation.go

    // percentage.
    func ValidatePositiveIntOrPercent(intOrPercent intstr.IntOrString, fldPath *field.Path) field.ErrorList {
    	allErrs := field.ErrorList{}
    	switch intOrPercent.Type {
    	case intstr.String:
    		for _, msg := range validation.IsValidPercent(intOrPercent.StrVal) {
    			allErrs = append(allErrs, field.Invalid(fldPath, intOrPercent, msg))
    		}
    	case intstr.Int:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Apr 06 22:11:20 UTC 2024
    - 41.4K bytes
    - Viewed (0)
  2. staging/src/k8s.io/api/policy/v1/types.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package v1
    
    import (
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	"k8s.io/apimachinery/pkg/util/intstr"
    )
    
    // DisruptionBudgetCause is the status cause returned for eviction failures caused by PodDisruptionBudget violations.
    const DisruptionBudgetCause metav1.CauseType = "DisruptionBudget"
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 23 17:42:49 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  3. pkg/apis/core/v1/defaults.go

    	}
    	for i := range obj.Spec.Ports {
    		sp := &obj.Spec.Ports[i]
    		if sp.Protocol == "" {
    			sp.Protocol = v1.ProtocolTCP
    		}
    		if sp.TargetPort == intstr.FromInt32(0) || sp.TargetPort == intstr.FromString("") {
    			sp.TargetPort = intstr.FromInt32(sp.Port)
    		}
    	}
    	// Defaults ExternalTrafficPolicy field for externally-accessible service
    	// to Global for consistency.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 19 22:24:15 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  4. operator/pkg/apis/istio/v1alpha1/validation/validation.go

    			tp := 0
    			if p == nil {
    				continue
    			}
    			if p.TargetPort != nil && p.TargetPort.Type == int64(intstr.String) {
    				// Do not validate named ports
    				continue
    			}
    			if p.TargetPort != nil && p.TargetPort.Type == int64(intstr.Int) {
    				tp = int(p.TargetPort.IntVal.GetValue())
    			}
    			if tp == 0 && p.Port > 1024 {
    				// Target port defaults to port. If its >1024, it is safe.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 16 20:02:28 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  5. tests/integration/pilot/tunneling_test.go

    // limitations under the License.
    
    package pilot
    
    import (
    	"context"
    	"fmt"
    	"os"
    	"strings"
    	"sync"
    	"testing"
    	"time"
    
    	corev1 "k8s.io/api/core/v1"
    	"k8s.io/apimachinery/pkg/util/intstr"
    
    	"istio.io/istio/pkg/config/protocol"
    	"istio.io/istio/pkg/test/framework"
    	"istio.io/istio/pkg/test/framework/components/echo"
    	"istio.io/istio/pkg/test/framework/components/echo/common/ports"
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 08 22:02:59 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  6. pkg/controller/statefulset/stateful_set_utils.go

    // or 0% < value <= 100% if it is a percentage, so we don't have to consider other cases.
    func getStatefulSetMaxUnavailable(maxUnavailable *intstr.IntOrString, replicaCount int) (int, error) {
    	maxUnavailableNum, err := intstr.GetScaledValueFromIntOrPercent(intstr.ValueOrDefault(maxUnavailable, intstr.FromInt32(1)), replicaCount, false)
    	if err != nil {
    		return 0, err
    	}
    	// maxUnavailable might be zero for small percentage with round down.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 05 19:06:41 UTC 2024
    - 26.7K bytes
    - Viewed (0)
  7. pkg/apis/core/v1/defaults_test.go

    	if out.Spec.Ports[0].TargetPort != intstr.FromInt32(1234) {
    		t.Errorf("Expected TargetPort to be defaulted, got %v", out.Spec.Ports[0].TargetPort)
    	}
    
    	in = &v1.Service{Spec: v1.ServiceSpec{Ports: []v1.ServicePort{{Port: 1234, TargetPort: intstr.FromInt32(5678)}}}}
    	obj = roundTrip(t, runtime.Object(in))
    	out = obj.(*v1.Service)
    	if out.Spec.Ports[0].TargetPort != intstr.FromInt32(5678) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 84.4K bytes
    - Viewed (0)
  8. pkg/apis/core/fuzzer/fuzzer.go

    				ss.Ports = append(ss.Ports, core.ServicePort{})
    				c.Fuzz(&ss.Ports[0])
    			}
    			for i := range ss.Ports {
    				switch ss.Ports[i].TargetPort.Type {
    				case intstr.Int:
    					ss.Ports[i].TargetPort.IntVal = 1 + ss.Ports[i].TargetPort.IntVal%65535 // non-zero
    				case intstr.String:
    					ss.Ports[i].TargetPort.StrVal = "x" + ss.Ports[i].TargetPort.StrVal // non-empty
    				}
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 26 04:32:01 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  9. common-protos/k8s.io/api/apps/v1beta1/generated.proto

    import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
    import "k8s.io/apimachinery/pkg/runtime/generated.proto";
    import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
    import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";
    
    // Package-wide variables from generator "generated".
    option go_package = "k8s.io/api/apps/v1beta1";
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Mar 11 18:43:24 UTC 2024
    - 24K bytes
    - Viewed (0)
  10. staging/src/k8s.io/api/policy/v1/generated.pb.go

    	github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
    	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    
    	math "math"
    	math_bits "math/bits"
    	reflect "reflect"
    	strings "strings"
    
    	intstr "k8s.io/apimachinery/pkg/util/intstr"
    )
    
    // Reference imports to suppress errors if they are not otherwise used.
    var _ = proto.Marshal
    var _ = fmt.Errorf
    var _ = math.Inf
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:37 UTC 2024
    - 45.1K bytes
    - Viewed (0)
Back to top