namespacestore

package
v5.15.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 28 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPhase

func CheckPhase(namespaceStore *nbv1.NamespaceStore)

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 CmdCreateAWSS3

func CmdCreateAWSS3() *cobra.Command

CmdCreateAWSS3 returns a CLI command

func CmdCreateAWSSTSS3 added in v5.12.4

func CmdCreateAWSSTSS3() *cobra.Command

CmdCreateAWSSTSS3 returns a cli command

func CmdCreateAzureBlob

func CmdCreateAzureBlob() *cobra.Command

CmdCreateAzureBlob returns a CLI command

func CmdCreateGoogleCloudStorage added in v5.13.0

func CmdCreateGoogleCloudStorage() *cobra.Command

CmdCreateGoogleCloudStorage returns a CLI command

func CmdCreateIBMCos

func CmdCreateIBMCos() *cobra.Command

CmdCreateIBMCos returns a CLI command

func CmdCreateNSFS

func CmdCreateNSFS() *cobra.Command

CmdCreateNSFS returns a CLI command

func CmdCreateS3Compatible

func CmdCreateS3Compatible() *cobra.Command

CmdCreateS3Compatible 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 GetNamespaceStoreFromArgs added in v5.13.0

func GetNamespaceStoreFromArgs(cmd *cobra.Command, args []string) *nbv1.NamespaceStore

GetNamespaceStoreFromArgs returns the namesacestore from CLI arg

func MapSecretToNamespaceStores added in v5.11.0

func MapSecretToNamespaceStores(secret types.NamespacedName) []reconcile.Request

MapSecretToNamespaceStores returns a list of namespacestores that uses the secret in their secretRefernce used by namespacestore_contorller to watch secrets changes

func RunCreate added in v5.12.4

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

RunCreate runs a cli command

func RunCreateAWSS3

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

RunCreateAWSS3 runs a CLI command

func RunCreateAWSSTSS3 added in v5.12.4

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

RunCreateAWSSTSS3 runs a cli command

func RunCreateAzureBlob

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

RunCreateAzureBlob runs a CLI command

func RunCreateGoogleCloudStorage added in v5.13.0

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

RunCreateGoogleCloudStorage runs a CLI command

func RunCreateIBMCos

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

RunCreateIBMCos runs a CLI command

func RunCreateNSFS

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

RunCreateNSFS runs a CLI command

func RunCreateS3Compatible

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

RunCreateS3Compatible 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(namespaceStore *nbv1.NamespaceStore) bool

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

Types

type ModeInfo

type ModeInfo struct {
	Phase    nbv1.NamespaceStorePhase
	Severity string
}

ModeInfo holds local information for a namespace store mode.

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

	NamespaceStore *nbv1.NamespaceStore
	NooBaa         *nbv1.NooBaa
	Secret         *corev1.Secret
	ServiceAccount *corev1.ServiceAccount

	SystemInfo             *nb.SystemInfo
	ExternalConnectionInfo *nb.ExternalConnectionInfo
	NamespaceResourceinfo  *nb.NamespaceResourceInfo

	AddExternalConnectionParams    *nb.AddExternalConnectionParams
	CreateNamespaceResourceParams  *nb.CreateNamespaceResourceParams
	UpdateExternalConnectionParams *nb.UpdateExternalConnectionParams
}

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 namespace store

func (*Reconciler) CheckExternalConnection added in v5.11.0

func (r *Reconciler) CheckExternalConnection(connInfo *nb.CheckExternalConnectionParams) error

CheckExternalConnection checks an external connection using the noobaa api

func (*Reconciler) FinalizeDeletion

func (r *Reconciler) FinalizeDeletion() error

FinalizeDeletion removed the finalizer and updates in order to let the namespace-store get reclaimed by kubernetes

func (*Reconciler) LoadNamespaceStoreSecret

func (r *Reconciler) LoadNamespaceStoreSecret() error

LoadNamespaceStoreSecret loads the secret to the reconciler struct

func (*Reconciler) MakeExternalConnectionParams

func (r *Reconciler) MakeExternalConnectionParams() (*nb.AddExternalConnectionParams, error)

MakeExternalConnectionParams translates the namespace store spec and secret, to noobaa api structures to be used for creating/updating external connetion and namespace store

func (*Reconciler) Own

func (r *Reconciler) Own(obj metav1.Object)

Own sets the object owner references to the namespacestore

func (*Reconciler) ReadSystemInfo

func (r *Reconciler) ReadSystemInfo() error

ReadSystemInfo loads the information from the noobaa system api, and prepares the structures to reconcile

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(systemFound bool) error

ReconcileDeletion handles the deletion of a namespace-store using the noobaa api

func (*Reconciler) ReconcileExternalConnection

func (r *Reconciler) ReconcileExternalConnection() error

ReconcileExternalConnection handles the external connection using noobaa api

func (*Reconciler) ReconcileNamespaceStore

func (r *Reconciler) ReconcileNamespaceStore() error

ReconcileNamespaceStore handles the namespace store using noobaa api

func (*Reconciler) ReconcilePhaseConnecting

func (r *Reconciler) ReconcilePhaseConnecting() error

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

func (*Reconciler) ReconcilePhaseCreating

func (r *Reconciler) ReconcilePhaseCreating() error

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

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.NamespaceStorePhase, reason string, message string)

SetPhase updates the status phase and conditions

func (*Reconciler) UpdateStatus

func (r *Reconciler) UpdateStatus() error

UpdateStatus updates the namespace store status in kubernetes from the memory

Jump to

Keyboard shortcuts

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