v1

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OverheadBlank = (&OverheadDie{}).DieFeed(nodev1.Overhead{})
View Source
var RuntimeClassBlank = (&RuntimeClassDie{}).DieFeed(nodev1.RuntimeClass{})
View Source
var SchedulingBlank = (&SchedulingDie{}).DieFeed(nodev1.Scheduling{})

Functions

This section is empty.

Types

type OverheadDie

type OverheadDie struct {
	// contains filtered or unexported fields
}

func (*OverheadDie) AddPodFixed

func (d *OverheadDie) AddPodFixed(name corev1.ResourceName, quantity resource.Quantity) *OverheadDie

func (*OverheadDie) AddPodFixedString

func (d *OverheadDie) AddPodFixedString(name corev1.ResourceName, quantity string) *OverheadDie

func (*OverheadDie) DeepCopy

func (d *OverheadDie) DeepCopy() *OverheadDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*OverheadDie) DieFeed

func (d *OverheadDie) DieFeed(r nodev1.Overhead) *OverheadDie

DieFeed returns a new die with the provided resource.

func (*OverheadDie) DieFeedJSON added in v0.8.0

func (d *OverheadDie) DieFeedJSON(j []byte) *OverheadDie

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*OverheadDie) DieFeedPtr

func (d *OverheadDie) DieFeedPtr(r *nodev1.Overhead) *OverheadDie

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*OverheadDie) DieFeedRawExtension added in v0.5.0

func (d *OverheadDie) DieFeedRawExtension(raw runtime.RawExtension) *OverheadDie

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*OverheadDie) DieFeedYAML added in v0.8.0

func (d *OverheadDie) DieFeedYAML(y []byte) *OverheadDie

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*OverheadDie) DieFeedYAMLFile added in v0.8.0

func (d *OverheadDie) DieFeedYAMLFile(name string) *OverheadDie

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*OverheadDie) DieImmutable

func (d *OverheadDie) DieImmutable(immutable bool) *OverheadDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*OverheadDie) DieRelease

func (d *OverheadDie) DieRelease() nodev1.Overhead

DieRelease returns the resource managed by the die.

func (*OverheadDie) DieReleaseJSON added in v0.8.0

func (d *OverheadDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*OverheadDie) DieReleasePtr

func (d *OverheadDie) DieReleasePtr() *nodev1.Overhead

DieReleasePtr returns a pointer to the resource managed by the die.

func (*OverheadDie) DieReleaseRawExtension added in v0.5.0

func (d *OverheadDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*OverheadDie) DieReleaseYAML added in v0.8.0

func (d *OverheadDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*OverheadDie) DieStamp

func (d *OverheadDie) DieStamp(fn func(r *nodev1.Overhead)) *OverheadDie

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*OverheadDie) DieStampAt added in v0.8.0

func (d *OverheadDie) DieStampAt(jp string, fn interface{}) *OverheadDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*OverheadDie) DieWith added in v0.9.0

func (d *OverheadDie) DieWith(fns ...func(d *OverheadDie)) *OverheadDie

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*OverheadDie) PodFixed

func (d *OverheadDie) PodFixed(v corev1.ResourceList) *OverheadDie

podFixed represents the fixed resource overhead associated with running a pod.

type RuntimeClassDie

type RuntimeClassDie struct {
	metav1.FrozenObjectMeta
	// contains filtered or unexported fields
}

func (*RuntimeClassDie) APIVersion added in v0.5.0

func (d *RuntimeClassDie) APIVersion(v string) *RuntimeClassDie

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

func (*RuntimeClassDie) DeepCopy

func (d *RuntimeClassDie) DeepCopy() *RuntimeClassDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*RuntimeClassDie) DeepCopyObject

func (d *RuntimeClassDie) DeepCopyObject() runtime.Object

func (*RuntimeClassDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*RuntimeClassDie) DieFeedJSON added in v0.8.0

func (d *RuntimeClassDie) DieFeedJSON(j []byte) *RuntimeClassDie

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*RuntimeClassDie) DieFeedPtr

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*RuntimeClassDie) DieFeedRawExtension added in v0.5.0

