controllers

package
v0.8.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeletePodForUpdate added in v0.7.0

func DeletePodForUpdate(ctx context.Context, r *SolrCloudReconciler, instance *solrv1beta1.SolrCloud, pod *corev1.Pod, podHasReplicas bool, logger logr.Logger) (requeueAfterDuration time.Duration, requestInProgress bool, err error)

func EnsurePodReadinessCondition added in v0.7.0

func EnsurePodReadinessCondition(pod *corev1.Pod, conditionType corev1.PodConditionType, ensureCondition podReadinessConditionChange) (conditionNeedsChange bool)

EnsurePodReadinessCondition ensure the podCondition is set to the given values

func EnsurePodReadinessConditions added in v0.7.0

func EnsurePodReadinessConditions(ctx context.Context, r *SolrCloudReconciler, pod *corev1.Pod, ensureConditions map[corev1.PodConditionType]podReadinessConditionChange, logger logr.Logger) (updatedPod *corev1.Pod, err error)

func InitializeCustomPodReadinessCondition added in v0.7.0

func InitializeCustomPodReadinessCondition(pod *corev1.Pod, conditionType corev1.PodConditionType, reason PodConditionChangeReason, message string, status bool) (conditionNeedsInitializing bool)

InitializeCustomPodReadinessCondition set the default value for a pod's readiness condition after pod creation, given all the default values to set

func InitializePodReadinessCondition added in v0.7.0

func InitializePodReadinessCondition(pod *corev1.Pod, conditionType corev1.PodConditionType) (conditionNeedsInitializing bool)

InitializePodReadinessCondition set the default value for a pod's readiness condition after pod creation.

func PodConditionEquals added in v0.7.0

func PodConditionEquals(pod *corev1.Pod, conditionType corev1.PodConditionType, reason PodConditionChangeReason) bool

PodConditionEquals check if a podCondition equals what is expected

func PodConditionHasStatus added in v0.8.0

func PodConditionHasStatus(pod *corev1.Pod, conditionType corev1.PodConditionType, status corev1.ConditionStatus) bool

PodConditionEquals check if a podCondition equals what is expected

func UseZkCRD

func UseZkCRD(useCRD bool)

Types

type PodConditionChangeReason added in v0.7.0

type PodConditionChangeReason string

PodConditionChangeReason describes the reason why a Pod is being stopped.

const (
	PodStarted       PodConditionChangeReason = "PodStarted"
	PodUpdate        PodConditionChangeReason = "PodUpdate"
	EvictingReplicas PodConditionChangeReason = "EvictingReplicas"
	ScaleDown        PodConditionChangeReason = "ScaleDown"
)

type RollingUpdateMetadata added in v0.8.0

type RollingUpdateMetadata struct {
	// Whether or not replicas will be migrated during this rolling upgrade
	RequiresReplicaMigration bool `json:"requiresReplicaMigration"`
}

RollingUpdateMetadata contains metadata for rolling update cluster operations.

type SolrBackupReconciler

type SolrBackupReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	Config *rest.Config
}

SolrBackupReconciler reconciles a SolrBackup object

func (*SolrBackupReconciler) Reconcile

func (r *SolrBackupReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile

func (*SolrBackupReconciler) SetupWithManager

func (r *SolrBackupReconciler) SetupWithManager(mgr ctrl.Manager) (err error)

SetupWithManager sets up the controller with the Manager.

type SolrCloudReconciler

type SolrCloudReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

SolrCloudReconciler reconciles a SolrCloud object

func (*SolrCloudReconciler) Reconcile

func (r *SolrCloudReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile

func (*SolrCloudReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type SolrClusterOp added in v0.8.0

type SolrClusterOp struct {
	// The type of Cluster Operation
	Operation SolrClusterOperationType `json:"operation"`

	// Time that the Cluster Operation was started or re-started
	LastStartTime metav1.Time `json:"lastStartTime"`

	// Time that the Cluster Operation was started or re-started
	Metadata string `json:"metadata"`
}

SolrClusterOp contains metadata for cluster operations performed on SolrClouds.

func GetClusterOpRetryQueue added in v0.8.0

func GetClusterOpRetryQueue(statefulSet *appsv1.StatefulSet) (clusterOpQueue []SolrClusterOp, err error)

func GetCurrentClusterOp added in v0.8.0

func GetCurrentClusterOp(statefulSet *appsv1.StatefulSet) (clusterOp *SolrClusterOp, err error)

type SolrClusterOperationType added in v0.8.0

type SolrClusterOperationType string
const (
	ScaleDownLock       SolrClusterOperationType = "ScalingDown"
	ScaleUpLock         SolrClusterOperationType = "ScalingUp"
	UpdateLock          SolrClusterOperationType = "RollingUpdate"
	BalanceReplicasLock SolrClusterOperationType = "BalanceReplicas"
)

type SolrPrometheusExporterReconciler

type SolrPrometheusExporterReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

SolrPrometheusExporterReconciler reconciles a SolrPrometheusExporter object

func (*SolrPrometheusExporterReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile

func (*SolrPrometheusExporterReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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