Documentation
¶
Index ¶
- Variables
- func CheckWaitingFor(sys *nbv1.NooBaa) error
- func Cmd() *cobra.Command
- func CmdCreate() *cobra.Command
- func CmdDelete() *cobra.Command
- func CmdList() *cobra.Command
- func CmdReconcile() *cobra.Command
- func CmdStatus() *cobra.Command
- func CmdYaml() *cobra.Command
- func GetNBClient() nb.Client
- func LoadSystemDefaults() *nbv1.NooBaa
- func RunCreate(cmd *cobra.Command, args []string)
- func RunDelete(cmd *cobra.Command, args []string)
- func RunList(cmd *cobra.Command, args []string)
- func RunOperatorCreate(cmd *cobra.Command, args []string)
- func RunReconcile(cmd *cobra.Command, args []string)
- func RunStatus(cmd *cobra.Command, args []string)
- func RunYaml(cmd *cobra.Command, args []string)
- func WaitReady() bool
- type Client
- type Reconciler
- func (r *Reconciler) CheckAll()
- func (r *Reconciler) CheckServiceStatus(srv *corev1.Service, status *nbv1.ServiceStatus, portName string)
- func (r *Reconciler) CheckSystemCR() error
- func (r *Reconciler) Own(obj metav1.Object)
- func (r *Reconciler) Reconcile() (reconcile.Result, error)
- func (r *Reconciler) ReconcileAWSCredentials() error
- func (r *Reconciler) ReconcileBackingStoreCredentials() error
- func (r *Reconciler) ReconcileDefaultBackingStore() error
- func (r *Reconciler) ReconcileDefaultBucketClass() error
- func (r *Reconciler) ReconcileOBCStorageClass() error
- func (r *Reconciler) ReconcileObject(obj runtime.Object, desiredFunc func()) error
- func (r *Reconciler) ReconcilePhaseConfiguring() error
- func (r *Reconciler) ReconcilePhaseConnecting() error
- func (r *Reconciler) ReconcilePhaseCreating() error
- func (r *Reconciler) ReconcilePhaseVerifying() error
- func (r *Reconciler) ReconcilePhases() error
- func (r *Reconciler) ReconcileRGWCredentials() error
- func (r *Reconciler) ReconcileSecretAdmin() error
- func (r *Reconciler) ReconcileSecretOp() error
- func (r *Reconciler) ReconileReadSystem() error
- func (r *Reconciler) SetDesiredAgentProfile(profileString string) string
- func (r *Reconciler) SetDesiredCoreApp()
- func (r *Reconciler) SetDesiredServiceMgmt()
- func (r *Reconciler) SetDesiredServiceS3()
- func (r *Reconciler) SetPhase(phase nbv1.SystemPhase, reason string, message string)
- func (r *Reconciler) SetReadme(t *template.Template)
- func (r *Reconciler) UpdateStatus()
Constants ¶
This section is empty.
Variables ¶
var (
// ContainerImageConstraint is the instantiated semver contraints used for image verification
ContainerImageConstraint, _ = semver.NewConstraint(options.ContainerImageConstraintSemver)
// ReadmeReady is a template for system.status.readme
ReadmeReady = template.Must(template.New("system_status_readme_ready").
Parse(bundle.File_deploy_internal_text_system_status_readme_ready_tmpl))
// ReadmeProgress is a template for system.status.readme
ReadmeProgress = template.Must(template.New("system_status_readme_progress").
Parse(bundle.File_deploy_internal_text_system_status_readme_progress_tmpl))
// ReadmeRejected is a template for system.status.readme
ReadmeRejected = template.Must(template.New("system_status_readme_rejected").
Parse(bundle.File_deploy_internal_text_system_status_readme_rejected_tmpl))
)
Functions ¶
func CheckWaitingFor ¶
CheckWaitingFor checks what the system deployment is waiting for in order to become ready in order to help the user troubleshoot common deployment issues.
func LoadSystemDefaults ¶
LoadSystemDefaults loads a noobaa system CR from bundled yamls and apply's changes from CLI flags to the defaults.
func RunOperatorCreate ¶
RunOperatorCreate creates the default system when the operator starts.
func RunReconcile ¶
RunReconcile runs a CLI command
Types ¶
type Client ¶
Client is the system client for making mgmt or s3 calls (with operator/admin credentials)
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
CoreVersion string
OperatorVersion string
NooBaa *nbv1.NooBaa
CoreApp *appsv1.StatefulSet
ServiceMgmt *corev1.Service
ServiceS3 *corev1.Service
SecretServer *corev1.Secret
SecretOp *corev1.Secret
SecretAdmin *corev1.Secret
CloudCreds *cloudcredsv1.CredentialsRequest
DefaultBackingStore *nbv1.BackingStore
DefaultBucketClass *nbv1.BucketClass
OBCStorageClass *storagev1.StorageClass
PrometheusRule *monitoringv1.PrometheusRule
ServiceMonitor *monitoringv1.ServiceMonitor
SystemInfo *nb.SystemInfo
CephObjectstoreUser *cephv1.CephObjectStoreUser
}
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 noobaa system
func (*Reconciler) CheckAll ¶
func (r *Reconciler) CheckAll()
CheckAll checks the state of all the objects controlled by the system
func (*Reconciler) CheckServiceStatus ¶
func (r *Reconciler) CheckServiceStatus(srv *corev1.Service, status *nbv1.ServiceStatus, portName string)
CheckServiceStatus populates the status of a service by detecting all of its addresses
func (*Reconciler) CheckSystemCR ¶
func (r *Reconciler) CheckSystemCR() error
CheckSystemCR checks the validity of the system CR (i.e system.metadata.name and system.spec.image) and updates the status accordingly
func (*Reconciler) Own ¶
func (r *Reconciler) Own(obj metav1.Object)
Own sets the object owner references to the noobaa system
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) ReconcileAWSCredentials ¶ added in v2.0.4
func (r *Reconciler) ReconcileAWSCredentials() error
ReconcileAWSCredentials creates a CredentialsRequest resource if cloud credentials operator is available
func (*Reconciler) ReconcileBackingStoreCredentials ¶ added in v2.0.4
func (r *Reconciler) ReconcileBackingStoreCredentials() error
ReconcileBackingStoreCredentials creates a CredentialsRequest resource if neccesary and returns the bucket name allowed for the credentials. nil is returned if cloud credentials are not supported
func (*Reconciler) ReconcileDefaultBackingStore ¶
func (r *Reconciler) ReconcileDefaultBackingStore() error
ReconcileDefaultBackingStore attempts to get credentials to cloud storage using the cloud-credentials operator and use it for the default backing store
func (*Reconciler) ReconcileDefaultBucketClass ¶
func (r *Reconciler) ReconcileDefaultBucketClass() error
ReconcileDefaultBucketClass creates the default bucket class
func (*Reconciler) ReconcileOBCStorageClass ¶
func (r *Reconciler) ReconcileOBCStorageClass() error
ReconcileOBCStorageClass reconciles default OBC storage class for the system
func (*Reconciler) ReconcileObject ¶
func (r *Reconciler) ReconcileObject(obj runtime.Object, desiredFunc func()) error
ReconcileObject is a generic call to reconcile a kubernetes object desiredFunc can be passed to modify the object before create/update. Currently we ignore enforcing a desired state, but it might be needed on upgrades.
func (*Reconciler) ReconcilePhaseConfiguring ¶
func (r *Reconciler) ReconcilePhaseConfiguring() error
ReconcilePhaseConfiguring runs the reconcile phase
func (*Reconciler) ReconcilePhaseConnecting ¶
func (r *Reconciler) ReconcilePhaseConnecting() error
ReconcilePhaseConnecting runs the reconcile phase
func (*Reconciler) ReconcilePhaseCreating ¶
func (r *Reconciler) ReconcilePhaseCreating() error
ReconcilePhaseCreating runs the reconcile phase
func (*Reconciler) ReconcilePhaseVerifying ¶
func (r *Reconciler) ReconcilePhaseVerifying() error
ReconcilePhaseVerifying runs the reconcile verify phase
func (*Reconciler) ReconcilePhases ¶
func (r *Reconciler) ReconcilePhases() error
ReconcilePhases runs the reconcile flow and populates System.Status.
func (*Reconciler) ReconcileRGWCredentials ¶ added in v2.0.4
func (r *Reconciler) ReconcileRGWCredentials() error
ReconcileRGWCredentials creates a ceph objectstore user if a ceph objectstore exists in the same namespace
func (*Reconciler) ReconcileSecretAdmin ¶
func (r *Reconciler) ReconcileSecretAdmin() error
ReconcileSecretAdmin creates the admin secret
func (*Reconciler) ReconcileSecretOp ¶
func (r *Reconciler) ReconcileSecretOp() error
ReconcileSecretOp creates a new system in the noobaa server if not created yet.
func (*Reconciler) ReconileReadSystem ¶ added in v2.0.2
func (r *Reconciler) ReconileReadSystem() error
ReconileReadSystem calls read_system on noobaa server and stores the result
func (*Reconciler) SetDesiredAgentProfile ¶
func (r *Reconciler) SetDesiredAgentProfile(profileString string) string
SetDesiredAgentProfile updates the value of the AGENT_PROFILE env
func (*Reconciler) SetDesiredCoreApp ¶
func (r *Reconciler) SetDesiredCoreApp()
SetDesiredCoreApp updates the CoreApp as desired for reconciling
func (*Reconciler) SetDesiredServiceMgmt ¶
func (r *Reconciler) SetDesiredServiceMgmt()
SetDesiredServiceMgmt updates the ServiceMgmt as desired for reconciling
func (*Reconciler) SetDesiredServiceS3 ¶
func (r *Reconciler) SetDesiredServiceS3()
SetDesiredServiceS3 updates the ServiceS3 as desired for reconciling
func (*Reconciler) SetPhase ¶
func (r *Reconciler) SetPhase(phase nbv1.SystemPhase, reason string, message string)
SetPhase updates the status phase and conditions
func (*Reconciler) SetReadme ¶
func (r *Reconciler) SetReadme(t *template.Template)
SetReadme runs the template and sets the readme
func (*Reconciler) UpdateStatus ¶
func (r *Reconciler) UpdateStatus()
UpdateStatus updates the system status in kubernetes from the memory