func (d *RuntimeClassDie) DieFeedRawExtension(raw runtime.RawExtension) *RuntimeClassDie

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*RuntimeClassDie) DieFeedYAML added in v0.8.0

func (d *RuntimeClassDie) DieFeedYAML(y []byte) *RuntimeClassDie

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*RuntimeClassDie) DieFeedYAMLFile added in v0.8.0

func (d *RuntimeClassDie) DieFeedYAMLFile(name string) *RuntimeClassDie

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*RuntimeClassDie) DieImmutable

func (d *RuntimeClassDie) DieImmutable(immutable bool) *RuntimeClassDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*RuntimeClassDie) DieRelease

func (d *RuntimeClassDie) DieRelease() nodev1.RuntimeClass

DieRelease returns the resource managed by the die.

func (*RuntimeClassDie) DieReleaseJSON added in v0.8.0

func (d *RuntimeClassDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*RuntimeClassDie) DieReleasePtr

func (d *RuntimeClassDie) DieReleasePtr() *nodev1.RuntimeClass

DieReleasePtr returns a pointer to the resource managed by the die.

func (*RuntimeClassDie) DieReleaseRawExtension added in v0.5.0

func (d *RuntimeClassDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*RuntimeClassDie) DieReleaseUnstructured

func (d *RuntimeClassDie) DieReleaseUnstructured() *unstructured.Unstructured

DieReleaseUnstructured returns the resource managed by the die as an unstructured object. Panics on error.

func (*RuntimeClassDie) DieReleaseYAML added in v0.8.0

func (d *RuntimeClassDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*RuntimeClassDie) DieStamp

func (d *RuntimeClassDie) DieStamp(fn func(r *nodev1.RuntimeClass)) *RuntimeClassDie

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*RuntimeClassDie) DieStampAt added in v0.8.0

func (d *RuntimeClassDie) DieStampAt(jp string, fn interface{}) *RuntimeClassDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*RuntimeClassDie) DieWith added in v0.9.0

func (d *RuntimeClassDie) DieWith(fns ...func(d *RuntimeClassDie)) *RuntimeClassDie

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*RuntimeClassDie) GetObjectKind

func (d *RuntimeClassDie) GetObjectKind() schema.ObjectKind

func (*RuntimeClassDie) Handler

func (d *RuntimeClassDie) Handler(v string) *RuntimeClassDie

handler specifies the underlying runtime and configuration that the CRI

implementation will use to handle pods of this class. The possible values

are specific to the node & CRI configuration. It is assumed that all

handlers are available on every node, and handlers of the same name are

equivalent on every node.

For example, a handler called "runc" might specify that the runc OCI

runtime (using native Linux containers) will be used to run the containers

in a pod.

The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements,

and is immutable.

func (*RuntimeClassDie) Kind added in v0.5.0

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

func (*RuntimeClassDie) MarshalJSON

func (d *RuntimeClassDie) MarshalJSON() ([]byte, error)

func (*RuntimeClassDie) MetadataDie

func (d *RuntimeClassDie) MetadataDie(fn func(d *metav1.ObjectMetaDie)) *RuntimeClassDie

MetadataDie stamps the resource's ObjectMeta field with a mutable die.

func (*RuntimeClassDie) Overhead

overhead represents the resource overhead associated with running a pod for a

given RuntimeClass. For more details, see

https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/

func (*RuntimeClassDie) Scheduling

func (d *RuntimeClassDie) Scheduling(v *nodev1.Scheduling) *RuntimeClassDie

scheduling holds the scheduling constraints to ensure that pods running

with this RuntimeClass are scheduled to nodes that support it.

If scheduling is nil, this RuntimeClass is assumed to be supported by all

nodes.

func (*RuntimeClassDie) UnmarshalJSON

func (d *RuntimeClassDie) UnmarshalJSON(b []byte) error

type SchedulingDie

type SchedulingDie struct {
	// contains filtered or unexported fields
}

func (*SchedulingDie) DeepCopy

