util

package
v0.0.0-...-2e92ff8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountImportResult

func CountImportResult(controllerName, cluster, namespace, name string, successful bool)

CountImportResult increase the counter metric

func EnsureImagePullSecret

func EnsureImagePullSecret(ctx context.Context, namespace string, client ctrlruntimeclient.Client, log *logrus.Entry) error

EnsureImagePullSecret copy secret PullSecretName from ci namespace to another namespace

func EnsureNamespaceNotMonitored

func EnsureNamespaceNotMonitored(ctx context.Context, name string, client ctrlruntimeclient.Client, log *logrus.Entry) error

EnsureNamespaceNotMonitored make sure the namespace is ignored by openshift-monitoring

func IsTerminal

func IsTerminal(err error) bool

IsTerminal indicates if a given error is terminal

func RegisterMetrics

func RegisterMetrics() error

RegisterMetrics Registers metrics

func SwallowIfTerminal

func SwallowIfTerminal(err error) error

SwallowIfTerminal will swallow errors if they are terminal. It supports wrapped errors.

func TerminalError

func TerminalError(inner error) error

TerminalError returns a new terminal error which indicates that there is no point in retrying reconciliation. The reconciler should use SwallowIfTerminal to wrap any errors it got before returning them.

Types

This section is empty.

Jump to

Keyboard shortcuts

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