Documentation ¶
Index ¶
- Constants
- Variables
- func NewDoguAdditionalIngressAnnotationsManager(client client.Client, eventRecorder record.EventRecorder) *doguAdditionalIngressAnnotationsManager
- func NewDoguDeleteManager(client client.Client, operatorConfig *config.OperatorConfig, ...) *doguDeleteManager
- func NewDoguInstallManager(client client.Client, cesRegistry cesregistry.Registry, ...) *doguInstallManager
- func NewDoguReconciler(client client.Client, doguInterface ecoSystem.DoguInterface, ...) (*doguReconciler, error)
- func NewDoguRequeueHandler(doguInterface ecoSystem.DoguInterface, recorder record.EventRecorder, ...) (*doguRequeueHandler, error)
- func NewDoguSupportManager(client client.Client, mgrSet *util.ManagerSet, ...) *doguSupportManager
- func NewDoguUpgradeManager(client client.Client, mgrSet *util.ManagerSet, ...) *doguUpgradeManager
- func NewDoguVolumeManager(client client.Client, eventRecorder record.EventRecorder) *doguVolumeManager
- type DeploymentReconciler
- type DoguManager
- func (m *DoguManager) CheckStarted(ctx context.Context, doguResource *k8sv1.Dogu) error
- func (m *DoguManager) CheckStopped(ctx context.Context, doguResource *k8sv1.Dogu) error
- func (m *DoguManager) Delete(ctx context.Context, doguResource *k8sv1.Dogu) error
- func (m *DoguManager) HandleSupportMode(ctx context.Context, doguResource *k8sv1.Dogu) (bool, error)
- func (m *DoguManager) Install(ctx context.Context, doguResource *k8sv1.Dogu) error
- func (m *DoguManager) SetDoguAdditionalIngressAnnotations(ctx context.Context, doguResource *k8sv1.Dogu) error
- func (m *DoguManager) SetDoguDataVolumeSize(ctx context.Context, doguResource *k8sv1.Dogu) error
- func (m *DoguManager) StartDogu(ctx context.Context, doguResource *k8sv1.Dogu) error
- func (m *DoguManager) StopDogu(ctx context.Context, doguResource *k8sv1.Dogu) error
- func (m *DoguManager) Upgrade(ctx context.Context, doguResource *k8sv1.Dogu) error
- type DoguRestartGarbageCollector
- type DoguRestartReconciler
- type RestartOperation
Constants ¶
const ( // AdditionalIngressAnnotationsChangeEventReason is the reason string for firing additional ingress annotations change events. AdditionalIngressAnnotationsChangeEventReason = "AdditionalIngressAnnotationsChange" // ErrorOnAdditionalIngressAnnotationsChangeEventReason is the error string for firing additional ingress annotations change error events. ErrorOnAdditionalIngressAnnotationsChangeEventReason = "ErrAdditionalIngressAnnotationsChange" )
const ( // StartDoguEventReason is the reason string for firing start dogu events. StartDoguEventReason = "StartDogu" // ErrorOnStartDoguEventReason is the error string for firing start dogu error events. ErrorOnStartDoguEventReason = "ErrStartDogu" // StopDoguEventReason is the reason string for firing stop dogu events. StopDoguEventReason = "StopDogu" // ErrorOnStopDoguEventReason is the error string for firing stop dogu error events. ErrorOnStopDoguEventReason = "ErrStopDogu" CheckStartedEventReason = "CheckStarted" ErrorOnCheckStartedEventReason = "ErrCheckStarted" CheckStoppedEventReason = "CheckStopped" ErrorOnCheckStoppedEventReason = "ErrCheckStopped" )
const ( // VolumeExpansionEventReason is the reason string for firing volume expansion events. VolumeExpansionEventReason = "VolumeExpansion" // ErrorOnVolumeExpansionEventReason is the error string for firing volume expansion error events. ErrorOnVolumeExpansionEventReason = "ErrVolumeExpansion" )
const ( InstallEventReason = "Installation" ErrorOnInstallEventReason = "ErrInstallation" )
const ( DeinstallEventReason = "Deinstallation" ErrorDeinstallEventReason = "ErrDeinstallation" )
const ( SupportEventReason = "Support" ErrorOnSupportEventReason = "ErrSupport" )
const ( RequeueEventReason = "Requeue" ErrorOnRequeueEventReason = "ErrRequeue" )
const ( FailedNameValidationEventReason = "FailedNameValidation" FailedVolumeSizeParsingValidationEventReason = "FailedVolumeSizeParsingValidation" FailedVolumeSizeSIValidationEventReason = "FailedVolumeSizeSIValidation" )
const ( Install = operation("Install") Upgrade = operation("Upgrade") Delete = operation("Delete") Wait = operation("Wait") ExpandVolume = operation("ExpandVolume") ChangeAdditionalIngressAnnotations = operation("ChangeAdditionalIngressAnnotations") StartDogu = operation("StartDogu") StopDogu = operation("StopDogu") CheckStarted = operation("CheckStarted") CheckStopped = operation("CheckStopped") )
const SupportModeEnvVar = "SUPPORT_MODE"
Variables ¶
var NewManager = NewDoguManager
NewManager is an alias mainly used for testing the main package
Functions ¶
func NewDoguAdditionalIngressAnnotationsManager ¶ added in v0.29.0
func NewDoguAdditionalIngressAnnotationsManager(client client.Client, eventRecorder record.EventRecorder) *doguAdditionalIngressAnnotationsManager
NewDoguAdditionalIngressAnnotationsManager creates a new instance of a manager to append ingress annotations to a dogu service.
func NewDoguDeleteManager ¶ added in v0.9.0
func NewDoguDeleteManager( client client.Client, operatorConfig *config.OperatorConfig, cesRegistry cesregistry.Registry, mgrSet *util.ManagerSet, recorder record.EventRecorder, ) *doguDeleteManager
NewDoguDeleteManager creates a new instance of doguDeleteManager.
func NewDoguInstallManager ¶ added in v0.9.0
func NewDoguInstallManager(client client.Client, cesRegistry cesregistry.Registry, mgrSet *util.ManagerSet, eventRecorder record.EventRecorder) *doguInstallManager
NewDoguInstallManager creates a new instance of doguInstallManager.
func NewDoguReconciler ¶
func NewDoguReconciler(client client.Client, doguInterface ecoSystem.DoguInterface, doguManager cloudogu.DoguManager, eventRecorder record.EventRecorder, namespace string, localDoguRegistry local.LocalDoguRegistry) (*doguReconciler, error)
NewDoguReconciler creates a new reconciler instance for the dogu resource
func NewDoguRequeueHandler ¶ added in v0.3.0
func NewDoguRequeueHandler(doguInterface ecoSystem.DoguInterface, recorder record.EventRecorder, namespace string) (*doguRequeueHandler, error)
NewDoguRequeueHandler creates a new dogu requeue handler.
func NewDoguSupportManager ¶ added in v0.13.0
func NewDoguSupportManager(client client.Client, mgrSet *util.ManagerSet, eventRecorder record.EventRecorder) *doguSupportManager
NewDoguSupportManager creates a new instance of doguSupportManager.
func NewDoguUpgradeManager ¶ added in v0.12.0
func NewDoguUpgradeManager(client client.Client, mgrSet *util.ManagerSet, eventRecorder record.EventRecorder) *doguUpgradeManager
NewDoguUpgradeManager creates a new instance of doguUpgradeManager which handles dogu upgrades.
func NewDoguVolumeManager ¶ added in v0.19.0
func NewDoguVolumeManager(client client.Client, eventRecorder record.EventRecorder) *doguVolumeManager
NewDoguVolumeManager creates a new instance of the doguVolumeManager.
Types ¶
type DeploymentReconciler ¶ added in v0.40.0
type DeploymentReconciler struct {
// contains filtered or unexported fields
}
DeploymentReconciler watches every Deployment object in the cluster and writes the state of dogus into their respective custom resources.
func NewDeploymentReconciler ¶ added in v0.40.0
func NewDeploymentReconciler(k8sClientSet thirdParty.ClientSet, availabilityChecker *health.AvailabilityChecker, doguHealthStatusUpdater cloudogu.DoguHealthStatusUpdater, localDoguRegistry *local.CombinedLocalDoguRegistry) *DeploymentReconciler
func (*DeploymentReconciler) Reconcile ¶ added in v0.40.0
func (dr *DeploymentReconciler) Reconcile(ctx context.Context, request 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.
func (*DeploymentReconciler) SetupWithManager ¶ added in v0.40.0
func (dr *DeploymentReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type DoguManager ¶
type DoguManager struct {
// contains filtered or unexported fields
}
DoguManager is a central unit in the process of handling dogu custom resources The DoguManager creates, updates and deletes dogus
func NewDoguManager ¶
func NewDoguManager(client client.Client, ecosystemClient ecoSystem.EcoSystemV1Alpha1Interface, operatorConfig *config.OperatorConfig, cesRegistry cesregistry.Registry, eventRecorder record.EventRecorder) (*DoguManager, error)
NewDoguManager creates a new instance of DoguManager
func (*DoguManager) CheckStarted ¶ added in v1.0.0
func (*DoguManager) CheckStopped ¶ added in v1.0.0
func (*DoguManager) HandleSupportMode ¶ added in v0.13.0
func (m *DoguManager) HandleSupportMode(ctx context.Context, doguResource *k8sv1.Dogu) (bool, error)
HandleSupportMode handles the support flag in the dogu spec.
func (*DoguManager) SetDoguAdditionalIngressAnnotations ¶ added in v0.29.0
func (m *DoguManager) SetDoguAdditionalIngressAnnotations(ctx context.Context, doguResource *k8sv1.Dogu) error
SetDoguAdditionalIngressAnnotations edits the additional ingress annotations in the given dogu's service.
func (*DoguManager) SetDoguDataVolumeSize ¶ added in v0.19.0
SetDoguDataVolumeSize sets the dataVolumeSize from the dogu resource to the data PVC from the dogu.
type DoguRestartGarbageCollector ¶ added in v1.0.0
type DoguRestartReconciler ¶ added in v1.0.0
type DoguRestartReconciler struct {
// contains filtered or unexported fields
}
DoguRestartReconciler reconciles a DoguRestart object
func NewDoguRestartReconciler ¶ added in v1.0.0
func NewDoguRestartReconciler(doguRestartInterface ecoSystem.DoguRestartInterface, doguInterface ecoSystem.DoguInterface, recorder record.EventRecorder, gc DoguRestartGarbageCollector) *DoguRestartReconciler
func (*DoguRestartReconciler) Reconcile ¶ added in v1.0.0
func (r *DoguRestartReconciler) 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.14.4/pkg/reconcile
func (*DoguRestartReconciler) SetupWithManager ¶ added in v1.0.0
func (r *DoguRestartReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type RestartOperation ¶ added in v1.0.0
type RestartOperation string
func RestartOperationFromRestartStatusPhase ¶ added in v1.0.0
func RestartOperationFromRestartStatusPhase(phase k8sv1.RestartStatusPhase) RestartOperation
Source Files ¶
- additionalImages.go
- deploymentController.go
- doguDeleteManager.go
- doguIngressAnnotationsManager.go
- doguInstallManager.go
- doguStartStopManager.go
- doguSupportManager.go
- doguUpgradeManager.go
- doguVolumeManager.go
- dogu_controller.go
- dogu_manager.go
- dogu_requeue_handler.go
- dogurestart_controller.go
- restartInstruction.go
- upgradeabilityChecker.go