- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 65 for IntPtr (0.14 sec)
-
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) -
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) -
pkg/probe/util_test.go
} func TestResolveContainerPort(t *testing.T) { t.Parallel() type args struct { param intstr.IntOrString container *v1.Container } tests := []struct { name string args args want int wantErr bool }{ { name: "get port by int type", args: args{ param: intstr.IntOrString{Type: 0, IntVal: 443}, container: &v1.Container{}, }, want: 443,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 10 06:14:41 UTC 2023 - 3.9K bytes - Viewed (0) -
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) -
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) -
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) -
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) -
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) -
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) -
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)