reconcileCommon

package
v0.0.0-...-b395935 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MonitorResourceCommon

type MonitorResourceCommon struct {
	Client   client.Client
	Ctx      context.Context
	Comparer ResourceComparerInterface
}

func NewMonitorResourceCommon

func NewMonitorResourceCommon(ctx context.Context, c client.Client) *MonitorResourceCommon

func (*MonitorResourceCommon) DeleteFinalizer

func (u *MonitorResourceCommon) DeleteFinalizer(o v1.Object, finalizerKey string) bool

Deletes Finalizer on object if defined

func (*MonitorResourceCommon) GetHCP

GetHCP returns the HostedControlPlane object in the namespace provided. If more than one HCP object exists in the same namespace, an error is returned

func (*MonitorResourceCommon) GetHypershiftClusterID

func (u *MonitorResourceCommon) GetHypershiftClusterID(ns string) (string, error)

GetHypershiftClusterID returns the ID for a hosted cluster based on the HCP object in the same namespace as the provided ClusterURLMonitor

func (*MonitorResourceCommon) GetOSDClusterID

func (u *MonitorResourceCommon) GetOSDClusterID() (string, error)

GetOSDClusterID returns the ID for the cluster based on its ClusterVersion

func (*MonitorResourceCommon) GetServiceMonitor

func (u *MonitorResourceCommon) GetServiceMonitor(namespacedName types.NamespacedName) (monitoringv1.ServiceMonitor, error)

func (*MonitorResourceCommon) ParseMonitorSLOSpecs

func (u *MonitorResourceCommon) ParseMonitorSLOSpecs(routeURL string, sloSpec v1alpha1.SloSpec) (string, error)

remove boolean

func (*MonitorResourceCommon) SetErrorStatus

func (u *MonitorResourceCommon) SetErrorStatus(errorStatus *string, err error) bool

returns whether the errorStatus has changed

func (*MonitorResourceCommon) SetFinalizer

func (u *MonitorResourceCommon) SetFinalizer(o v1.Object, finalizerKey string) bool

Attaches Finalizer to object

func (*MonitorResourceCommon) SetResourceReference

func (u *MonitorResourceCommon) SetResourceReference(reference *v1alpha1.NamespacedName, targetNamespace types.NamespacedName) (bool, error)

func (*MonitorResourceCommon) UpdateMonitorResource

func (u *MonitorResourceCommon) UpdateMonitorResource(cr client.Object) (reconcile.Result, error)

Updates the ClusterURLMonitor and RouteMonitor CR in reconcile loops

func (*MonitorResourceCommon) UpdateMonitorResourceStatus

func (u *MonitorResourceCommon) UpdateMonitorResourceStatus(cr client.Object) (reconcile.Result, error)

Updates the ClusterURLMonitor and RouteMonitor CR Status in reconcile loops

type ResourceComparer

type ResourceComparer struct{}

func (*ResourceComparer) DeepEqual

func (_ *ResourceComparer) DeepEqual(x, y interface{}) bool

type ResourceComparerInterface

type ResourceComparerInterface interface {
	DeepEqual(x, y interface{}) bool
}

Jump to

Keyboard shortcuts

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