v1alpha1

package
v0.0.0-...-2433258 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the carbonaware v1alpha1 API group +kubebuilder:object:generate=true +groupName=carbonaware.rossf7.github.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "carbonaware.rossf7.github.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type CarbonAwareKarmadaPolicy

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

	Spec   CarbonAwareKarmadaPolicySpec   `json:"spec,omitempty"`
	Status CarbonAwareKarmadaPolicyStatus `json:"status,omitempty"`
}

CarbonAwareKarmadaPolicy is the Schema for the carbonawarekarmadapolicies API

func (*CarbonAwareKarmadaPolicy) DeepCopy

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

func (*CarbonAwareKarmadaPolicy) DeepCopyInto

func (in *CarbonAwareKarmadaPolicy) DeepCopyInto(out *CarbonAwareKarmadaPolicy)

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

func (*CarbonAwareKarmadaPolicy) DeepCopyObject

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

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

type CarbonAwareKarmadaPolicyList

type CarbonAwareKarmadaPolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []CarbonAwareKarmadaPolicy `json:"items"`
}

CarbonAwareKarmadaPolicyList contains a list of CarbonAwareKarmadaPolicy

func (*CarbonAwareKarmadaPolicyList) DeepCopy

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

func (*CarbonAwareKarmadaPolicyList) DeepCopyInto

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

func (*CarbonAwareKarmadaPolicyList) DeepCopyObject

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

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

type CarbonAwareKarmadaPolicySpec

type CarbonAwareKarmadaPolicySpec struct {
	// array of member clusters and their physical locations
	// +kubebuilder:validation:Required
	ClusterLocations []ClusterLocation `json:"clusterLocations"`

	// number of member clusters to propagate resources to.
	// +kubebuilder:validation:Required
	DesiredClusters *int32 `json:"desiredClusters"`

	// type of the karmada object to scale
	// +kubebuilder:validation:Required
	KarmadaTarget KarmadaTarget `json:"karmadaTarget"`

	// reference to the karmada object to scale
	// +kubebuilder:validation:Required
	KarmadaTargetRef KarmadaTargetRef `json:"karmadaTargetRef"`
}

CarbonAwareKarmadaPolicySpec defines the desired state of CarbonAwareKarmadaPolicy

func (*CarbonAwareKarmadaPolicySpec) DeepCopy

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

func (*CarbonAwareKarmadaPolicySpec) DeepCopyInto

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

type CarbonAwareKarmadaPolicyStatus

type CarbonAwareKarmadaPolicyStatus struct {
	ActiveClusters []string        `json:"activeClusters"`
	Clusters       []ClusterStatus `json:"clusters"`
}

CarbonAwareKarmadaPolicyStatus defines the observed state of CarbonAwareKarmadaPolicy

func (*CarbonAwareKarmadaPolicyStatus) DeepCopy

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

func (*CarbonAwareKarmadaPolicyStatus) DeepCopyInto

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

type ClusterCarbonIntensityStatus

type ClusterCarbonIntensityStatus struct {
	Units     string `json:"units"`
	ValidFrom string `json:"validFrom"`
	ValidTo   string `json:"validTo"`
	Value     string `json:"value"`
}

func (*ClusterCarbonIntensityStatus) DeepCopy

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

func (*ClusterCarbonIntensityStatus) DeepCopyInto

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

type ClusterLocation

type ClusterLocation struct {
	// location of the karmada member cluster
	// +kubebuilder:validation:Required
	Location string `json:"location"`

	// name of the karmada member cluster
	// +kubebuilder:validation:Required
	Name string `json:"name"`
}

ClusterLocation represents a member cluster and its physical location so the carbon intensity for this location can be retrieved.

func (*ClusterLocation) DeepCopy

func (in *ClusterLocation) DeepCopy() *ClusterLocation

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

func (*ClusterLocation) DeepCopyInto

func (in *ClusterLocation) DeepCopyInto(out *ClusterLocation)

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

type ClusterStatus

type ClusterStatus struct {
	CarbonIntensity ClusterCarbonIntensityStatus `json:"carbonIntensity"`
	IsValid         bool                         `json:"isValid"`
	Location        string                       `json:"location"`
	Name            string                       `json:"name"`
}

func (*ClusterStatus) DeepCopy

func (in *ClusterStatus) DeepCopy() *ClusterStatus

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

func (*ClusterStatus) DeepCopyInto

func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)

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

type KarmadaTarget

type KarmadaTarget string

KarmadaTarget represents the type of the Karmada policy Only one of the following Karmada policies is supported: - clusterpropagationpolicies.policy.karmada.io - propagationpolicies.policy.karmada.io +kubebuilder:validation:Enum=clusterpropagationpolicies.policy.karmada.io;propagationpolicies.policy.karmada.io

const (
	ClusterPropagationPolicy KarmadaTarget = "clusterpropagationpolicies.policy.karmada.io"
	PropagationPolicy        KarmadaTarget = "propagationpolicies.policy.karmada.io"
)

type KarmadaTargetRef

type KarmadaTargetRef struct {
	// name of the karmada policy
	// +kubebuilder:validation:Required
	Name string `json:"name"`

	// namespace of the karmada policy
	// +kubebuilder:validation:Required
	Namespace string `json:"namespace"`
}

KarmadaTargetRef represents the Karmada object to scale

func (*KarmadaTargetRef) DeepCopy

func (in *KarmadaTargetRef) DeepCopy() *KarmadaTargetRef

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

func (*KarmadaTargetRef) DeepCopyInto

func (in *KarmadaTargetRef) DeepCopyInto(out *KarmadaTargetRef)

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