utils

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultInstanceKey = client.ObjectKey{Name: "default"}
View Source
var DefaultTSEEInstanceKey = client.ObjectKey{Name: "tigera-secure"}

Functions

func AddAPIServerWatch

func AddAPIServerWatch(c controller.Controller) error

func AddComplianceWatch added in v0.2.1

func AddComplianceWatch(c controller.Controller) error

func AddMonitoringWatch

func AddMonitoringWatch(c controller.Controller) error

func AddNetworkWatch

func AddNetworkWatch(c controller.Controller) error

func ContextLoggerForResource

func ContextLoggerForResource(log logr.Logger, obj runtime.Object) logr.Logger

ContextLoggerForResource provides a logger instance with context set for the provided object.

func GetMonitoringConfig

func GetMonitoringConfig(ctx context.Context, cli client.Client) (*operatorv1.MonitoringConfiguration, error)

GetMonitoringConfig returns the default installation instance with defaults populated.

func GetNetworkingPullSecrets

func GetNetworkingPullSecrets(i *operatorv1.Installation, c client.Client) ([]*corev1.Secret, error)

func IgnoreObject

func IgnoreObject(obj runtime.Object) bool

IgnoreObject returns true if the object has been marked as ignored by the user, and returns false otherwise.

func IsAPIServerReady

func IsAPIServerReady(client client.Client, l logr.Logger) bool

func ValidateCertPair

func ValidateCertPair(client client.Client, certPairSecretName, keyName, certName, ns string) (*corev1.Secret, error)

validateCertPair checks if the given secret exists and if so that it contains key and cert fields. If a secret exists then it is returned. If there is an error accessing the secret (except NotFound) or the cert does not have both a key and cert field then an appropriate error is returned. If no secret exists then nil, nil is returned to represent that no cert is valid.

func ValidateMonitoringConfig

func ValidateMonitoringConfig(m *operatorv1.MonitoringConfiguration) error

Types

type ComponentHandler

type ComponentHandler interface {
	CreateOrUpdate(context.Context, render.Component, *status.StatusManager) error
}

func NewComponentHandler

func NewComponentHandler(log logr.Logger, client client.Client, scheme *runtime.Scheme, cr metav1.Object) ComponentHandler

Jump to

Keyboard shortcuts

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