- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for ValidatePodLogOptions (0.22 sec)
-
pkg/apis/core/v1/validation/validation.go
} } return allErrs } // ValidatePodLogOptions checks if options that are set are at the correct // value. Any incorrect value will be returned to the ErrorList. func ValidatePodLogOptions(opts *v1.PodLogOptions) field.ErrorList { allErrs := field.ErrorList{} if opts.TailLines != nil && *opts.TailLines < 0 {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Oct 28 07:31:28 UTC 2023 - 6.7K bytes - Viewed (0) -
pkg/apis/core/v1/validation/validation_test.go
TailLines: &positiveLine, SinceSeconds: &sinceSecondsGreaterThan1, }, }} for _, tc := range successCase { t.Run(tc.name, func(t *testing.T) { if errs := ValidatePodLogOptions(&tc.podLogOptions); len(errs) != 0 { t.Errorf("unexpected error: %v", errs) } }) } errorCase := []struct { name string podLogOptions v1.PodLogOptions }{{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Sat Oct 28 07:31:28 UTC 2023 - 11.2K bytes - Viewed (0) -
pkg/kubelet/server/server.go
response.WriteError(http.StatusBadRequest, fmt.Errorf(`{"message": "Unable to decode query."}`)) return } logOptions.TypeMeta = metav1.TypeMeta{} if errs := validation.ValidatePodLogOptions(logOptions); len(errs) > 0 { response.WriteError(http.StatusUnprocessableEntity, fmt.Errorf(`{"message": "Invalid request."}`)) return } pod, ok := s.host.GetPodByName(podNamespace, podID) if !ok {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jun 04 06:25:43 UTC 2024 - 40.1K bytes - Viewed (0) -
pkg/apis/core/validation/validation.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 22:40:29 UTC 2024 - 349.5K bytes - Viewed (0) -
pkg/apis/core/validation/validation_test.go
{core.PodLogOptions{SinceSeconds: &positive}, 0}, {core.PodLogOptions{SinceSeconds: &zero}, 1}, {core.PodLogOptions{SinceTime: &now}, 0}, } for i, test := range tests { errs := ValidatePodLogOptions(&test.opt) if test.errs != len(errs) { t.Errorf("%d: Unexpected errors: %v", i, errs) } } } func TestValidateConfigMap(t *testing.T) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 22:40:29 UTC 2024 - 857.7K bytes - Viewed (0)