Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ServiceMonitorNSName is the name of the namespace in which the serviceMonitor resides // it must be the same that the prometheus operator is listening to ServiceMonitorNSName = "monitoring" )
Functions ¶
func GetOAMServiceLabel ¶
GetOAMServiceLabel will return oamServiceLabel as the pre-defined labels for any serviceMonitor created by the MetricsTrait, prometheus operator listens on this
Types ¶
type Reconciler ¶
type Reconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme // contains filtered or unexported fields }
Reconciler reconciles a MetricsTrait object
func (*Reconciler) Reconcile ¶
Reconcile is the main logic for metric trait controller +kubebuilder:rbac:groups=standard.oam.dev,resources=metricstraits,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=standard.oam.dev,resources=metricstraits/status,verbs=get;update;patch +kubebuilder:rbac:groups=monitoring.coreos.com,resources=*,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=monitoring.coreos.com,resources=*/status,verbs=get;update;patch +kubebuilder:rbac:groups=core.oam.dev,resources=*,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=core.oam.dev,resources=*/status,verbs=get; +kubebuilder:rbac:groups="",resources=events,verbs=get;list;create;update;patch
func (*Reconciler) SetupWithManager ¶
func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager setup Reconciler with ctrl.Manager
func (*Reconciler) UpdateStatus ¶ added in v0.3.3
func (r *Reconciler) UpdateStatus(ctx context.Context, mt *v1alpha1.MetricsTrait, opts ...client.UpdateOption) error
UpdateStatus updates v1alpha1.MetricsTrait's Status with retry.RetryOnConflict