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 ¶
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 LabelGroup 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 LabelGroup 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 5) 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 LabelGroup 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"` // TotalCarbon keeps track of the accumulated grams of carbon dioxide emission over time TotalCarbon string `json:"totalCarbon,omitempty"` // Prometheus query to get the total energy for this LabelGroup SusQLPrometheusEnergyQuery string `json:"susqlPrometheusEnergyQuery,omitempty"` // Prometheus query to get the total CO2 for this LabelGroup SusQLPrometheusCarbonQuery string `json:"susqlPrometheusCarbonQuery,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.