containerspec

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeResourceQuantity

type KubeResourceQuantity string

KubeResourceQuantity : Resource quantity for Kubernetes (e.g.; CPU, mem, disk)

func (KubeResourceQuantity) Cmp added in v0.0.18

func (n KubeResourceQuantity) Cmp(quantityToCompare KubeResourceQuantity) (int, error)

func (KubeResourceQuantity) MarshalJSON

func (n KubeResourceQuantity) MarshalJSON() ([]byte, error)

MarshalJSON : marshal the JSON representation of a KubeResourceQuantity

func (*KubeResourceQuantity) UnmarshalJSON

func (n *KubeResourceQuantity) UnmarshalJSON(b []byte) error

UnmarshalJSON : unmarshal the JSON representation of a KubeResourceQuantity

type PaastaContainerSpec

type PaastaContainerSpec struct {
	CPU         *KubeResourceQuantity `json:"cpus"`
	CPULimit    *KubeResourceQuantity `json:"cpus_limit,omitempty"`
	Memory      *KubeResourceQuantity `json:"mem"`
	MemoryLimit *KubeResourceQuantity `json:"mem_limit,omitempty"`
	Disk        *KubeResourceQuantity `json:"disk"`
	DiskLimit   *KubeResourceQuantity `json:"disk_limit,omitempty"`
}

PaastaContainerSpec : Spec for any paasta container with basic fields and utilities

func (*PaastaContainerSpec) DeepCopy

func (in *PaastaContainerSpec) DeepCopy() *PaastaContainerSpec

func (*PaastaContainerSpec) DeepCopyInto

func (in *PaastaContainerSpec) DeepCopyInto(out *PaastaContainerSpec)

func (*PaastaContainerSpec) GetContainerResources

func (spec *PaastaContainerSpec) GetContainerResources() (*corev1.ResourceRequirements, error)

GetContainerResources : get resource requirements based on the container spec

func (*PaastaContainerSpec) GetContainerResourcesWithDefaults

func (spec *PaastaContainerSpec) GetContainerResourcesWithDefaults(defaults *PaastaContainerSpec) (*corev1.ResourceRequirements, error)

GetContainerResources : get resource requirements based on the container spec using defaults when necessary

Jump to

Keyboard shortcuts

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