v1

package
v0.0.0-...-0c3c601 Latest Latest
Warning

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

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

Documentation

Overview

Package v1 contains API Schema definitions for the susql v1 API group +kubebuilder:object:generate=true +groupName=susql.ibm.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "susql.ibm.com", Version: "v1"}

	// 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 LabelGroup

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

	Spec   LabelGroupSpec   `json:"spec,omitempty"`
	Status LabelGroupStatus `json:"status,omitempty"`
}

LabelGroup is the Schema for the labelgroups API

func (*LabelGroup) DeepCopy

func (in *LabelGroup) DeepCopy() *LabelGroup

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

func (*LabelGroup) DeepCopyInto

func (in *LabelGroup) DeepCopyInto(out *LabelGroup)

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

func (*LabelGroup) DeepCopyObject

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

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

type LabelGroupList

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

LabelGroupList contains a list of LabelGroup

func (*LabelGroupList) DeepCopy

func (in *LabelGroupList) DeepCopy() *LabelGroupList

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

func (*LabelGroupList) DeepCopyInto

func (in *LabelGroupList) DeepCopyInto(out *LabelGroupList)

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

func (*LabelGroupList) DeepCopyObject

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

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

type LabelGroupPhase

type LabelGroupPhase string

LabelGroupPhase defines the label for the LabelGroupStatus

const (
	// Initializing: The label group is picked up for the first time and setup
	Initializing LabelGroupPhase = "Initializing"

	// Reloading: Use most recent value in the database if requested
	Reloading LabelGroupPhase = "Reloading"

	// Aggregating: The label group is aggregating the energy for the registered labels
	Aggregating LabelGroupPhase = "Aggregating"
)

type LabelGroupSpec

type LabelGroupSpec struct {

	// Do not use the most recent value stored in the database
	DisableUsingMostRecentValue bool `json:"disableUsingMostRecentValue,omitempty"`

	// List of labels to be tracked for energy measurments (up to 3)
	Labels []string `json:"labels,omitempty"`
}

LabelGroupSpec defines the desired state of LabelGroup

func (*LabelGroupSpec) DeepCopy

func (in *LabelGroupSpec) DeepCopy() *LabelGroupSpec

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

func (*LabelGroupSpec) DeepCopyInto

func (in *LabelGroupSpec) DeepCopyInto(out *LabelGroupSpec)

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

type LabelGroupStatus

type LabelGroupStatus struct {

	// Transition phase of the label group
	Phase LabelGroupPhase `json:"phase,omitempty"`

	// SusQL Kubernetes labels constructed from the spec
	KubernetesLabels map[string]string `json:"kubernetesLabels,omitempty"`

	// SusQL Prometheus labels constructed from the spec
	PrometheusLabels map[string]string `json:"prometheusLabels,omitempty"`

	// TotalEnergy keeps track of the accumulated energy over time
	TotalEnergy string `json:"totalEnergy,omitempty"`

	// Prometheus query to get the total energy for this label group
	SusQLPrometheusQuery string `json:"susqlPrometheusQuery,omitempty"`

	// Active containers associated with these set of labels
	ActiveContainerIds map[string]float64 `json:"activeContainerIds,omitempty"`
}

LabelGroupStatus defines the observed state of LabelGroup

func (*LabelGroupStatus) DeepCopy

func (in *LabelGroupStatus) DeepCopy() *LabelGroupStatus

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

func (*LabelGroupStatus) DeepCopyInto

func (in *LabelGroupStatus) DeepCopyInto(out *LabelGroupStatus)

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