Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IKubernetesManager ¶
type IKubernetesManager interface { FetchRedisPods(ctx context.Context, cluster *v1alpha1.RedisCluster) (*v1.PodList, error) FetchConfigmap(ctx context.Context, cluster *v1alpha1.RedisCluster) (*v1.ConfigMap, error) CreateConfigMap(ctx context.Context, cluster *v1alpha1.RedisCluster) (*v1.ConfigMap, error) FetchService(ctx context.Context, cluster *v1alpha1.RedisCluster) (*v1.Service, error) CreateService(ctx context.Context, cluster *v1alpha1.RedisCluster) (*v1.Service, error) FetchRedisCluster(ctx context.Context, namespacedName types.NamespacedName) (*redisclusterv1alpha1.RedisCluster, error) UpdateResource(ctx context.Context, obj client.Object) error FetchStatefulsets(ctx context.Context, cluster *v1alpha1.RedisCluster) (*appsv1.StatefulSet, []*appsv1.StatefulSet, error) CreateStatefulsets(ctx context.Context, cluster *v1alpha1.RedisCluster) (*appsv1.StatefulSet, []*appsv1.StatefulSet, error) }
IKubernetesManager is an interface depicting the controller's interaction with the Kubernetes API.
type RedisClusterReconciler ¶
type RedisClusterReconciler struct { KubernetesManager IKubernetesManager Scheme *runtime.Scheme }
RedisClusterReconciler reconciles a RedisCluster object
func (*RedisClusterReconciler) Reconcile ¶
func (r *RedisClusterReconciler) 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. TODO(user): Modify the Reconcile function to compare the state specified by the RedisCluster object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.1/pkg/reconcile
func (*RedisClusterReconciler) RequeueError ¶
func (*RedisClusterReconciler) SetupWithManager ¶
func (r *RedisClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.