mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Merge pull request #122476 from kerthcet/feat/support-annotation
Support annotation in nodewrapper
This commit is contained in:
commit
fc691e8ffd
@ -730,6 +730,15 @@ func (n *NodeWrapper) Label(k, v string) *NodeWrapper {
|
|||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Annotation applies a {k,v} annotation pair to the inner node.
|
||||||
|
func (n *NodeWrapper) Annotation(k, v string) *NodeWrapper {
|
||||||
|
if n.Annotations == nil {
|
||||||
|
n.Annotations = make(map[string]string)
|
||||||
|
}
|
||||||
|
metav1.SetMetaDataAnnotation(&n.ObjectMeta, k, v)
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
// Capacity sets the capacity and the allocatable resources of the inner node.
|
// Capacity sets the capacity and the allocatable resources of the inner node.
|
||||||
// Each entry in `resources` corresponds to a resource name and its quantity.
|
// Each entry in `resources` corresponds to a resource name and its quantity.
|
||||||
// By default, the capacity and allocatable number of pods are set to 32.
|
// By default, the capacity and allocatable number of pods are set to 32.
|
||||||
|
Loading…
Reference in New Issue
Block a user