Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for IsStaticPod (0.28 sec)

  1. pkg/kubelet/types/pod_update.go

    	return ok
    }
    
    // IsStaticPod returns true if the pod is a static pod.
    func IsStaticPod(pod *v1.Pod) bool {
    	source, err := GetPodSource(pod)
    	return err == nil && source != ApiserverSource
    }
    
    // IsCriticalPod returns true if pod's priority is greater than or equal to SystemCriticalPriority.
    func IsCriticalPod(pod *v1.Pod) bool {
    	if IsStaticPod(pod) {
    		return true
    	}
    	if IsMirrorPod(pod) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 07 22:26:12 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  2. pkg/kubelet/types/pod_update_test.go

    			expected: false,
    		},
    	}
    
    	for _, test := range tests {
    		t.Run(test.name, func(t *testing.T) {
    			isStaticPod := IsStaticPod(test.pod)
    			assert.Equal(t, test.expected, isStaticPod)
    		})
    	}
    }
    
    func TestIsCriticalPod(t *testing.T) {
    	tests := []struct {
    		name     string
    		pod      *v1.Pod
    		expected bool
    	}{
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 21 08:20:50 UTC 2023
    - 10.4K bytes
    - Viewed (0)
  3. pkg/kubelet/lifecycle/predicate.go

    			})
    		} else {
    			reasons = append(reasons, &PredicateFailureError{r.Name, r.Reason})
    		}
    	}
    
    	// Check taint/toleration except for static pods
    	if !types.IsStaticPod(pod) {
    		_, isUntolerated := corev1.FindMatchingUntoleratedTaint(nodeInfo.Node().Spec.Taints, pod.Spec.Tolerations, func(t *v1.Taint) bool {
    			// Kubelet is only interested in the NoExecute taint.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Oct 19 00:47:50 UTC 2023
    - 10.9K bytes
    - Viewed (0)
  4. pkg/kubelet/status/status_manager.go

    				ExitCode: 137,
    			},
    		}
    	}
    
    	// Make sure all pods are transitioned to a terminal phase.
    	// TODO(#116484): Also assign terminal phase to static an pods.
    	if !kubetypes.IsStaticPod(pod) {
    		switch status.Phase {
    		case v1.PodSucceeded, v1.PodFailed:
    			// do nothing, already terminal
    		case v1.PodPending, v1.PodRunning:
    			if status.Phase == v1.PodRunning && isCached {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 02 16:27:19 UTC 2024
    - 44.3K bytes
    - Viewed (0)
  5. pkg/kubelet/pod/pod_manager.go

    	mirrorToPod = make(map[kubetypes.MirrorPodUID]kubetypes.ResolvedPodUID, len(pm.translationByUID))
    	// Insert empty translation mapping for all static pods.
    	for uid, pod := range pm.podByUID {
    		if !kubetypes.IsStaticPod(pod) {
    			continue
    		}
    		podToMirror[uid] = ""
    	}
    	// Fill in translations. Notice that if there is no mirror pod for a
    	// static pod, its uid will be translated into empty string "". This
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 06:06:00 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  6. pkg/kubelet/config/config.go

    			if ref.Annotations == nil {
    				ref.Annotations = make(map[string]string)
    			}
    			ref.Annotations[kubetypes.ConfigSourceAnnotationKey] = source
    			// ignore static pods
    			if !kubetypes.IsStaticPod(ref) {
    				s.startupSLIObserver.ObservedPodOnWatch(ref, time.Now())
    			}
    			if existing, found := oldPods[ref.UID]; found {
    				pods[ref.UID] = existing
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  7. pkg/kubelet/kubelet_getters.go

    	pods := kl.podManager.GetPods()
    	// a kubelet running without apiserver requires an additional
    	// update of the static pod status. See #57106
    	for i, p := range pods {
    		if kubelettypes.IsStaticPod(p) {
    			if status, ok := kl.statusManager.GetPodStatus(p.UID); ok {
    				klog.V(2).InfoS("Pod status updated", "pod", klog.KObj(p), "status", status.Phase)
    				// do not mutate the cache
    				p = p.DeepCopy()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 09 00:48:07 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  8. pkg/kubelet/pod_workers.go

    			if status.activeUpdate.Pod != nil {
    				sync.HasConfig = true
    				sync.Static = kubetypes.IsStaticPod(status.activeUpdate.Pod)
    			}
    		case status.pendingUpdate != nil:
    			if status.pendingUpdate.Pod != nil {
    				sync.HasConfig = true
    				sync.Static = kubetypes.IsStaticPod(status.pendingUpdate.Pod)
    			}
    		}
    		workers[uid] = sync
    	}
    	return workers
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 02 13:22:37 UTC 2024
    - 74.8K bytes
    - Viewed (0)
  9. pkg/kubelet/kubelet_pods.go

    	// The KUBERNETES_SERVICE_HOST link is special because it is unconditionally injected into pods and is read by the
    	// in-cluster-config for pod clients
    	if !kubetypes.IsStaticPod(pod) && !kl.serviceHasSynced() {
    		return nil, fmt.Errorf("services have not yet been read at least once, cannot construct envvars")
    	}
    
    	var result []kubecontainer.EnvVar
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 14 16:09:17 UTC 2024
    - 101.2K bytes
    - Viewed (0)
  10. pkg/kubelet/status/status_manager_test.go

    	}
    	client := fake.NewSimpleClientset(mirrorPod)
    	m := newTestManager(client)
    
    	t.Logf("Create the static pod")
    	m.podManager.(mutablePodManager).AddPod(staticPod)
    	assert.True(t, kubetypes.IsStaticPod(staticPod), "SetUp error: staticPod")
    
    	status := getRandomPodStatus()
    	now := metav1.Now()
    	status.StartTime = &now
    	m.SetPodStatus(staticPod, status)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 02 16:27:19 UTC 2024
    - 68.1K bytes
    - Viewed (0)
Back to top