- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 136 for IntPtr (0.11 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) -
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) -
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) -
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) -
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) -
pkg/apis/apps/v1beta2/defaults.go
// Set default MaxUnavailable as 1 by default. updateStrategy.RollingUpdate.MaxUnavailable = ptr.To(intstr.FromInt32(1)) } if updateStrategy.RollingUpdate.MaxSurge == nil { // Set default MaxSurge as 0 by default. updateStrategy.RollingUpdate.MaxSurge = ptr.To(intstr.FromInt32(0)) } } if obj.Spec.RevisionHistoryLimit == nil { obj.Spec.RevisionHistoryLimit = new(int32)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Sep 08 09:10:50 UTC 2023 - 5.5K bytes - Viewed (0) -
pkg/apis/apps/v1/defaults.go
if strategy.RollingUpdate.MaxUnavailable == nil { // Set default MaxUnavailable as 25% by default. maxUnavailable := intstr.FromString("25%") strategy.RollingUpdate.MaxUnavailable = &maxUnavailable } if strategy.RollingUpdate.MaxSurge == nil { // Set default MaxSurge as 25% by default. maxSurge := intstr.FromString("25%") strategy.RollingUpdate.MaxSurge = &maxSurge } } if obj.Spec.RevisionHistoryLimit == nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Sep 08 09:10:50 UTC 2023 - 5.4K bytes - Viewed (0) -
operator/pkg/apis/istio/v1alpha1/value_types_json.go
return this.UnmarshalJSON(value) } func (this *IntOrString) ToKubernetes() intstr.IntOrString { if this.IntVal != nil { return intstr.FromInt32(this.GetIntVal().GetValue()) } return intstr.FromString(this.GetStrVal().GetValue())
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sun Apr 21 17:42:54 UTC 2024 - 2.2K bytes - Viewed (0) -
pkg/kubelet/kuberuntime/labels_test.go
Exec: &v1.ExecAction{ Command: []string{"action1", "action2"}, }, HTTPGet: &v1.HTTPGetAction{ Path: "path", Host: "host", Port: intstr.FromInt32(8080), Scheme: "scheme", }, TCPSocket: &v1.TCPSocketAction{ Port: intstr.FromString("80"), }, }, } container := &v1.Container{ Name: "test_container", TerminationMessagePath: "/somepath",
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 22 22:43:36 UTC 2024 - 7.3K bytes - Viewed (0) -
pkg/apis/apps/v1beta1/defaults_test.go
_ "k8s.io/kubernetes/pkg/apis/core/install" "k8s.io/kubernetes/pkg/features" "k8s.io/utils/ptr" ) func TestSetDefaultDeployment(t *testing.T) { defaultIntOrString := intstr.FromString("25%") differentIntOrString := intstr.FromInt32(5) period := int64(v1.DefaultTerminationGracePeriodSeconds) defaultTemplate := v1.PodTemplateSpec{ Spec: v1.PodSpec{ DNSPolicy: v1.DNSClusterFirst,
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 17.4K bytes - Viewed (0)