Documentation ¶
Overview ¶
Package v1alpha1 is the v1alpha1 version of the API.
Package v1alpha1 contains API Schema definitions for the common v1alpha1 API group +groupName=common.api.onmetal.de
Index ¶
- Constants
- Variables
- func EqualIPPrefixes(a, b IPPrefix) bool
- func EqualIPRanges(a, b IPRange) bool
- func EqualIPs(a, b IP) bool
- func Resource(resource string) schema.GroupResource
- func TolerateTaints(tolerations []Toleration, taints []Taint) bool
- type ConfigMapKeySelector
- type IP
- func (in *IP) DeepCopy() *IP
- func (in *IP) DeepCopyInto(out *IP)
- func (i IP) Family() corev1.IPFamily
- func (i IP) GomegaString() string
- func (i *IP) IsValid() bool
- func (i *IP) IsZero() bool
- func (i IP) MarshalJSON() ([]byte, error)
- func (_ IP) OpenAPISchemaFormat() string
- func (_ IP) OpenAPISchemaType() []string
- func (i IP) ToUnstructured() interface{}
- func (i *IP) UnmarshalJSON(b []byte) error
- type IPPrefix
- func (in *IPPrefix) DeepCopy() *IPPrefix
- func (in *IPPrefix) DeepCopyInto(out *IPPrefix)
- func (i IPPrefix) GomegaString() string
- func (i IPPrefix) IP() IP
- func (in *IPPrefix) IsValid() bool
- func (in *IPPrefix) IsZero() bool
- func (i IPPrefix) MarshalJSON() ([]byte, error)
- func (_ IPPrefix) OpenAPISchemaFormat() string
- func (_ IPPrefix) OpenAPISchemaType() []string
- func (i IPPrefix) ToUnstructured() interface{}
- func (i *IPPrefix) UnmarshalJSON(b []byte) error
- type IPRange
- func IPRangeFrom(from IP, to IP) IPRange
- func MustParseIPRange(s string) IPRange
- func MustParseNewIPRange(s string) *IPRange
- func NewIPRange(ipRange netipx.IPRange) IPRange
- func NewIPRangePtr(ipRange netipx.IPRange) *IPRange
- func ParseIPRange(s string) (IPRange, error)
- func ParseNewIPRange(s string) (*IPRange, error)
- func PtrToIPRange(ipRange IPRange) *IPRange
- type LocalUIDReference
- type SecretKeySelector
- type Taint
- type TaintEffect
- type Toleration
- type TolerationOperator
- type UIDReference
Constants ¶
const ( // WatchLabel is a label that can be applied to any onmetal resource. // // Provider controllers that allow for selective reconciliation may check this label and proceed // with reconciliation of the object only if this label and a configured value are present. WatchLabel = "common.api.onmetal.de/watch-filter" // ReconcileRequestAnnotation is an annotation that requested a reconciliation at a specific time. ReconcileRequestAnnotation = "reconcile.common.api.onmetal.de/requested-at" // ManagedByAnnotation is an annotation that can be applied to resources to signify that // some external system is managing the resource. ManagedByAnnotation = "common.api.onmetal.de/managed-by" )
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "common.api.onmetal.de", Version: "v1alpha1"} )
Functions ¶
func EqualIPPrefixes ¶
func EqualIPRanges ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
func TolerateTaints ¶
func TolerateTaints(tolerations []Toleration, taints []Taint) bool
TolerateTaints returns if tolerations tolerate all taints
Types ¶
type ConfigMapKeySelector ¶
type ConfigMapKeySelector struct { // Name of the referent. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names Name string `json:"name,omitempty"` // 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. +structType=atomic
func (*ConfigMapKeySelector) DeepCopy ¶
func (in *ConfigMapKeySelector) DeepCopy() *ConfigMapKeySelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapKeySelector.
func (*ConfigMapKeySelector) DeepCopyInto ¶
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 ¶
IP is an IP address.
func MustParseIP ¶
func MustParseNewIP ¶
func ParseNewIP ¶
func (*IP) DeepCopyInto ¶
func (IP) GomegaString ¶
func (IP) MarshalJSON ¶
func (IP) OpenAPISchemaFormat ¶
func (IP) OpenAPISchemaType ¶
func (IP) ToUnstructured ¶
func (i IP) ToUnstructured() interface{}
func (*IP) UnmarshalJSON ¶
type IPPrefix ¶
IPPrefix represents a network prefix. +nullable
func MustParseIPPrefix ¶
func MustParseNewIPPrefix ¶
func NewIPPrefix ¶
func ParseIPPrefix ¶
func ParseNewIPPrefix ¶
func PtrToIPPrefix ¶
func (*IPPrefix) DeepCopyInto ¶
func (IPPrefix) GomegaString ¶
func (IPPrefix) MarshalJSON ¶
func (IPPrefix) OpenAPISchemaFormat ¶
func (IPPrefix) OpenAPISchemaType ¶
func (IPPrefix) ToUnstructured ¶
func (i IPPrefix) ToUnstructured() interface{}
func (*IPPrefix) UnmarshalJSON ¶
type IPRange ¶
IPRange is an IP range.
func IPRangeFrom ¶
func MustParseIPRange ¶
func MustParseNewIPRange ¶
func NewIPRange ¶
func NewIPRangePtr ¶
func ParseIPRange ¶
func ParseNewIPRange ¶
func PtrToIPRange ¶
func (*IPRange) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPRange.
func (*IPRange) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (IPRange) GomegaString ¶
type LocalUIDReference ¶
type LocalUIDReference struct { // Name is the name of the referenced entity. Name string `json:"name"` // UID is the UID of the referenced entity. UID types.UID `json:"uid"` }
LocalUIDReference is a reference to another entity including its UID +structType=atomic
func (*LocalUIDReference) DeepCopy ¶
func (in *LocalUIDReference) DeepCopy() *LocalUIDReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalUIDReference.
func (*LocalUIDReference) DeepCopyInto ¶
func (in *LocalUIDReference) DeepCopyInto(out *LocalUIDReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretKeySelector ¶
type SecretKeySelector struct { // Name of the referent. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names Name string `json:"name,omitempty"` // 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. +structType=atomic
func (*SecretKeySelector) DeepCopy ¶
func (in *SecretKeySelector) DeepCopy() *SecretKeySelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeySelector.
func (*SecretKeySelector) DeepCopyInto ¶
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 ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Taint.
func (*Taint) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TaintEffect ¶
type TaintEffect string
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 ¶
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 ¶
func (in *Toleration) DeepCopy() *Toleration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Toleration.
func (*Toleration) DeepCopyInto ¶
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 ¶
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 ¶
type TolerationOperator string
A toleration operator is the set of operators that can be used in a toleration.
const ( TolerationOpEqual TolerationOperator = "Equal" TolerationOpExists TolerationOperator = "Exists" )
type UIDReference ¶ added in v0.1.1
type UIDReference struct { // Namespace is the namespace of the referenced entity. If empty, // the same namespace as the referring resource is implied. Namespace string `json:"namespace,omitempty"` // Name is the name of the referenced entity. Name string `json:"name"` // UID is the UID of the referenced entity. UID types.UID `json:"uid,omitempty"` }
UIDReference is a reference to another entity in a potentially different namespace including its UID. +structType=atomic
func (*UIDReference) DeepCopy ¶ added in v0.1.1
func (in *UIDReference) DeepCopy() *UIDReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UIDReference.
func (*UIDReference) DeepCopyInto ¶ added in v0.1.1
func (in *UIDReference) DeepCopyInto(out *UIDReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.