Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the standard v1alpha1 API group +kubebuilder:object:generate=true +groupName=standard.oam.dev
Index ¶
- Variables
- type MetricsTrait
- func (in *MetricsTrait) DeepCopy() *MetricsTrait
- func (in *MetricsTrait) DeepCopyInto(out *MetricsTrait)
- func (in *MetricsTrait) DeepCopyObject() runtime.Object
- func (tr *MetricsTrait) GetCondition(c runtimev1alpha1.ConditionType) runtimev1alpha1.Condition
- func (tr *MetricsTrait) GetWorkloadReference() runtimev1alpha1.TypedReference
- func (tr *MetricsTrait) SetConditions(c ...runtimev1alpha1.Condition)
- func (tr *MetricsTrait) SetWorkloadReference(r runtimev1alpha1.TypedReference)
- type MetricsTraitList
- type MetricsTraitSpec
- type MetricsTraitStatus
- type ScapeServiceEndPoint
Constants ¶
This section is empty.
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "standard.oam.dev", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type MetricsTrait ¶
type MetricsTrait struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec MetricsTraitSpec `json:"spec"` Status MetricsTraitStatus `json:"status,omitempty"` }
+kubebuilder:object:root=true MetricsTrait is the Schema for the metricstraits API +kubebuilder:resource:categories={oam} +kubebuilder:subresource:status
func (*MetricsTrait) DeepCopy ¶
func (in *MetricsTrait) DeepCopy() *MetricsTrait
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsTrait.
func (*MetricsTrait) DeepCopyInto ¶
func (in *MetricsTrait) DeepCopyInto(out *MetricsTrait)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MetricsTrait) DeepCopyObject ¶
func (in *MetricsTrait) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*MetricsTrait) GetCondition ¶
func (tr *MetricsTrait) GetCondition(c runtimev1alpha1.ConditionType) runtimev1alpha1.Condition
GetCondition for get CR condition
func (*MetricsTrait) GetWorkloadReference ¶
func (tr *MetricsTrait) GetWorkloadReference() runtimev1alpha1.TypedReference
GetWorkloadReference of this MetricsTrait.
func (*MetricsTrait) SetConditions ¶
func (tr *MetricsTrait) SetConditions(c ...runtimev1alpha1.Condition)
SetConditions for set CR condition
func (*MetricsTrait) SetWorkloadReference ¶
func (tr *MetricsTrait) SetWorkloadReference(r runtimev1alpha1.TypedReference)
SetWorkloadReference of this MetricsTrait.
type MetricsTraitList ¶
type MetricsTraitList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []MetricsTrait `json:"items"` }
+kubebuilder:object:root=true MetricsTraitList contains a list of MetricsTrait
func (*MetricsTraitList) DeepCopy ¶
func (in *MetricsTraitList) DeepCopy() *MetricsTraitList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsTraitList.
func (*MetricsTraitList) DeepCopyInto ¶
func (in *MetricsTraitList) DeepCopyInto(out *MetricsTraitList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MetricsTraitList) DeepCopyObject ¶
func (in *MetricsTraitList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MetricsTraitSpec ¶
type MetricsTraitSpec struct { // An endpoint to be monitored by a ServiceMonitor. ScrapeService ScapeServiceEndPoint `json:"scrapeService"` // WorkloadReference to the workload whose metrics needs to be exposed WorkloadReference runtimev1alpha1.TypedReference `json:"workloadRef,omitempty"` }
MetricsTraitSpec defines the desired state of MetricsTrait
func (*MetricsTraitSpec) DeepCopy ¶
func (in *MetricsTraitSpec) DeepCopy() *MetricsTraitSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsTraitSpec.
func (*MetricsTraitSpec) DeepCopyInto ¶
func (in *MetricsTraitSpec) DeepCopyInto(out *MetricsTraitSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MetricsTraitStatus ¶
type MetricsTraitStatus struct { runtimev1alpha1.ConditionedStatus `json:",inline"` // ServiceMonitorName managed by this trait ServiceMonitorName string `json:"serviceMonitorName,omitempty"` // Port is the real port monitoring Port intstr.IntOrString `json:"port,omitempty"` // SelectorLabels is the real labels selected SelectorLabels map[string]string `json:"selectorLabels,omitempty"` }
MetricsTraitStatus defines the observed state of MetricsTrait
func (*MetricsTraitStatus) DeepCopy ¶
func (in *MetricsTraitStatus) DeepCopy() *MetricsTraitStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsTraitStatus.
func (*MetricsTraitStatus) DeepCopyInto ¶
func (in *MetricsTraitStatus) DeepCopyInto(out *MetricsTraitStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScapeServiceEndPoint ¶
type ScapeServiceEndPoint struct { // The format of the metrics data, // The default and only supported format is "prometheus" for now Format string `json:"format,omitempty"` // Number or name of the port to access on the pods targeted by the service. // The default is discovered automatically from podTemplate, metricTrait will create a service for the workload TargetPort intstr.IntOrString `json:"port,omitempty"` // Route service traffic to pods with label keys and values matching this // The default is discovered automatically from podTemplate. // If no podTemplate, use the labels specified here, or use the labels of the workload TargetSelector map[string]string `json:"selector,omitempty"` // HTTP path to scrape for metrics. // default is /metrics // +optional Path string `json:"path,omitempty"` // Scheme at which metrics should be scraped // The default and only supported scheme is "http" // +optional Scheme string `json:"scheme,omitempty"` // The default is true // +optional Enabled *bool `json:"enabled,omitempty"` }
ScapeServiceEndPoint defines a scrapeable endpoint serving Prometheus metrics.
func (*ScapeServiceEndPoint) DeepCopy ¶
func (in *ScapeServiceEndPoint) DeepCopy() *ScapeServiceEndPoint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScapeServiceEndPoint.
func (*ScapeServiceEndPoint) DeepCopyInto ¶
func (in *ScapeServiceEndPoint) DeepCopyInto(out *ScapeServiceEndPoint)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.