utils

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDeploymentNamespace

func GetDeploymentNamespace() (string, error)

GetDeploymentNamespace returns the Namespace this operator is deployed on.

func GetLogWithNHC added in v0.3.0

func GetLogWithNHC(log logr.Logger, nhc *v1alpha1.NodeHealthCheck) logr.Logger

GetLogWithNHC return a logger with NHC namespace and name

func IsConditionTrue added in v0.3.0

func IsConditionTrue(conditions []v1.Condition, conditionType string, reason string) bool

IsConditionTrue return true when the conditions contain a condition of given type and reason with status true

func IsOnOpenshift

func IsOnOpenshift(config *rest.Config) (bool, error)

IsOnOpenshift returns true if the cluster has the openshift config group

func MinRequeueDuration added in v0.6.0

func MinRequeueDuration(old, new *time.Duration) *time.Duration

MinRequeueDuration returns the minimal valid requeue duration

func NHCByMHCEventMapperFunc added in v0.6.0

func NHCByMHCEventMapperFunc(c client.Client, logger logr.Logger) handler.MapFunc

NHCByMHCEventMapperFunc return the MHC-event-to-NHC mapper function

func NHCByNodeMapperFunc added in v0.3.0

func NHCByNodeMapperFunc(c client.Client, logger logr.Logger) handler.MapFunc

NHCByNodeMapperFunc return the Node-to-NHC mapper function

func NHCByRemediationCRMapperFunc added in v0.5.0

func NHCByRemediationCRMapperFunc(logger logr.Logger) handler.MapFunc

NHCByRemediationCRMapperFunc return the RemediationCR-to-NHC mapper function

Types

This section is empty.

Jump to

Keyboard shortcuts

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