func (d *SchedulingDie) DeepCopy() *SchedulingDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*SchedulingDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*SchedulingDie) DieFeedJSON added in v0.8.0

func (d *SchedulingDie) DieFeedJSON(j []byte) *SchedulingDie

DieFeedJSON returns a new die with the provided JSON. Panics on error.

func (*SchedulingDie) DieFeedPtr

func (d *SchedulingDie) DieFeedPtr(r *nodev1.Scheduling) *SchedulingDie

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*SchedulingDie) DieFeedRawExtension added in v0.5.0

func (d *SchedulingDie) DieFeedRawExtension(raw runtime.RawExtension) *SchedulingDie

DieFeedRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*SchedulingDie) DieFeedYAML added in v0.8.0

func (d *SchedulingDie) DieFeedYAML(y []byte) *SchedulingDie

DieFeedYAML returns a new die with the provided YAML. Panics on error.

func (*SchedulingDie) DieFeedYAMLFile added in v0.8.0

func (d *SchedulingDie) DieFeedYAMLFile(name string) *SchedulingDie

DieFeedYAMLFile returns a new die loading YAML from a file path. Panics on error.

func (*SchedulingDie) DieImmutable

func (d *SchedulingDie) DieImmutable(immutable bool) *SchedulingDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*SchedulingDie) DieRelease

func (d *SchedulingDie) DieRelease() nodev1.Scheduling

DieRelease returns the resource managed by the die.

func (*SchedulingDie) DieReleaseJSON added in v0.8.0

func (d *SchedulingDie) DieReleaseJSON() []byte

DieReleaseJSON returns the resource managed by the die as JSON. Panics on error.

func (*SchedulingDie) DieReleasePtr

func (d *SchedulingDie) DieReleasePtr() *nodev1.Scheduling

DieReleasePtr returns a pointer to the resource managed by the die.

func (*SchedulingDie) DieReleaseRawExtension added in v0.5.0

func (d *SchedulingDie) DieReleaseRawExtension() runtime.RawExtension

DieReleaseRawExtension returns the resource managed by the die as an raw extension. Panics on error.

func (*SchedulingDie) DieReleaseYAML added in v0.8.0

func (d *SchedulingDie) DieReleaseYAML() []byte

DieReleaseYAML returns the resource managed by the die as YAML. Panics on error.

func (*SchedulingDie) DieStamp

func (d *SchedulingDie) DieStamp(fn func(r *nodev1.Scheduling)) *SchedulingDie

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*SchedulingDie) DieStampAt added in v0.8.0

func (d *SchedulingDie) DieStampAt(jp string, fn interface{}) *SchedulingDie

Experimental: DieStampAt uses a JSON path (http://goessner.net/articles/JsonPath/) expression to stamp portions of the resource. The callback is invoked with each JSON path match. Panics if the callback function does not accept a single argument of the same type or a pointer to that type as found on the resource at the target location.

Future iterations will improve type coercion from the resource to the callback argument.

func (*SchedulingDie) DieWith added in v0.9.0

func (d *SchedulingDie) DieWith(fns ...func(d *SchedulingDie)) *SchedulingDie

DieWith returns a new die after passing the current die to the callback function. The passed die is mutable.

func (*SchedulingDie) NodeSelector

func (d *SchedulingDie) NodeSelector(v map[string]string) *SchedulingDie

nodeSelector lists labels that must be present on nodes that support this

RuntimeClass. Pods using this RuntimeClass can only be scheduled to a

node matched by this selector. The RuntimeClass nodeSelector is merged

with a pod's existing nodeSelector. Any conflicts will cause the pod to

be rejected in admission.

func (*SchedulingDie) Tolerations

func (d *SchedulingDie) Tolerations(v ...corev1.Toleration) *SchedulingDie

tolerations are appended (excluding duplicates) to pods running with this

RuntimeClass during admission, effectively unioning the set of nodes

tolerated by the pod and the RuntimeClass.

func (*SchedulingDie) TolerationsDie

func (d *SchedulingDie) TolerationsDie(key string, fn func(d *diecorev1.TolerationDie)) *SchedulingDie

Jump to

Keyboard shortcuts

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