Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the knowledge v1alpha1 API group. +kubebuilder:object:generate=true +groupName=knowledge.cortex
Index ¶
- Constants
- Variables
- func BoxFeatureList[T any](features []T) (runtime.RawExtension, error)
- func UnboxFeatureList[T any](raw runtime.RawExtension) ([]T, error)
- type CinderDatasource
- type CinderDatasourceType
- type Datasource
- type DatasourceList
- type DatasourceSpec
- type DatasourceStatus
- type DatasourceType
- type IdentityDatasource
- type IdentityDatasourceType
- type KPI
- type KPIDependenciesSpec
- type KPIList
- type KPISpec
- type KPIStatus
- type Knowledge
- type KnowledgeDependenciesSpec
- type KnowledgeExtractorSpec
- type KnowledgeList
- type KnowledgeSpec
- type KnowledgeStatus
- type LimesDatasource
- type LimesDatasourceType
- type ManilaDatasource
- type ManilaDatasourceType
- type NovaDatasource
- type NovaDatasourceType
- type OpenStackDatasource
- type OpenStackDatasourceType
- type PlacementDatasource
- type PlacementDatasourceType
- type PrometheusDatasource
Constants ¶
const ( // Something went wrong during the syncing of the datasource. DatasourceConditionError = "Error" // The datasource is waiting for a dependency datasource to become available. DatasourceConditionWaiting = "Waiting" )
const (
// Something went wrong during the kpi reconciliation.
KPIConditionError = "Error"
)
const (
// Something went wrong during the extraction of the knowledge.
KnowledgeConditionError = "Error"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "knowledge.cortex", 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 )
var ( // Some datasources may depend on other datasources to be present. // If these aren't yet available, this will be the returned error. ErrWaitingForDependencyDatasource = errors.New("waiting for dependency datasource to become available") )
Functions ¶
func BoxFeatureList ¶
func BoxFeatureList[T any](features []T) (runtime.RawExtension, error)
Convert a list of strongly typed feature structs to raw features.
func UnboxFeatureList ¶
func UnboxFeatureList[T any](raw runtime.RawExtension) ([]T, error)
Convert raw features to a list of strongly typed feature structs.
Types ¶
type CinderDatasource ¶
type CinderDatasource struct {
// The type of resource to sync.
Type CinderDatasourceType `json:"type"`
}
func (*CinderDatasource) DeepCopy ¶
func (in *CinderDatasource) DeepCopy() *CinderDatasource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CinderDatasource.
func (*CinderDatasource) DeepCopyInto ¶
func (in *CinderDatasource) DeepCopyInto(out *CinderDatasource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CinderDatasourceType ¶
type CinderDatasourceType string
const (
CinderDatasourceTypeStoragePools CinderDatasourceType = "storagePools"
)
type Datasource ¶
type Datasource struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitempty,omitzero"`
// spec defines the desired state of Datasource
// +required
Spec DatasourceSpec `json:"spec"`
// status defines the observed state of Datasource
// +optional
Status DatasourceStatus `json:"status,omitempty,omitzero"`
}
Datasource is the Schema for the datasources API
func (*Datasource) DeepCopy ¶
func (in *Datasource) DeepCopy() *Datasource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Datasource.
func (*Datasource) DeepCopyInto ¶
func (in *Datasource) DeepCopyInto(out *Datasource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Datasource) DeepCopyObject ¶
func (in *Datasource) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DatasourceList ¶
type DatasourceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Datasource `json:"items"`
}
DatasourceList contains a list of Datasource
func (*DatasourceList) DeepCopy ¶
func (in *DatasourceList) DeepCopy() *DatasourceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatasourceList.
func (*DatasourceList) DeepCopyInto ¶
func (in *DatasourceList) DeepCopyInto(out *DatasourceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DatasourceList) DeepCopyObject ¶
func (in *DatasourceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DatasourceSpec ¶
type DatasourceSpec struct {
// The operator by which this datasource should be synced.
Operator string `json:"operator,omitempty"`
// If given, configures a Prometheus datasource to fetch.
// Type must be set to "prometheus" if this is used.
// +kubebuilder:validation:Optional
Prometheus PrometheusDatasource `json:"prometheus"`
// If given, configures an OpenStack datasource to fetch.
// Type must be set to "openstack" if this is used.
// +kubebuilder:validation:Optional
OpenStack OpenStackDatasource `json:"openstack,omitempty"`
// The type of the datasource.
Type DatasourceType `json:"type"`
// Database credentials to use for the datasource.
// The secret should contain the following keys:
// - "username": The database username.
// - "password": The database password.
// - "host": The database host.
// - "port": The database port.
// - "database": The database name.
DatabaseSecretRef corev1.SecretReference `json:"databaseSecretRef"`
// Kubernetes secret ref for an optional sso certificate to access the host.
// The secret should contain two keys: "cert" and "key".
// +kubebuilder:validation:Optional
SSOSecretRef *corev1.SecretReference `json:"ssoSecretRef,omitempty"`
}
func (*DatasourceSpec) DeepCopy ¶
func (in *DatasourceSpec) DeepCopy() *DatasourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatasourceSpec.
func (*DatasourceSpec) DeepCopyInto ¶
func (in *DatasourceSpec) DeepCopyInto(out *DatasourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DatasourceStatus ¶
type DatasourceStatus struct {
// When the datasource was last successfully synced.
LastSynced metav1.Time `json:"lastSynced,omitempty"`
// The number of objects currently stored for this datasource.
NumberOfObjects int64 `json:"numberOfObjects,omitempty"`
// The time it took to perform the last sync.
Took metav1.Duration `json:"took"`
// Planned time for the next sync.
NextSyncTime metav1.Time `json:"nextSyncTime,omitempty"`
// The current status conditions of the datasource.
// +kubebuilder:validation:Optional
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}
func (*DatasourceStatus) DeepCopy ¶
func (in *DatasourceStatus) DeepCopy() *DatasourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatasourceStatus.
func (*DatasourceStatus) DeepCopyInto ¶
func (in *DatasourceStatus) DeepCopyInto(out *DatasourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DatasourceStatus) IsReady ¶
func (s *DatasourceStatus) IsReady() bool
Helper function to check if the datasource is ready.
type DatasourceType ¶
type DatasourceType string
const ( // DatasourceTypePrometheus indicates a Prometheus datasource. DatasourceTypePrometheus DatasourceType = "prometheus" // DatasourceTypeOpenStack indicates an OpenStack datasource. DatasourceTypeOpenStack DatasourceType = "openstack" )
type IdentityDatasource ¶
type IdentityDatasource struct {
// The type of resource to sync.
Type IdentityDatasourceType `json:"type"`
}
func (*IdentityDatasource) DeepCopy ¶
func (in *IdentityDatasource) DeepCopy() *IdentityDatasource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentityDatasource.
func (*IdentityDatasource) DeepCopyInto ¶
func (in *IdentityDatasource) DeepCopyInto(out *IdentityDatasource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IdentityDatasourceType ¶
type IdentityDatasourceType string
const ( IdentityDatasourceTypeProjects IdentityDatasourceType = "projects" IdentityDatasourceTypeDomains IdentityDatasourceType = "domains" )
type KPI ¶
type KPI struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitempty,omitzero"`
// spec defines the desired state of KPI
// +required
Spec KPISpec `json:"spec"`
// status defines the observed state of KPI
// +optional
Status KPIStatus `json:"status,omitempty,omitzero"`
}
KPI is the Schema for the deschedulings API
func (*KPI) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KPI.
func (*KPI) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KPI) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KPIDependenciesSpec ¶
type KPIDependenciesSpec struct {
// Datasources required for extracting this kpi.
// +kubebuilder:validation:Optional
Datasources []corev1.ObjectReference `json:"datasources,omitempty"`
// Knowledges this kpi depends on.
// +kubebuilder:validation:Optional
Knowledges []corev1.ObjectReference `json:"knowledges,omitempty"`
}
Dependencies required for extracting the kpi. If provided, all datasources and knowledges must have the same database secret reference so the kpi can be joined across multiple database tables.
func (*KPIDependenciesSpec) DeepCopy ¶
func (in *KPIDependenciesSpec) DeepCopy() *KPIDependenciesSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KPIDependenciesSpec.
func (*KPIDependenciesSpec) DeepCopyInto ¶
func (in *KPIDependenciesSpec) DeepCopyInto(out *KPIDependenciesSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KPIList ¶
type KPIList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []KPI `json:"items"`
}
KPIList contains a list of KPI
func (*KPIList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KPIList.
func (*KPIList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KPIList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KPISpec ¶
type KPISpec struct {
// The operator by which this kpi should be executed.
Operator string `json:"operator,omitempty"`
// The name of the kpi in the cortex implementation.
Impl string `json:"impl"`
// Additional configuration for the extractor that can be used
// +kubebuilder:validation:Optional
Opts runtime.RawExtension `json:"opts,omitempty"`
// Dependencies required for extracting this kpi.
// +kubebuilder:validation:Optional
Dependencies KPIDependenciesSpec `json:"dependencies"`
// Additional description of the kpi which helps understand its purpose
// and decisions made by it.
// +kubebuilder:validation:Optional
Description string `json:"description,omitempty"`
}
func (*KPISpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KPISpec.
func (*KPISpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KPIStatus ¶
type KPIStatus struct {
// If the kpi is ready to be executed.
Ready bool `json:"ready"`
// How many dependencies have been reconciled.
ReadyDependencies int `json:"readyDependencies"`
// Total number of dependencies configured.
TotalDependencies int `json:"totalDependencies"`
// "ReadyDependencies / TotalDependencies ready" as a human-readable string
// or "ready" if there are no dependencies configured.
DependenciesReadyFrac string `json:"dependenciesReadyFrac,omitempty"`
// The current status conditions of the kpi.
// +kubebuilder:validation:Optional
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}
func (*KPIStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KPIStatus.
func (*KPIStatus) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Knowledge ¶
type Knowledge struct {
metav1.TypeMeta `json:",inline"`
// metadata is a standard object metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitempty,omitzero"`
// spec defines the desired state of Knowledge
// +required
Spec KnowledgeSpec `json:"spec"`
// status defines the observed state of Knowledge
// +optional
Status KnowledgeStatus `json:"status,omitempty,omitzero"`
}
Knowledge is the Schema for the knowledges API
func (*Knowledge) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Knowledge.
func (*Knowledge) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Knowledge) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KnowledgeDependenciesSpec ¶
type KnowledgeDependenciesSpec struct {
// Datasources required for extracting this knowledge.
// If provided, all datasources must have the same database secret reference
// so the knowledge can be joined across multiple database tables.
// +kubebuilder:validation:Optional
Datasources []corev1.ObjectReference `json:"datasources,omitempty"`
// Other knowledges this knowledge depends on.
// +kubebuilder:validation:Optional
Knowledges []corev1.ObjectReference `json:"knowledges,omitempty"`
}
Dependencies required for extracting the knowledge.
func (*KnowledgeDependenciesSpec) DeepCopy ¶
func (in *KnowledgeDependenciesSpec) DeepCopy() *KnowledgeDependenciesSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KnowledgeDependenciesSpec.
func (*KnowledgeDependenciesSpec) DeepCopyInto ¶
func (in *KnowledgeDependenciesSpec) DeepCopyInto(out *KnowledgeDependenciesSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KnowledgeExtractorSpec ¶
type KnowledgeExtractorSpec struct {
// The name of the extractor.
Name string `json:"name,omitempty"`
// Additional configuration for the extractor.
// +kubebuilder:validation:Optional
Config runtime.RawExtension `json:"config"`
}
func (*KnowledgeExtractorSpec) DeepCopy ¶
func (in *KnowledgeExtractorSpec) DeepCopy() *KnowledgeExtractorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KnowledgeExtractorSpec.
func (*KnowledgeExtractorSpec) DeepCopyInto ¶
func (in *KnowledgeExtractorSpec) DeepCopyInto(out *KnowledgeExtractorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KnowledgeList ¶
type KnowledgeList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Knowledge `json:"items"`
}
KnowledgeList contains a list of Knowledge
func (*KnowledgeList) DeepCopy ¶
func (in *KnowledgeList) DeepCopy() *KnowledgeList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KnowledgeList.
func (*KnowledgeList) DeepCopyInto ¶
func (in *KnowledgeList) DeepCopyInto(out *KnowledgeList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KnowledgeList) DeepCopyObject ¶
func (in *KnowledgeList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type KnowledgeSpec ¶
type KnowledgeSpec struct {
// The operator by which this knowledge should be extracted.
Operator string `json:"operator,omitempty"`
// The feature extractor to use for extracting this knowledge.
Extractor KnowledgeExtractorSpec `json:"extractor,omitempty"`
// The desired recency of this knowledge, i.e. how old it can be until
// it needs to be re-extracted.
// +kubebuilder:default="60s"
Recency metav1.Duration `json:"recency"`
// A human-readable description of the knowledge to be extracted.
// +kubebuilder:validation:Optional
Description string `json:"description,omitempty"`
// Dependencies required for extracting this knowledge.
// +kubebuilder:validation:Optional
Dependencies KnowledgeDependenciesSpec `json:"dependencies"`
// Database credentials for the database where the knowledge will be stored.
//
// Note: this is a legacy feature to stay compatible with the cortex scheduler.
// Once the scheduler is moved to use the knowledge via CRs only, we can
// remove this.
//
// The secret should contain the following keys:
// - "username": The database username.
// - "password": The database password.
// - "host": The database host.
// - "port": The database port.
// - "database": The database name.
DatabaseSecretRef *corev1.SecretReference `json:"databaseSecretRef"`
// Whether the knowledge should only be stored in the database and not
// in the CR status.
//
// Note: this is a legacy feature. Features should always contain condensed
// knowledge in the CR status for easy access.
// +kubebuilder:default=false
StoreInDatabaseOnly bool `json:"storeInDatabaseOnly,omitempty"`
}
func (*KnowledgeSpec) DeepCopy ¶
func (in *KnowledgeSpec) DeepCopy() *KnowledgeSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KnowledgeSpec.
func (*KnowledgeSpec) DeepCopyInto ¶
func (in *KnowledgeSpec) DeepCopyInto(out *KnowledgeSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KnowledgeStatus ¶
type KnowledgeStatus struct {
// When the knowledge was last successfully extracted.
// +kubebuilder:validation:Optional
LastExtracted metav1.Time `json:"lastExtracted"`
// The time it took to perform the last extraction.
// +kubebuilder:validation:Optional
Took metav1.Duration `json:"took"`
// The raw data behind the extracted knowledge, e.g. a list of features.
// +kubebuilder:validation:Optional
Raw runtime.RawExtension `json:"raw"`
// The number of features extracted, or 1 if the knowledge is not a list.
// +kubebuilder:validation:Optional
RawLength int `json:"rawLength,omitempty"`
// The current status conditions of the knowledge.
// +kubebuilder:validation:Optional
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}
func (*KnowledgeStatus) DeepCopy ¶
func (in *KnowledgeStatus) DeepCopy() *KnowledgeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KnowledgeStatus.
func (*KnowledgeStatus) DeepCopyInto ¶
func (in *KnowledgeStatus) DeepCopyInto(out *KnowledgeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*KnowledgeStatus) IsReady ¶
func (s *KnowledgeStatus) IsReady() bool
Helper function to check if the knowledge is ready.
type LimesDatasource ¶
type LimesDatasource struct {
// The type of resource to sync.
Type LimesDatasourceType `json:"type"`
}
func (*LimesDatasource) DeepCopy ¶
func (in *LimesDatasource) DeepCopy() *LimesDatasource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LimesDatasource.
func (*LimesDatasource) DeepCopyInto ¶
func (in *LimesDatasource) DeepCopyInto(out *LimesDatasource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LimesDatasourceType ¶
type LimesDatasourceType string
const (
LimesDatasourceTypeProjectCommitments LimesDatasourceType = "projectCommitments"
)
type ManilaDatasource ¶
type ManilaDatasource struct {
// The type of resource to sync.
Type ManilaDatasourceType `json:"type"`
}
func (*ManilaDatasource) DeepCopy ¶
func (in *ManilaDatasource) DeepCopy() *ManilaDatasource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManilaDatasource.
func (*ManilaDatasource) DeepCopyInto ¶
func (in *ManilaDatasource) DeepCopyInto(out *ManilaDatasource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ManilaDatasourceType ¶
type ManilaDatasourceType string
const (
ManilaDatasourceTypeStoragePools ManilaDatasourceType = "storagePools"
)
type NovaDatasource ¶
type NovaDatasource struct {
// The type of resource to sync.
Type NovaDatasourceType `json:"type"`
// Time frame in minutes for the changes-since parameter when fetching
// deleted servers. Set if the Type is "deletedServers".
DeletedServersChangesSinceMinutes *int `json:"deletedServersChangesSinceMinutes,omitempty"`
}
func (*NovaDatasource) DeepCopy ¶
func (in *NovaDatasource) DeepCopy() *NovaDatasource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NovaDatasource.
func (*NovaDatasource) DeepCopyInto ¶
func (in *NovaDatasource) DeepCopyInto(out *NovaDatasource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NovaDatasourceType ¶
type NovaDatasourceType string
const ( NovaDatasourceTypeServers NovaDatasourceType = "servers" NovaDatasourceTypeDeletedServers NovaDatasourceType = "deletedServers" NovaDatasourceTypeHypervisors NovaDatasourceType = "hypervisors" NovaDatasourceTypeFlavors NovaDatasourceType = "flavors" NovaDatasourceTypeMigrations NovaDatasourceType = "migrations" NovaDatasourceTypeAggregates NovaDatasourceType = "aggregates" )
type OpenStackDatasource ¶
type OpenStackDatasource struct {
// The type of the OpenStack datasource.
Type OpenStackDatasourceType `json:"type"`
// Datasource for openstack nova.
// Only required if Type is "nova".
// +kubebuilder:validation:Optional
Nova NovaDatasource `json:"nova"`
// Datasource for openstack placement.
// Only required if Type is "placement".
// +kubebuilder:validation:Optional
Placement PlacementDatasource `json:"placement"`
// Datasource for openstack manila.
// Only required if Type is "manila".
// +kubebuilder:validation:Optional
Manila ManilaDatasource `json:"manila"`
// Datasource for openstack identity.
// Only required if Type is "identity".
// +kubebuilder:validation:Optional
Identity IdentityDatasource `json:"identity"`
// Datasource for openstack limes.
// Only required if Type is "limes".
// +kubebuilder:validation:Optional
Limes LimesDatasource `json:"limes"`
// Datasource for openstack cinder.
// Only required if Type is "cinder".
// +kubebuilder:validation:Optional
Cinder CinderDatasource `json:"cinder"`
// How often to sync the datasource.
// +kubebuilder:default="60s"
SyncInterval metav1.Duration `json:"syncInterval"`
// Keystone credentials secret ref for authenticating with openstack.
// The secret should contain the following keys:
// - "availability": The service availability, e.g. "public", "internal", or "admin".
// - "url": The keystone auth URL.
// - "username": The keystone username.
// - "password": The keystone password.
// - "userDomainName": The keystone user domain name.
// - "projectName": The keystone project name.
// - "projectDomainName": The keystone project domain name.
SecretRef corev1.SecretReference `json:"secretRef"`
}
func (*OpenStackDatasource) DeepCopy ¶
func (in *OpenStackDatasource) DeepCopy() *OpenStackDatasource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackDatasource.
func (*OpenStackDatasource) DeepCopyInto ¶
func (in *OpenStackDatasource) DeepCopyInto(out *OpenStackDatasource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OpenStackDatasourceType ¶
type OpenStackDatasourceType string
const ( // OpenStackDatasourceTypeNova indicates a Nova datasource. OpenStackDatasourceTypeNova OpenStackDatasourceType = "nova" // OpenStackDatasourceTypePlacement indicates a Placement datasource. OpenStackDatasourceTypePlacement OpenStackDatasourceType = "placement" // OpenStackDatasourceTypeManila indicates a Manila datasource. OpenStackDatasourceTypeManila OpenStackDatasourceType = "manila" // OpenStackDatasourceTypeIdentity indicates an Identity datasource. OpenStackDatasourceTypeIdentity OpenStackDatasourceType = "identity" // OpenStackDatasourceTypeLimes indicates a Limes datasource. OpenStackDatasourceTypeLimes OpenStackDatasourceType = "limes" // OpenStackDatasourceTypeCinder indicates a Cinder datasource. OpenStackDatasourceTypeCinder OpenStackDatasourceType = "cinder" )
type PlacementDatasource ¶
type PlacementDatasource struct {
// The type of resource to sync.
Type PlacementDatasourceType `json:"type"`
}
func (*PlacementDatasource) DeepCopy ¶
func (in *PlacementDatasource) DeepCopy() *PlacementDatasource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementDatasource.
func (*PlacementDatasource) DeepCopyInto ¶
func (in *PlacementDatasource) DeepCopyInto(out *PlacementDatasource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PlacementDatasourceType ¶
type PlacementDatasourceType string
const ( PlacementDatasourceTypeResourceProviders PlacementDatasourceType = "resourceProviders" PlacementDatasourceTypeResourceProviderInventoryUsages PlacementDatasourceType = "resourceProviderInventoryUsages" PlacementDatasourceTypeResourceProviderTraits PlacementDatasourceType = "resourceProviderTraits" )
type PrometheusDatasource ¶
type PrometheusDatasource struct {
// The query to use to fetch the metric.
Query string `json:"query"`
// Especially when a more complex query is used, we need an alias
// under which the table will be stored in the database.
// Additionally, this alias is used to reference the metric in the
// feature extractors as dependency.
Alias string `json:"alias"`
// The type of the metric, mapping directly to a metric model supported
// by cortex. Note that the metrics are fetched as time series, not instant.
Type string `json:"type"`
// Time range to query the data for.
// +kubebuilder:default="2419200s"
TimeRange metav1.Duration `json:"timeRange"`
// The interval at which to query the data.
// +kubebuilder:default="86400s"
Interval metav1.Duration `json:"interval"`
// The resolution of the data.
// +kubebuilder:default="43200s"
Resolution metav1.Duration `json:"resolution"`
// Secret containing the following keys:
// - "url": The prometheus URL.
SecretRef corev1.SecretReference `json:"secretRef"`
}
func (*PrometheusDatasource) DeepCopy ¶
func (in *PrometheusDatasource) DeepCopy() *PrometheusDatasource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusDatasource.
func (*PrometheusDatasource) DeepCopyInto ¶
func (in *PrometheusDatasource) DeepCopyInto(out *PrometheusDatasource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.