common

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: UPL-1.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCertNotReady error = errors.New("Certificate secret not yet ready")

ErrCertNotReady is returned when cert-manager has not marked the certificate as ready, and no TLS secret has been populated yet.

Functions

func AddFinalizer

func AddFinalizer(ctx context.Context, client client.Client, obj controllerutil.Object, finalizer string) error

AddFinalizer adds the provided finalizer to the object and updates it in the cluster

func RemoveFinalizer

func RemoveFinalizer(ctx context.Context, client client.Client, obj controllerutil.Object, finalizer string) error

RemoveFinalizer removes the provided finalizer from the object and updates it in the cluster

Types

type CryostatClientFactory

type CryostatClientFactory interface {
	CreateClient(config *cryostatClient.Config) (cryostatClient.CryostatClient, error)
}

CryostatClientFactory provides a method for creating Cryostat clients

type OSUtils

type OSUtils interface {
	GetEnv(name string) string
	GetFileContents(path string) ([]byte, error)
}

OSUtils is an abstraction on functionality that interacts with the operating system

type Reconciler

type Reconciler interface {
	FindCryostat(ctx context.Context, namespace string) (*operatorv1beta1.Cryostat, error)
	GetCryostatClient(ctx context.Context, namespace string, jmxAuth *operatorv1beta1.JMXAuthSecret) (cryostatClient.CryostatClient, error)
	GetPodTarget(targetPod *corev1.Pod, jmxPort int32) (*cryostatClient.TargetAddress, error)
	ReconcilerTLS
}

Reconciler contains helpful methods to communicate with Cryostat It is meant to be embedded within other Reconcilers.

func NewReconciler

func NewReconciler(config *ReconcilerConfig) Reconciler

NewReconciler creates a new Reconciler using the provided configuration

type ReconcilerConfig

type ReconcilerConfig struct {
	// This client, initialized using mgr.Client(), is a split client
	// that reads objects from the cache and writes to the apiserver
	Client client.Client
	// Optional field to specify an alternate ClientFactory used by
	// Reconciler to create CryostatClients
	ClientFactory CryostatClientFactory
	// Optional field to override the default behaviour when interacting
	// with the operating system
	OS OSUtils
}

ReconcilerConfig contains configuration used to customize a Reconciler built with NewReconciler

type ReconcilerTLS

type ReconcilerTLS interface {
	IsCertManagerEnabled() bool
	GetCryostatCABytes(ctx context.Context, cryostat *operatorv1beta1.Cryostat) ([]byte, error)
	GetCertificateSecret(ctx context.Context, name string, namespace string) (*corev1.Secret, error)
	OSUtils
}

ReconcilerTLS contains methods a reconciler may wish to use when configuring TLS-related functionality

func NewReconcilerTLS

func NewReconcilerTLS(config *ReconcilerTLSConfig) ReconcilerTLS

NewReconcilerTLS creates a new ReconcilerTLS using the provided configuration

type ReconcilerTLSConfig

type ReconcilerTLSConfig struct {
	// This client, initialized using mgr.Client(), is a split client
	// that reads objects from the cache and writes to the apiserver
	Client client.Client
	// Optional field to override the default behaviour when interacting
	// with the operating system
	OSUtils
}

ReconcilerTLSConfig contains parameters used to create a ReconcilerTLS

Directories

Path Synopsis
Code generated by imagetag_generator.go; DO NOT EDIT.
Code generated by imagetag_generator.go; DO NOT EDIT.

Jump to

Keyboard shortcuts

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