v1alpha1

package
v0.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EqualIPPrefixes added in v0.0.10

func EqualIPPrefixes(a, b IPPrefix) bool

func EqualIPRanges added in v0.0.10

func EqualIPRanges(a, b IPRange) bool

func EqualIPs added in v0.0.10

func EqualIPs(a, b IP) bool

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

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

type IP struct {
	netaddr.IP `json:"-"`
}

IP is an IP address. +kubebuilder:validation:Type=string

func MustParseIP added in v0.0.9

func MustParseIP(s string) IP

func MustParseNewIP added in v0.0.10

func MustParseNewIP(s string) *IP

func NewIP added in v0.0.9

func NewIP(ip netaddr.IP) IP

func NewIPPtr added in v0.0.9

func NewIPPtr(ip netaddr.IP) *IP

func ParseIP added in v0.0.9

func ParseIP(s string) (IP, error)

func ParseNewIP added in v0.0.10

func ParseNewIP(s string) (*IP, error)

func PtrToIP added in v0.0.9

func PtrToIP(addr IP) *IP

func (*IP) DeepCopy added in v0.0.9

func (in *IP) DeepCopy() *IP

func (*IP) DeepCopyInto added in v0.0.9

func (in *IP) DeepCopyInto(out *IP)

func (IP) Family added in v0.0.10

func (i IP) Family() corev1.IPFamily

func (IP) GomegaString added in v0.0.9

func (i IP) GomegaString() string

func (*IP) IsValid added in v0.0.10

func (i *IP) IsValid() bool

func (*IP) IsZero added in v0.0.10

func (i *IP) IsZero() bool

func (IP) MarshalJSON added in v0.0.9

func (i IP) MarshalJSON() ([]byte, error)

func (IP) OpenAPISchemaFormat added in v0.0.10

func (_ IP) OpenAPISchemaFormat() string

func (IP) OpenAPISchemaType added in v0.0.9

func (_ IP) OpenAPISchemaType() []string

func (IP) ToUnstructured added in v0.0.10

func (i IP) ToUnstructured() interface{}

func (*IP) UnmarshalJSON added in v0.0.9

func (i *IP) UnmarshalJSON(b []byte) error

type IPPrefix added in v0.0.9

type IPPrefix struct {
	netaddr.IPPrefix `json:"-"`
}

IPPrefix represents a network prefix. +kubebuilder:validation:Type=string +nullable

func MustParseIPPrefix added in v0.0.9

func MustParseIPPrefix(s string) IPPrefix

func MustParseNewIPPrefix added in v0.0.10

func MustParseNewIPPrefix(s string) *IPPrefix

func NewIPPrefix added in v0.0.9

func NewIPPrefix(prefix netaddr.IPPrefix) *IPPrefix

func ParseIPPrefix added in v0.0.9

func ParseIPPrefix(s string) (IPPrefix, error)

func ParseNewIPPrefix added in v0.0.10

func ParseNewIPPrefix(s string) (*IPPrefix, error)

func PtrToIPPrefix added in v0.0.9

func PtrToIPPrefix(prefix IPPrefix) *IPPrefix

func (*IPPrefix) DeepCopy added in v0.0.9

func (in *IPPrefix) DeepCopy() *IPPrefix

func (*IPPrefix) DeepCopyInto added in v0.0.9

func (in *IPPrefix) DeepCopyInto(out *IPPrefix)

func (IPPrefix) GomegaString added in v0.0.9

func (i IPPrefix) GomegaString() string

func (IPPrefix) IP added in v0.0.10

func (i IPPrefix) IP() IP

func (*IPPrefix) IsValid added in v0.0.10

func (in *IPPrefix) IsValid() bool

func (*IPPrefix) IsZero added in v0.0.10

func (in *IPPrefix) IsZero() bool

func (IPPrefix) MarshalJSON added in v0.0.9

func (i IPPrefix) MarshalJSON() ([]byte, error)

func (IPPrefix) OpenAPISchemaFormat added in v0.0.10

func (_ IPPrefix) OpenAPISchemaFormat() string

func (IPPrefix) OpenAPISchemaType added in v0.0.9

func (_ IPPrefix) OpenAPISchemaType() []string

func (IPPrefix) ToUnstructured added in v0.0.10

func (i IPPrefix) ToUnstructured() interface{}

func (*IPPrefix) UnmarshalJSON added in v0.0.9

func (i *IPPrefix) UnmarshalJSON(b []byte) error

type IPRange added in v0.0.9

type IPRange struct {
	From IP `json:"from"`
	To   IP `json:"to"`
}

IPRange is an IP range.

func IPRangeFrom added in v0.0.9

func IPRangeFrom(from IP, to IP) IPRange

func MustParseIPRange added in v0.0.9

func MustParseIPRange(s string) IPRange

func MustParseNewIPRange added in v0.0.10

func MustParseNewIPRange(s string) *IPRange

func NewIPRange added in v0.0.9

func NewIPRange(ipRange netaddr.IPRange) IPRange

func NewIPRangePtr added in v0.0.9

func NewIPRangePtr(ipRange netaddr.IPRange) *IPRange

func ParseIPRange added in v0.0.9

func ParseIPRange(s string) (IPRange, error)

func ParseNewIPRange added in v0.0.10

func ParseNewIPRange(s string) (*IPRange, error)

func PtrToIPRange added in v0.0.9

func PtrToIPRange(ipRange IPRange) *IPRange

func (*IPRange) DeepCopy added in v0.0.9

func (in *IPRange) DeepCopy() *IPRange

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPRange.

func (*IPRange) DeepCopyInto added in v0.0.9

func (in *IPRange) DeepCopyInto(out *IPRange)

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

func (i IPRange) GomegaString() string

func (*IPRange) IsValid added in v0.0.9

func (i *IPRange) IsValid() bool

func (*IPRange) IsZero added in v0.0.9

func (i *IPRange) IsZero() bool

func (*IPRange) Range added in v0.0.9

func (i *IPRange) Range() netaddr.IPRange

func (IPRange) String added in v0.0.9

func (i IPRange) String() string

type LocalUIDReference added in v0.0.10

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

func (*LocalUIDReference) DeepCopy added in v0.0.10

func (in *LocalUIDReference) DeepCopy() *LocalUIDReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalUIDReference.

func (*LocalUIDReference) DeepCopyInto added in v0.0.10

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 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

func (in *Taint) DeepCopy() *Taint

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Taint.

func (*Taint) DeepCopyInto added in v0.0.9

func (in *Taint) DeepCopyInto(out *Taint)

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"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL