bucketclass

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPhase

func CheckPhase(bucketClass *nbv1.BucketClass)

CheckPhase prints the phase and reason for it

func Cmd

func Cmd() *cobra.Command

Cmd returns a CLI command

func CmdCreate

func CmdCreate() *cobra.Command

CmdCreate returns a CLI command

func CmdDelete

func CmdDelete() *cobra.Command

CmdDelete returns a CLI command

func CmdList

func CmdList() *cobra.Command

CmdList returns a CLI command

func CmdReconcile

func CmdReconcile() *cobra.Command

CmdReconcile returns a CLI command

func CmdStatus

func CmdStatus() *cobra.Command

CmdStatus returns a CLI command

func ParseBucketClassType

func ParseBucketClassType(cmd *cobra.Command) nbv1.StoreType

ParseBucketClassType parses the --type flag to a StoreType enum

func RunCreate

func RunCreate(cmd *cobra.Command, args []string)

RunCreate runs a CLI command

func RunDelete

func RunDelete(cmd *cobra.Command, args []string)

RunDelete runs a CLI command

func RunList

func RunList(cmd *cobra.Command, args []string)

RunList runs a CLI command

func RunReconcile

func RunReconcile(cmd *cobra.Command, args []string)

RunReconcile runs a CLI command

func RunStatus

func RunStatus(cmd *cobra.Command, args []string)

RunStatus runs a CLI command

func WaitReady

func WaitReady(bucketClass *nbv1.BucketClass) bool

WaitReady waits until the system phase changes to ready by the operator

Types

type Reconciler

type Reconciler struct {
	Request  types.NamespacedName
	Client   client.Client
	Scheme   *runtime.Scheme
	Ctx      context.Context
	Logger   *logrus.Entry
	Recorder record.EventRecorder

	NBClient   nb.Client
	SystemInfo *nb.SystemInfo

	BucketClass *nbv1.BucketClass
	NooBaa      *nbv1.NooBaa
}

Reconciler is the context for loading or reconciling a noobaa system

func NewReconciler

func NewReconciler(
	req types.NamespacedName,
	client client.Client,
	scheme *runtime.Scheme,
	recorder record.EventRecorder,
) *Reconciler

NewReconciler initializes a reconciler to be used for loading or reconciling a bucket class

func (*Reconciler) FinalizeDeletion

func (r *Reconciler) FinalizeDeletion() error

FinalizeDeletion removed the finalizer and updates in order to let the bucket class get reclaimed by kubernetes

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile() (reconcile.Result, error)

Reconcile reads that state of the cluster for a System object, and makes changes based on the state read and what is in the System.Spec. The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

func (*Reconciler) ReconcileDeletion

func (r *Reconciler) ReconcileDeletion() error

ReconcileDeletion handles the deletion of a bucket class using the noobaa api

func (*Reconciler) ReconcilePhaseVerifying

func (r *Reconciler) ReconcilePhaseVerifying() error

ReconcilePhaseVerifying checks that we have the system and secret needed to reconcile

func (*Reconciler) ReconcilePhases

func (r *Reconciler) ReconcilePhases() error

ReconcilePhases runs the reconcile flow and populates System.Status.

func (*Reconciler) SetPhase

func (r *Reconciler) SetPhase(phase nbv1.BucketClassPhase, reason string, message string)

SetPhase updates the status phase and conditions

func (*Reconciler) UpdateStatus

func (r *Reconciler) UpdateStatus()

UpdateStatus updates the bucket class status in kubernetes from the memory

Jump to

Keyboard shortcuts

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