Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for RestartPolicyNever (0.42 sec)

  1. pkg/kubelet/kuberuntime/kuberuntime_manager_test.go

    				ContainersToKill:  getKillMap(basePod, baseStatus, []int{}),
    			},
    		},
    		"don't restart containers if RestartPolicy == Never": {
    			mutatePodFn: func(pod *v1.Pod) { pod.Spec.RestartPolicy = v1.RestartPolicyNever },
    			mutateStatusFn: func(status *kubecontainer.PodStatus) {
    				// Don't restart any containers.
    				status.ContainerStatuses[0].State = kubecontainer.ContainerStateExited
    				status.ContainerStatuses[0].ExitCode = 0
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 14 16:09:17 UTC 2024
    - 96K bytes
    - Viewed (0)
  2. pkg/kubelet/status/status_manager_test.go

    				status.Phase = v1.PodFailed
    			},
    		},
    		{
    			name: "last termination state set",
    			pod: newPod(0, 1, func(pod *v1.Pod) {
    				pod.Spec.RestartPolicy = v1.RestartPolicyNever
    				pod.Status.Phase = v1.PodRunning
    				pod.Status.ContainerStatuses = []v1.ContainerStatus{
    					{
    						Name:                 "0",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 02 16:27:19 UTC 2024
    - 68.1K bytes
    - Viewed (0)
  3. pkg/registry/core/podtemplate/strategy_test.go

    	}
    
    	updatedTemplate := podTemplate.DeepCopy()
    	updatedTemplate.ResourceVersion = "10"
    	updatedTemplate.Generation = 999
    	updatedTemplate.Template.Spec.RestartPolicy = api.RestartPolicyNever
    
    	// ensure generation is updated for spec changes
    	Strategy.PrepareForUpdate(ctx, updatedTemplate, podTemplate)
    	if updatedTemplate.Generation != 2 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 18 14:42:36 UTC 2021
    - 2.9K bytes
    - Viewed (0)
  4. pkg/kubelet/prober/common_test.go

    }
    
    func getTestPod() *v1.Pod {
    	container := v1.Container{
    		Name: testContainerName,
    	}
    	pod := v1.Pod{
    		Spec: v1.PodSpec{
    			Containers:    []v1.Container{container},
    			RestartPolicy: v1.RestartPolicyNever,
    		},
    	}
    	pod.Name = "testPod"
    	pod.UID = testPodUID
    	return &pod
    }
    
    func setTestProbe(pod *v1.Pod, probeType probeType, probeSpec v1.Probe) {
    	// All tests rely on the fake exec prober.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 12 16:57:26 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  5. pkg/apis/batch/validation/validation.go

    	} else if spec.Template.Spec.RestartPolicy != api.RestartPolicyOnFailure && spec.Template.Spec.RestartPolicy != api.RestartPolicyNever {
    		allErrs = append(allErrs, field.NotSupported(fldPath.Child("template", "spec", "restartPolicy"),
    			spec.Template.Spec.RestartPolicy, []api.RestartPolicy{api.RestartPolicyOnFailure, api.RestartPolicyNever}))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 08 16:43:24 UTC 2024
    - 51.2K bytes
    - Viewed (0)
  6. cmd/kubeadm/app/phases/upgrade/health.go

    			TTLSecondsAfterFinished: ptr.To[int32](int32(timeout.Seconds()) + 5), // Make sure it's more than 'timeout'.
    			Template: v1.PodTemplateSpec{
    				Spec: v1.PodSpec{
    					RestartPolicy: v1.RestartPolicyNever,
    					SecurityContext: &v1.PodSecurityContext{
    						RunAsUser:    ptr.To[int64](999),
    						RunAsGroup:   ptr.To[int64](999),
    						RunAsNonRoot: ptr.To(true),
    					},
    					Tolerations: []v1.Toleration{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 26 09:18:02 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  7. pkg/volume/util/operationexecutor/operation_executor_test.go

    					VolumeMounts: []v1.VolumeMount{
    						{
    							Name:      secretName,
    							MountPath: "/data",
    						},
    					},
    				},
    			},
    			RestartPolicy: v1.RestartPolicyNever,
    		},
    	}
    }
    
    func getTestPodWithGCEPD(podName, pdName string) *v1.Pod {
    	return &v1.Pod{
    		ObjectMeta: metav1.ObjectMeta{
    			Name: podName,
    			UID:  types.UID(podName + string(uuid.NewUUID())),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 26.9K bytes
    - Viewed (0)
  8. pkg/kubelet/prober/worker.go

    			w.resultsManager.Set(w.containerID, results.Failure, w.pod)
    		}
    		// Abort if the container will not be restarted.
    		return c.State.Terminated == nil ||
    			w.pod.Spec.RestartPolicy != v1.RestartPolicyNever
    	}
    
    	// Graceful shutdown of the pod.
    	if w.pod.ObjectMeta.DeletionTimestamp != nil && (w.probeType == liveness || w.probeType == startup) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jul 27 01:28:06 UTC 2023
    - 10.7K bytes
    - Viewed (0)
  9. pkg/kubelet/container/helpers.go

    	if status.State == ContainerStateUnknown || status.State == ContainerStateCreated {
    		return true
    	}
    	// Check RestartPolicy for dead container
    	if pod.Spec.RestartPolicy == v1.RestartPolicyNever {
    		klog.V(4).InfoS("Already ran container, do nothing", "pod", klog.KObj(pod), "containerName", container.Name)
    		return false
    	}
    	if pod.Spec.RestartPolicy == v1.RestartPolicyOnFailure {
    		// Check the exit code.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  10. pkg/apis/core/fuzzer/fuzzer.go

    			*p = policies[c.Rand.Intn(len(policies))]
    		},
    		func(rp *core.RestartPolicy, c fuzz.Continue) {
    			policies := []core.RestartPolicy{core.RestartPolicyAlways, core.RestartPolicyNever, core.RestartPolicyOnFailure}
    			*rp = policies[c.Rand.Intn(len(policies))]
    		},
    		// core.DownwardAPIVolumeFile needs to have a specific func since FieldRef has to be
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 26 04:32:01 UTC 2024
    - 18.5K bytes
    - Viewed (0)
Back to top