Documentation
¶
Index ¶
- Constants
- func BatchResources(spec *v2.BatchContainerSpec) *corev1.ResourceRequirements
- func GetJobPodName(name, namespace string, c client.Client, ctx context.Context) (string, error)
- func NewCurlClient(ctx context.Context, podName string, i *v1.Infinispan, ...) (*curl.Client, error)
- func NewInfinispan(ctx context.Context, i *v1.Infinispan, versionManager *version.Manager, ...) (api.Infinispan, error)
- func NewInfinispanForPod(ctx context.Context, podName string, i *v1.Infinispan, ...) (api.Infinispan, error)
- func PodList(infinispan *infinispanv1.Infinispan, kube *kubernetes.Kubernetes, ...) (*corev1.PodList, error)
- func PodsCreatedBy(namespace string, kube *kubernetes.Kubernetes, ctx context.Context, ...) (*corev1.PodList, error)
- type BackupReconciler
- type BatchReconciler
- type CacheListener
- type CacheReconciler
- type InfinispanReconciler
- type ReconcileOperatorConfig
- type RestoreReconciler
Constants ¶
const ( BatchContainer = "batch" BatchFilename = "batch" BatchVolumeName = "batch-volume" BatchVolumeRoot = "/etc/batch" AdminIdentitiesVolumeName = "admin-identities-volume" )
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" )
const (
BackupDataMountPath = "/opt/infinispan/backups"
)
Variables ¶
This section is empty.
Functions ¶
func BatchResources ¶
func BatchResources(spec *v2.BatchContainerSpec) *corev1.ResourceRequirements
func GetJobPodName ¶
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 ¶
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 ¶
BatchReconciler reconciles a Batch object
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 ¶
CacheReconciler reconciles a Cache object
func (*CacheReconciler) SetupWithManager ¶
SetupWithManager sets up the controller with the Manager.
type InfinispanReconciler ¶
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 ¶
type ReconcileOperatorConfig ¶
type ReconcileOperatorConfig struct { Client client.Client // contains filtered or unexported fields }
ReconcileInfinispan reconciles a Infinispan object
func (*ReconcileOperatorConfig) SetupWithManager ¶
func (r *ReconcileOperatorConfig) SetupWithManager(mgr ctrl.Manager) error
type RestoreReconciler ¶
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