metricstrait

package
v1.6.7 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: UPL-1.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSupportedWorkloadType added in v1.3.0

func GetSupportedWorkloadType(apiVerKind string) string

GetSupportedWorkloadType returns workload type corresponding to input API version and kind that is supported by MetricsTrait.

func MutateAnnotations

func MutateAnnotations(trait *vzapi.MetricsTrait, traitDefaults *vzapi.MetricsTraitSpec, annotations map[string]string) map[string]string

MutateAnnotations mutates annotations with values used by the scraper config. Annotations are either set or removed depending on the state of the trait.

func MutateLabels

func MutateLabels(trait *vzapi.MetricsTrait, workload *unstructured.Unstructured, labels map[string]string) map[string]string

MutateLabels mutates the labels associated with a related resources.

Types

type Reconciler

type Reconciler struct {
	client.Client
	Log     *zap.SugaredLogger
	Scheme  *runtime.Scheme
	Scraper string
}

Reconciler reconciles a MetricsTrait object

func (*Reconciler) NewTraitDefaultsForCOHWorkload

func (r *Reconciler) NewTraitDefaultsForCOHWorkload(ctx context.Context, workload *unstructured.Unstructured) (*vzapi.MetricsTraitSpec, error)

NewTraitDefaultsForCOHWorkload creates metrics trait default values for a Coherence workload.

func (*Reconciler) NewTraitDefaultsForGenericWorkload

func (r *Reconciler) NewTraitDefaultsForGenericWorkload() (*vzapi.MetricsTraitSpec, error)

NewTraitDefaultsForGenericWorkload creates metrics trait default values for a containerized workload.

func (*Reconciler) NewTraitDefaultsForWLSDomainWorkload

func (r *Reconciler) NewTraitDefaultsForWLSDomainWorkload(ctx context.Context, workload *unstructured.Unstructured) (*vzapi.MetricsTraitSpec, error)

NewTraitDefaultsForWLSDomainWorkload creates metrics trait default values for a WLS domain workload.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile reconciles a metrics trait with related resources +kubebuilder:rbac:groups=oam.verrazzano.io,resources=metricstraits,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups=oam.verrazzano.io,resources=metricstraits/status,verbs=get;update;patch

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager creates a controller and adds it to the manager

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL