Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TolerateTaints ¶ added in v0.0.9
func TolerateTaints(tolerations []Toleration, taints []Taint) bool
TolerateTaints returns if tolerations tolerate all taints
Types ¶
type ConfigMapKeySelector ¶ added in v0.0.8
type ConfigMapKeySelector struct {
// The name of the ConfigMap resource being referred to.
corev1.LocalObjectReference `json:",inline"`
// The key of the entry in the ConfigMap resource's `data` field to be used.
// Some instances of this field may be defaulted, in others it may be
// required.
// +optional
Key string `json:"key,omitempty"`
}
ConfigMapKeySelector is a reference to a specific 'key' within a ConfigMap resource. In some instances, `key` is a required field.
func (*ConfigMapKeySelector) DeepCopy ¶ added in v0.0.8
func (in *ConfigMapKeySelector) DeepCopy() *ConfigMapKeySelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapKeySelector.
func (*ConfigMapKeySelector) DeepCopyInto ¶ added in v0.0.8
func (in *ConfigMapKeySelector) DeepCopyInto(out *ConfigMapKeySelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IP ¶ added in v0.0.9
IP is an IP address. +kubebuilder:validation:Type=string
func MustParseIP ¶ added in v0.0.9
func (*IP) DeepCopy ¶ added in v0.0.9
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IP.
func (*IP) DeepCopyInto ¶ added in v0.0.9
func (IP) GomegaString ¶ added in v0.0.9
func (*IP) MarshalJSON ¶ added in v0.0.9
func (IP) OpenAPISchemaType ¶ added in v0.0.9
func (*IP) UnmarshalJSON ¶ added in v0.0.9
type IPPrefix ¶ added in v0.0.9
IPPrefix represents a network prefix. +kubebuilder:validation:Type=string +nullable
func MustParseIPPrefix ¶ added in v0.0.9
func NewIPPrefix ¶ added in v0.0.9
func NewIPPrefixPtr ¶ added in v0.0.9
func ParseIPPrefix ¶ added in v0.0.9
func PtrToIPPrefix ¶ added in v0.0.9
func (*IPPrefix) DeepCopy ¶ added in v0.0.9
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPrefix.
func (*IPPrefix) DeepCopyInto ¶ added in v0.0.9
func (IPPrefix) GomegaString ¶ added in v0.0.9
func (*IPPrefix) MarshalJSON ¶ added in v0.0.9
func (IPPrefix) OpenAPISchemaType ¶ added in v0.0.9
func (*IPPrefix) UnmarshalJSON ¶ added in v0.0.9
type IPRange ¶ added in v0.0.9
IPRange is an IP range.
func IPRangeFrom ¶ added in v0.0.9
func MustParseIPRange ¶ added in v0.0.9
func NewIPRange ¶ added in v0.0.9
func NewIPRangePtr ¶ added in v0.0.9
func ParseIPRange ¶ added in v0.0.9
func PtrToIPRange ¶ added in v0.0.9
func (*IPRange) DeepCopy ¶ added in v0.0.9
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPRange.
func (*IPRange) DeepCopyInto ¶ added in v0.0.9
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (IPRange) GomegaString ¶ added in v0.0.9
type SecretKeySelector ¶ added in v0.0.9
type SecretKeySelector struct {
// The name of the Secret resource being referred to.
corev1.LocalObjectReference `json:",inline"`
// The key of the entry in the Secret resource's `data` field to be used.
// Some instances of this field may be defaulted, in others it may be
// required.
// +optional
Key string `json:"key,omitempty"`
}
SecretKeySelector is a reference to a specific 'key' within a Secret resource. In some instances, `key` is a required field.
func (*SecretKeySelector) DeepCopy ¶ added in v0.0.9
func (in *SecretKeySelector) DeepCopy() *SecretKeySelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeySelector.
func (*SecretKeySelector) DeepCopyInto ¶ added in v0.0.9
func (in *SecretKeySelector) DeepCopyInto(out *SecretKeySelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Taint ¶ added in v0.0.9
type Taint struct {
// The taint key to be applied to a resource pool.
Key string `json:"key"`
// The taint value corresponding to the taint key.
Value string `json:"value,omitempty"`
// The effect of the taint on resources
// that do not tolerate the taint.
// Valid effects are NoSchedule, PreferNoSchedule and NoExecute.
Effect TaintEffect `json:"effect"`
}
The resource pool this Taint is attached to has the "effect" on any resource that does not tolerate the Taint.
func (*Taint) DeepCopy ¶ added in v0.0.9
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Taint.
func (*Taint) DeepCopyInto ¶ added in v0.0.9
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TaintEffect ¶ added in v0.0.9
type TaintEffect string
+kubebuilder:validation:Enum=NoSchedule
const ( // Do not allow new resources to schedule onto the resource pool unless they tolerate the taint, // but allow all already-running resources to continue running. // Enforced by the scheduler. TaintEffectNoSchedule TaintEffect = "NoSchedule" )
type Toleration ¶ added in v0.0.9
type Toleration struct {
// Key is the taint key that the toleration applies to. Empty means match all taint keys.
// If the key is empty, operator must be Exists; this combination means to match all values and all keys.
Key string `json:"key,omitempty"`
// Operator represents a key's relationship to the value.
// Valid operators are Exists and Equal. Defaults to Equal.
// Exists is equivalent to wildcard for value, so that a resource can
// tolerate all taints of a particular category.
Operator TolerationOperator `json:"operator,omitempty"`
// Value is the taint value the toleration matches to.
// If the operator is Exists, the value should be empty, otherwise just a regular string.
Value string `json:"value,omitempty"`
// Effect indicates the taint effect to match. Empty means match all taint effects.
// When specified, allowed values are NoSchedule.
Effect TaintEffect `json:"effect,omitempty"`
}
The resource this Toleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.
func (*Toleration) DeepCopy ¶ added in v0.0.9
func (in *Toleration) DeepCopy() *Toleration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Toleration.
func (*Toleration) DeepCopyInto ¶ added in v0.0.9
func (in *Toleration) DeepCopyInto(out *Toleration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Toleration) ToleratesTaint ¶ added in v0.0.9
func (t *Toleration) ToleratesTaint(taint *Taint) bool
From https://pkg.go.dev/k8s.io/api/core/v1#Toleration.ToleratesTaint with our own Toleration and Taint ToleratesTaint checks if the toleration tolerates the taint. The matching follows the rules below: (1) Empty toleration.effect means to match all taint effects,
otherwise taint effect must equal to toleration.effect.
(2) If toleration.operator is 'Exists', it means to match all taint values. (3) Empty toleration.key means to match all taint keys.
If toleration.key is empty, toleration.operator must be 'Exists'; this combination means to match all taint values and all taint keys.
type TolerationOperator ¶ added in v0.0.9
type TolerationOperator string
A toleration operator is the set of operators that can be used in a toleration. +kubebuilder:validation:Enum=Equal;Exists
const ( TolerationOpEqual TolerationOperator = "Equal" TolerationOpExists TolerationOperator = "Exists" )