v1

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: Apache-2.0 Imports: 18 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

AddPodFixed sets a single quantity on the PodFixed resource list.

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

func (*OverheadDie) AddPodFixedString

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

AddPodFixedString parses the quantity setting a single value on the PodFixed resource list. Panics if the string is not parsable.

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

func (*OverheadDie) DeepCopy

func (d *OverheadDie) DeepCopy() *OverheadDie

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

func (*OverheadDie) DieDiff added in v0.13.0

func (d *OverheadDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*OverheadDie) DieFeed

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

DieFeed returns a new die with the provided resource.

func (*OverheadDie) DieFeedJSON

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

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

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

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

func (*OverheadDie) DieFeedYAMLFile

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) DiePatch added in v0.13.0

func (d *OverheadDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*OverheadDie) DieRelease

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

DieRelease returns the resource managed by the die.

func (*OverheadDie) DieReleaseJSON

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

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

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

func (*OverheadDie) DieReleaseYAML

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

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

func (*OverheadDie) DieSeal added in v0.13.0

func (d *OverheadDie) DieSeal() *OverheadDie

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*OverheadDie) DieSealFeed added in v0.13.0

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

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*OverheadDie) DieSealFeedPtr added in v0.13.0

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

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*OverheadDie) DieSealRelease added in v0.13.0

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

DieSealRelease returns the sealed resource managed by the die.

func (*OverheadDie) DieSealReleasePtr added in v0.13.0

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

DieSealReleasePtr returns the sealed resource pointer managed by the die.

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

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

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

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) DieDefaultTypeMetadata added in v0.13.0

func (d *RuntimeClassDie) DieDefaultTypeMetadata() *RuntimeClassDie

DieDefaultTypeMetadata sets the APIVersion and Kind to "node.k8s.io/v1" and "RuntimeClass" respectively.

func (*RuntimeClassDie) DieDiff added in v0.13.0

func (d *RuntimeClassDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*RuntimeClassDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*RuntimeClassDie) DieFeedJSON

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

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

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

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

func (*RuntimeClassDie) DieFeedYAMLFile

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) DiePatch added in v0.13.0

func (d *RuntimeClassDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*RuntimeClassDie) DieRelease

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

DieRelease returns the resource managed by the die.

func (*RuntimeClassDie) DieReleaseJSON

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

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

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

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

func (*RuntimeClassDie) DieSeal added in v0.13.0

func (d *RuntimeClassDie) DieSeal() *RuntimeClassDie

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*RuntimeClassDie) DieSealFeed added in v0.13.0

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*RuntimeClassDie) DieSealFeedPtr added in v0.13.0

func (d *RuntimeClassDie) DieSealFeedPtr(r *nodev1.RuntimeClass) *RuntimeClassDie

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*RuntimeClassDie) DieSealRelease added in v0.13.0

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

DieSealRelease returns the sealed resource managed by the die.

func (*RuntimeClassDie) DieSealReleasePtr added in v0.13.0

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

DieSealReleasePtr returns the sealed resource pointer managed by the die.

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

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

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

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) Metadata added in v0.13.0

Metadata standard object's metadata.

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) TypeMetadata added in v0.13.0

func (d *RuntimeClassDie) TypeMetadata(v apismetav1.TypeMeta) *RuntimeClassDie

TypeMetadata standard object's type metadata.

func (*RuntimeClassDie) TypeMetadataDie added in v0.13.0

func (d *RuntimeClassDie) TypeMetadataDie(fn func(d *metav1.TypeMetaDie)) *RuntimeClassDie

TypeMetadataDie stamps the resource's TypeMeta field with a mutable die.

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) DieDiff added in v0.13.0

func (d *SchedulingDie) DieDiff(opts ...cmp.Option) string

DieDiff uses cmp.Diff to compare the current value of the die with the sealed value.

func (*SchedulingDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*SchedulingDie) DieFeedJSON

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

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

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

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

func (*SchedulingDie) DieFeedYAMLFile

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) DiePatch added in v0.13.0

func (d *SchedulingDie) DiePatch(patchType types.PatchType) ([]byte, error)

DiePatch generates a patch between the current value of the die and the sealed value.

func (*SchedulingDie) DieRelease

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

DieRelease returns the resource managed by the die.

func (*SchedulingDie) DieReleaseJSON

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

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

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

func (*SchedulingDie) DieReleaseYAML

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

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

func (*SchedulingDie) DieSeal added in v0.13.0

func (d *SchedulingDie) DieSeal() *SchedulingDie

DieSeal returns a new die for the current die's state that is sealed for comparison in future diff and patch operations.

func (*SchedulingDie) DieSealFeed added in v0.13.0

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

DieSealFeed returns a new die for the current die's state that uses a specific resource for comparison in future diff and patch operations.

func (*SchedulingDie) DieSealFeedPtr added in v0.13.0

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

DieSealFeedPtr returns a new die for the current die's state that uses a specific resource pointer for comparison in future diff and patch operations. If the resource is nil, the empty value is used instead.

func (*SchedulingDie) DieSealRelease added in v0.13.0

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

DieSealRelease returns the sealed resource managed by the die.

func (*SchedulingDie) DieSealReleasePtr added in v0.13.0

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

DieSealReleasePtr returns the sealed resource pointer managed by the die.

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

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

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) TolerationDie added in v0.13.0

func (d *SchedulingDie) TolerationDie(v string, fn func(d *apiscorev1.TolerationDie)) *SchedulingDie

TolerationDie mutates a single item in Tolerations matched by the nested field Key, appending a new item if no match is found.

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

deprecated?: use TolerationDie

Jump to

Keyboard shortcuts

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