Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for AddOrUpdateTolerationInPod (0.33 sec)

  1. plugin/pkg/admission/extendedresourcetoleration/admission.go

    			}
    		}
    	}
    
    	// Doing .List() so that we get a stable sorted list.
    	// This allows us to test adding tolerations for multiple extended resources.
    	for _, resource := range resources.List() {
    		helper.AddOrUpdateTolerationInPod(pod, &core.Toleration{
    			Key:      resource,
    			Operator: core.TolerationOpExists,
    			Effect:   core.TaintEffectNoSchedule,
    		})
    	}
    
    	return nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 20 15:11:00 UTC 2019
    - 3.1K bytes
    - Viewed (0)
  2. pkg/apis/core/helper/helpers.go

    		if err != nil {
    			return tolerations, err
    		}
    	}
    	return tolerations, nil
    }
    
    // AddOrUpdateTolerationInPod tries to add a toleration to the pod's toleration list.
    // Returns true if something was updated, false otherwise.
    func AddOrUpdateTolerationInPod(pod *core.Pod, toleration *core.Toleration) bool {
    	podTolerations := pod.Spec.Tolerations
    
    	var newTolerations []core.Toleration
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Oct 28 07:31:28 UTC 2023
    - 16.1K bytes
    - Viewed (0)
  3. pkg/kubelet/config/common.go

    	pod.Annotations[kubetypes.ConfigHashAnnotationKey] = string(pod.UID)
    
    	if isFile {
    		// Applying the default Taint tolerations to static pods,
    		// so they are not evicted when there are node problems.
    		helper.AddOrUpdateTolerationInPod(pod, &api.Toleration{
    			Operator: "Exists",
    			Effect:   api.TaintEffectNoExecute,
    		})
    	}
    
    	// Set the default status to pending.
    	pod.Status.Phase = api.PodPending
    	return nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 03 18:40:48 UTC 2023
    - 5.8K bytes
    - Viewed (0)
Back to top