Documentation ¶
Index ¶
- Variables
- type OverheadDie
- func (d *OverheadDie) AddPodFixed(name corev1.ResourceName, quantity resource.Quantity) *OverheadDie
- func (d *OverheadDie) AddPodFixedString(name corev1.ResourceName, quantity string) *OverheadDie
- func (d *OverheadDie) DeepCopy() *OverheadDie
- func (d *OverheadDie) DieFeed(r nodev1.Overhead) *OverheadDie
- func (d *OverheadDie) DieFeedJSON(j []byte) *OverheadDie
- func (d *OverheadDie) DieFeedPtr(r *nodev1.Overhead) *OverheadDie
- func (d *OverheadDie) DieFeedRawExtension(raw runtime.RawExtension) *OverheadDie
- func (d *OverheadDie) DieFeedYAML(y []byte) *OverheadDie
- func (d *OverheadDie) DieFeedYAMLFile(name string) *OverheadDie
- func (d *OverheadDie) DieImmutable(immutable bool) *OverheadDie
- func (d *OverheadDie) DieRelease() nodev1.Overhead
- func (d *OverheadDie) DieReleaseJSON() []byte
- func (d *OverheadDie) DieReleasePtr() *nodev1.Overhead
- func (d *OverheadDie) DieReleaseRawExtension() runtime.RawExtension
- func (d *OverheadDie) DieReleaseYAML() []byte
- func (d *OverheadDie) DieStamp(fn func(r *nodev1.Overhead)) *OverheadDie
- func (d *OverheadDie) DieStampAt(jp string, fn interface{}) *OverheadDie
- func (d *OverheadDie) DieWith(fns ...func(d *OverheadDie)) *OverheadDie
- func (d *OverheadDie) PodFixed(v corev1.ResourceList) *OverheadDie
- type RuntimeClassDie
- func (d *RuntimeClassDie) APIVersion(v string) *RuntimeClassDie
- func (d *RuntimeClassDie) DeepCopy() *RuntimeClassDie
- func (d *RuntimeClassDie) DeepCopyObject() runtime.Object
- func (d *RuntimeClassDie) DieFeed(r nodev1.RuntimeClass) *RuntimeClassDie
- func (d *RuntimeClassDie) DieFeedJSON(j []byte) *RuntimeClassDie
- func (d *RuntimeClassDie) DieFeedPtr(r *nodev1.RuntimeClass) *RuntimeClassDie
- func (d *RuntimeClassDie) DieFeedRawExtension(raw runtime.RawExtension) *RuntimeClassDie
- func (d *RuntimeClassDie) DieFeedYAML(y []byte) *RuntimeClassDie
- func (d *RuntimeClassDie) DieFeedYAMLFile(name string) *RuntimeClassDie
- func (d *RuntimeClassDie) DieImmutable(immutable bool) *RuntimeClassDie
- func (d *RuntimeClassDie) DieRelease() nodev1.RuntimeClass
- func (d *RuntimeClassDie) DieReleaseJSON() []byte
- func (d *RuntimeClassDie) DieReleasePtr() *nodev1.RuntimeClass
- func (d *RuntimeClassDie) DieReleaseRawExtension() runtime.RawExtension
- func (d *RuntimeClassDie) DieReleaseUnstructured() *unstructured.Unstructured
- func (d *RuntimeClassDie) DieReleaseYAML() []byte
- func (d *RuntimeClassDie) DieStamp(fn func(r *nodev1.RuntimeClass)) *RuntimeClassDie
- func (d *RuntimeClassDie) DieStampAt(jp string, fn interface{}) *RuntimeClassDie
- func (d *RuntimeClassDie) DieWith(fns ...func(d *RuntimeClassDie)) *RuntimeClassDie
- func (d *RuntimeClassDie) GetObjectKind() schema.ObjectKind
- func (d *RuntimeClassDie) Handler(v string) *RuntimeClassDie
- func (d *RuntimeClassDie) Kind(v string) *RuntimeClassDie
- func (d *RuntimeClassDie) MarshalJSON() ([]byte, error)
- func (d *RuntimeClassDie) MetadataDie(fn func(d *metav1.ObjectMetaDie)) *RuntimeClassDie
- func (d *RuntimeClassDie) Overhead(v *nodev1.Overhead) *RuntimeClassDie
- func (d *RuntimeClassDie) Scheduling(v *nodev1.Scheduling) *RuntimeClassDie
- func (d *RuntimeClassDie) UnmarshalJSON(b []byte) error
- type SchedulingDie
- func (d *SchedulingDie) DeepCopy() *SchedulingDie
- func (d *SchedulingDie) DieFeed(r nodev1.Scheduling) *SchedulingDie
- func (d *SchedulingDie) DieFeedJSON(j []byte) *SchedulingDie
- func (d *SchedulingDie) DieFeedPtr(r *nodev1.Scheduling) *SchedulingDie
- func (d *SchedulingDie) DieFeedRawExtension(raw runtime.RawExtension) *SchedulingDie
- func (d *SchedulingDie) DieFeedYAML(y []byte) *SchedulingDie
- func (d *SchedulingDie) DieFeedYAMLFile(name string) *SchedulingDie
- func (d *SchedulingDie) DieImmutable(immutable bool) *SchedulingDie
- func (d *SchedulingDie) DieRelease() nodev1.Scheduling
- func (d *SchedulingDie) DieReleaseJSON() []byte
- func (d *SchedulingDie) DieReleasePtr() *nodev1.Scheduling
- func (d *SchedulingDie) DieReleaseRawExtension() runtime.RawExtension
- func (d *SchedulingDie) DieReleaseYAML() []byte
- func (d *SchedulingDie) DieStamp(fn func(r *nodev1.Scheduling)) *SchedulingDie
- func (d *SchedulingDie) DieStampAt(jp string, fn interface{}) *SchedulingDie
- func (d *SchedulingDie) DieWith(fns ...func(d *SchedulingDie)) *SchedulingDie
- func (d *SchedulingDie) NodeSelector(v map[string]string) *SchedulingDie
- func (d *SchedulingDie) Tolerations(v ...corev1.Toleration) *SchedulingDie
- func (d *SchedulingDie) TolerationsDie(key string, fn func(d *diecorev1.TolerationDie)) *SchedulingDie
Constants ¶
This section is empty.
Variables ¶
var OverheadBlank = (&OverheadDie{}).DieFeed(nodev1.Overhead{})
var RuntimeClassBlank = (&RuntimeClassDie{}).DieFeed(nodev1.RuntimeClass{})
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 ¶
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) 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) 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) DieFeed ¶
func (d *RuntimeClassDie) DieFeed(r nodev1.RuntimeClass) *RuntimeClassDie
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 ¶
func (d *RuntimeClassDie) DieFeedPtr(r *nodev1.RuntimeClass) *RuntimeClassDie
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) 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) 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 ¶
func (d *RuntimeClassDie) Kind(v string) *RuntimeClassDie
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 ¶
func (d *RuntimeClassDie) Overhead(v *nodev1.Overhead) *RuntimeClassDie
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 ¶
func (d *SchedulingDie) DieFeed(r nodev1.Scheduling) *SchedulingDie
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) 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) 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) 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