common

package
v0.0.0-...-71c9d12 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseObject

type BaseObject struct {
	metav1.TypeMeta `json:",inline"`

	// If the Labels of a ReplicaSet are empty, they are defaulted to
	// be the same as the Pod(s) that the ReplicaSet manages.
	// Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`
}

func ToBaseObject

func ToBaseObject(obj runtime.Object) (*BaseObject, error)

type Object

type Object struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// for ServiceAccount
	Secrets []corev1.ObjectReference `json:"secrets,omitempty"`

	// for StorageClass
	Provisioner   string                                `json:"provisioner,omitempty"`
	ReclaimPolicy *corev1.PersistentVolumeReclaimPolicy `json:"reclaimPolicy,omitempty"`

	// for endpoint only
	Subsets interface{} `json:"subsets,omitempty"`
	// for secret and configmap
	Type interface{} `json:"type,omitempty"`
	Data interface{} `json:"data,omitempty"`

	Spec   interface{} `json:"spec,omitempty"`
	Status interface{} `json:"status,omitempty"`
}

type Resource

type Resource struct {
	Usage *ResourceList `json:"usage"`
	Limit *ResourceList `json:"limit"`
}

type ResourceApp

type ResourceApp struct {
	Cpu    int64 `json:"cpu"`
	Memory int64 `json:"memory"`
	PodNum int64 `json:"pod_num"`
}

type ResourceList

type ResourceList struct {
	Cpu    int64 `json:"cpu"`
	Memory int64 `json:"memory"`
}

func ContainersRequestResourceList

func ContainersRequestResourceList(containers []corev1.Container) *ResourceList

Jump to

Keyboard shortcuts

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