Documentation ¶
Index ¶
- Variables
- func AddOrUpdateDaemonPodTolerations(spec *corev1.PodSpec)
- func AddOrUpdateTolerationInPodSpec(spec *corev1.PodSpec, toleration *corev1.Toleration) bool
- func NewPod(ds *appsv1.DaemonSet, nodeName string) *corev1.Pod
- func NodeShouldRunDaemonPod(node *corev1.Node, ds *appsv1.DaemonSet) (bool, bool)
Constants ¶
This section is empty.
Variables ¶
var Semantic = conversion.EqualitiesOrDie( func(a, b resource.Quantity) bool { return a.Cmp(b) == 0 }, func(a, b metav1.MicroTime) bool { return a.UTC() == b.UTC() }, func(a, b metav1.Time) bool { return a.UTC() == b.UTC() }, func(a, b labels.Selector) bool { return a.String() == b.String() }, func(a, b fields.Selector) bool { return a.String() == b.String() }, )
Semantic can do semantic deep equality checks for core objects. Example: apiequality.Semantic.DeepEqual(aPod, aPodWithNonNilButEmptyMaps) == true Copied from https://github.com/kubernetes/kubernetes/blob/v1.31.0/pkg/apis/core/helper/helpers.go#L92-L114
Functions ¶
func AddOrUpdateDaemonPodTolerations ¶
AddOrUpdateDaemonPodTolerations apply necessary tolerations to DaemonSet Pods, e.g. node.kubernetes.io/not-ready:NoExecute. Copied from https://github.com/kubernetes/kubernetes/blob/v1.31.0/pkg/controller/daemon/util/daemonset_util.go#L47-L102
func AddOrUpdateTolerationInPodSpec ¶
func AddOrUpdateTolerationInPodSpec(spec *corev1.PodSpec, toleration *corev1.Toleration) bool
AddOrUpdateTolerationInPodSpec tries to add a toleration to the toleration list in PodSpec. Returns true if something was updated, false otherwise. Copied from https://github.com/kubernetes/kubernetes/blob/v1.31.0/pkg/apis/core/v1/helper/helpers.go#L261-L287
func NewPod ¶
NewPod creates a new pod Copied from https://github.com/kubernetes/kubernetes/blob/v1.31.0/pkg/controller/daemon/daemon_controller.go#L1275-L1330
func NodeShouldRunDaemonPod ¶
NodeShouldRunDaemonPod checks a set of preconditions against a (node,daemonset) and returns a summary. Returned booleans are:
- shouldRun: Returns true when a daemonset should run on the node if a daemonset pod is not already running on that node.
- shouldContinueRunning: Returns true when a daemonset should continue running on a node if a daemonset pod is already running on that node.
Copied from https://github.com/kubernetes/kubernetes/blob/v1.31.0/pkg/controller/daemon/daemon_controller.go#L1275-L1330
Types ¶
This section is empty.