controllers

package
v0.0.0-...-d39333d Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	BatchFilename             = "batch"
	BatchVolumeName           = "batch-volume"
	BatchVolumeRoot           = "/etc/batch"
	AdminIdentitiesVolumeName = "admin-identities-volume"
)
View Source
const (
	// ZeroInitializing means the request has been accepted by the system, but the underlying resources are still
	// being initialized.
	ZeroInitializing zeroCapacityPhase = "Initializing"
	// ZeroInitialized means that all required resources have been initialized
	ZeroInitialized zeroCapacityPhase = "Initialized"
	// ZeroRunning means that the required action has been initiated on the infinispan server.
	ZeroRunning zeroCapacityPhase = "Running"
	// ZeroSucceeded means that the action on the server has completed and the zero pod has been terminated.
	ZeroSucceeded zeroCapacityPhase = "Succeeded"
	// ZeroFailed means that the action failed on the infinispan server and the zero pod has terminated.
	ZeroFailed zeroCapacityPhase = "Failed"
	// ZeroUnknown means that for some reason the state of the action could not be obtained, typically due
	// to an error in communicating with the underlying zero pod.
	ZeroUnknown zeroCapacityPhase = "Unknown"
)
View Source
const (
	BackupDataMountPath = "/opt/infinispan/backups"
)

Variables

This section is empty.

Functions

func GetJobPodName

func GetJobPodName(name, namespace string, c client.Client, ctx context.Context) (string, error)

func NewCurlClient

func NewCurlClient(ctx context.Context, podName string, i *v1.Infinispan, kubernetes *kube.Kubernetes) (*curl.Client, error)

NewCurlClient return a new curl.Client using the admin credentials associated with the v1.Infinispan instance

func NewInfinispan

func NewInfinispan(ctx context.Context, i *v1.Infinispan, versionManager *version.Manager, kubernetes *kube.Kubernetes) (api.Infinispan, error)

NewInfinispan returns a new api.Infinispan client using the first pod in the cluster's StatefulSet

func NewInfinispanForPod

func NewInfinispanForPod(ctx context.Context, podName string, i *v1.Infinispan, versionManager *version.Manager, kubernetes *kube.Kubernetes) (api.Infinispan, error)

NewInfinispanForPod retrieves credential information to initialise a curl.Client and uses this to return a api.Infinispan implementation

func PodList

func PodList(infinispan *infinispanv1.Infinispan, kube *kubernetes.Kubernetes, ctx context.Context) (*corev1.PodList, error)

PodList Obtain list of pods associated with the supplied Infinispan cluster

func PodsCreatedBy

func PodsCreatedBy(namespace string, kube *kubernetes.Kubernetes, ctx context.Context, statefulSetName string) (*corev1.PodList, error)

PodsCreatedBy Obtain pods created by a certain statefulSet

Types

type BackupReconciler

type BackupReconciler struct {
	client.Client
}

BackupReconciler reconciles a Backup object

func (*BackupReconciler) ResourceInstance

func (r *BackupReconciler) ResourceInstance(ctx context.Context, key types.NamespacedName, ctrl *zeroCapacityController) (zeroCapacityResource, error)

func (*BackupReconciler) SetupWithManager

func (r *BackupReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*BackupReconciler) Type

func (r *BackupReconciler) Type() client.Object

type BatchReconciler

type BatchReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

BatchReconciler reconciles a Batch object

func (*BatchReconciler) Reconcile

func (reconciler *BatchReconciler) Reconcile(ctx context.Context, ctrlRequest ctrl.Request) (ctrl.Result, error)

func (*BatchReconciler) SetupWithManager

func (r *BatchReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type CacheListener

type CacheListener struct {
	// The Infinispan cluster to listen to in the configured namespace
	Infinispan     *v1.Infinispan
	Ctx            context.Context
	Kubernetes     *kube.Kubernetes
	Log            *zap.SugaredLogger
	VersionManager *version.Manager
}

func (*CacheListener) CreateOrUpdate

func (cl *CacheListener) CreateOrUpdate(data []byte) error

func (*CacheListener) Delete

func (cl *CacheListener) Delete(data []byte) error

func (*CacheListener) RemoveStaleResources

func (cl *CacheListener) RemoveStaleResources(podName string) error

type CacheReconciler

type CacheReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

CacheReconciler reconciles a Cache object

func (*CacheReconciler) Reconcile

func (r *CacheReconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl.Result, error)

func (*CacheReconciler) SetupWithManager

func (r *CacheReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) (err error)

SetupWithManager sets up the controller with the Manager.

type InfinispanReconciler

type InfinispanReconciler struct {
	client.Client
	// contains filtered or unexported fields
}

InfinispanReconciler reconciles a Infinispan object

func (*InfinispanReconciler) Reconcile

func (r *InfinispanReconciler) Reconcile(ctx context.Context, ctrlRequest ctrl.Request) (ctrl.Result, error)

Reconcile the Infinispan CR resource

func (*InfinispanReconciler) SetupWithManager

func (r *InfinispanReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error

type ReconcileOperatorConfig

type ReconcileOperatorConfig struct {
	Client client.Client
	// contains filtered or unexported fields
}

ReconcileInfinispan reconciles a Infinispan object

func (*ReconcileOperatorConfig) Reconcile

func (*ReconcileOperatorConfig) SetupWithManager

func (r *ReconcileOperatorConfig) SetupWithManager(mgr ctrl.Manager) error

type RestoreReconciler

type RestoreReconciler struct {
	client.Client
}

RestoreReconciler reconciles a Restore object

func (*RestoreReconciler) ResourceInstance

func (r *RestoreReconciler) ResourceInstance(ctx context.Context, name types.NamespacedName, ctrl *zeroCapacityController) (zeroCapacityResource, error)

func (*RestoreReconciler) SetupWithManager

func (r *RestoreReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*RestoreReconciler) Type

func (r *RestoreReconciler) Type() client.Object

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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