v1alpha1

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the crane API. +k8s:deepcopy-gen=package,register +groupName=co2e.crane.io

Index

Constants

View Source
const GroupName = "co2e.crane.io"

GroupName specifies the group name used to register the objects.

View Source
const (
	ProviderManual = "Manual"
)

Variables

View Source
var (
	SchemeBuilder runtime.SchemeBuilder
	// Depreciated: use Install instead
	AddToScheme = localSchemeBuilder.AddToScheme
	Install     = localSchemeBuilder.AddToScheme
)
View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}

GroupVersion specifies the group and the version used to register the objects.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type CloudCarbonFootprint

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

	Spec   CloudCarbonFootprintSpec   `json:"spec,omitempty"`
	Status CloudCarbonFootprintStatus `json:"status,omitempty"`
}

CloudCarbonFootprint defines carbon footprint configuration of a datacenter

func (*CloudCarbonFootprint) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudCarbonFootprint.

func (*CloudCarbonFootprint) DeepCopyInto

func (in *CloudCarbonFootprint) DeepCopyInto(out *CloudCarbonFootprint)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CloudCarbonFootprint) DeepCopyObject

func (in *CloudCarbonFootprint) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CloudCarbonFootprintList

type CloudCarbonFootprintList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []CloudCarbonFootprint `json:"items"`
}

CloudCarbonFootprintList contains a list of PodQOS

func (*CloudCarbonFootprintList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudCarbonFootprintList.

func (*CloudCarbonFootprintList) DeepCopyInto

func (in *CloudCarbonFootprintList) DeepCopyInto(out *CloudCarbonFootprintList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CloudCarbonFootprintList) DeepCopyObject

func (in *CloudCarbonFootprintList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CloudCarbonFootprintSpec

type CloudCarbonFootprintSpec struct {
	// Provider is the provider of the ccf, when provider is manual, all the properties of ccf would be configured manually
	// when a cloud provider exposes query API, a cloud provider controller can query cloud api and fill the properties automatically
	Provider string `json:"provider,omitempty"`
	// region of the datacenter, e.g. shanghai
	Region string `json:"region,omitempty"`
	// availability zone of the datacenter, e.g. shanghai-az01
	Zone string `json:"zone,omitempty"`
	// locality holds more information of location, e.g. ap/china/shanghai/az01/floor3
	Locality string `json:"locality,omitempty"`
	// power usage effectiveness = IT equipment energy usage / total facility energy usage
	PUE string `json:"pue,omitempty"`
	// emission factor of the data center, unit is tCO2/MWh, the average emission factor of China is 0.5810
	EmissionFactor string `json:"emissionFactor,omitempty"`
	// compute power infos
	// when there are multiple node types in the cluster, define multiple compute configs
	ComputeConfig []*ComputeConfig `json:"computeConfig,omitempty"`
	// storage power info
	StorageConfig []*StorageConfig `json:"storageConfig,omitempty"`
	// networking power info
	NetworkingConfig []*NetworkingConfig `json:"networkingConfig,omitempty"`
}

func (*CloudCarbonFootprintSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudCarbonFootprintSpec.

func (*CloudCarbonFootprintSpec) DeepCopyInto

func (in *CloudCarbonFootprintSpec) DeepCopyInto(out *CloudCarbonFootprintSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CloudCarbonFootprintStatus

type CloudCarbonFootprintStatus struct {
	Conditions []metav1.Condition `json:"condition,omitempty"`
}

func (*CloudCarbonFootprintStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudCarbonFootprintStatus.

func (*CloudCarbonFootprintStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ComputeConfig

type ComputeConfig struct {
	// when there are various types of compute server, node selector selects the targets
	NodeSelector *metav1.LabelSelector `json:"nodeSelector,omitempty"`
	// power when cpu is idle
	MinWattsPerCPU string `json:"minWattsPerCPU,omitempty"`
	// power when cpu utilization is 100%
	MaxWattsPerCPU string `json:"maxWattsPerCPU,omitempty"`
	// sometimes it's hard to measure memory, storage, and networking energy consumption
	// CPUEnergyConsumptionRatio can be defined to specify the percentage of cpu energy consumption vs all IT equipments consumption
	CPUEnergyConsumptionRatio string `json:"cpuEnergyConsumptionRatio,omitempty"`
	// power of per BG memory
	MemoryWattsPerGB string `json:"memoryWattsPerGB,omitempty"`
}

func (*ComputeConfig) DeepCopy

func (in *ComputeConfig) DeepCopy() *ComputeConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComputeConfig.

func (*ComputeConfig) DeepCopyInto

func (in *ComputeConfig) DeepCopyInto(out *ComputeConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NetworkingConfig

type NetworkingConfig struct {
	// networking class, e.g. golden, server, bronze, which define different redundancies of networking links, and has different energy consumption
	NetworkingClass string `json:"storageClass,omitempty"`
	// power per GB for the class
	WattsPerGB string `json:"wattsPerGB,omitempty"`
}

func (*NetworkingConfig) DeepCopy

func (in *NetworkingConfig) DeepCopy() *NetworkingConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkingConfig.

func (*NetworkingConfig) DeepCopyInto

func (in *NetworkingConfig) DeepCopyInto(out *NetworkingConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StorageConfig

type StorageConfig struct {
	// storage class, e.g. cephfs
	StorageClass string `json:"storageClass,omitempty"`
	// power per TB for the class
	WattsPerTB string `json:"wattsPerTB,omitempty"`
}

func (*StorageConfig) DeepCopy

func (in *StorageConfig) DeepCopy() *StorageConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageConfig.

func (*StorageConfig) DeepCopyInto

func (in *StorageConfig) DeepCopyInto(out *StorageConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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