Documentation ¶
Index ¶
- func CheckErr(err error)
- func GetKubeBlocksDeploy(ctx context.Context, client *kubernetes.Clientset, ns string, ...) (*appsv1.Deployment, error)
- func Log(format string, a ...any)
- func PrepareFor(ctx *UpgradeContext) (err error)
- func RegisterCRDConversion(gvr schema.GroupVersionResource, newVersion Version, handler ConversionHandler, ...)
- type Addon
- type BasedHandler
- type CRClient
- type ContextHandler
- type ContextHandlerFunc
- type Conversion
- type ConversionHandler
- type ConversionMeta
- type StopOperator
- type UpdateCR
- type UpdateCRD
- type UpgradeContext
- type UpgradeMetaContext
- type Version
- type Workflow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKubeBlocksDeploy ¶
func GetKubeBlocksDeploy(ctx context.Context, client *kubernetes.Clientset, ns string, componentName string) (*appsv1.Deployment, error)
GetKubeBlocksDeploy gets deployment include KubeBlocks.
func PrepareFor ¶
func PrepareFor(ctx *UpgradeContext) (err error)
func RegisterCRDConversion ¶
func RegisterCRDConversion(gvr schema.GroupVersionResource, newVersion Version, handler ConversionHandler, oldVersions ...Version)
Types ¶
type Addon ¶
type Addon struct { BasedHandler KeepAddons bool }
func (*Addon) Handle ¶
func (p *Addon) Handle(ctx *UpgradeContext) (err error)
type BasedHandler ¶
type BasedHandler struct {
ContextHandler
}
func (*BasedHandler) IsSkip ¶
func (b *BasedHandler) IsSkip(*UpgradeContext) (bool, error)
type CRClient ¶
type CRClient struct { *dynamic.DynamicClient KBClient *versioned.Clientset K8sClient *kubernetes.Clientset CRDClient *clientset.Clientset }
type ContextHandler ¶
type ContextHandler interface { IsSkip(*UpgradeContext) (bool, error) Handle(*UpgradeContext) error }
ContextHandler is the interface for a "chunk" of reconciliation. It either returns, often by adjusting the current key's place in the queue (i.e. via requeue or done) or calls another handler in the chain.
type ContextHandlerFunc ¶
type ContextHandlerFunc func(ctx *UpgradeContext) error
ContextHandlerFunc is a function type that implements ContextHandler
func (ContextHandlerFunc) Handle ¶
func (f ContextHandlerFunc) Handle(ctx *UpgradeContext) error
type Conversion ¶
type Conversion struct {
BasedHandler
}
func (*Conversion) Handle ¶
func (p *Conversion) Handle(ctx *UpgradeContext) (err error)
type ConversionHandler ¶
type ConversionMeta ¶
type ConversionMeta struct { ConversionHandler FromVersion []Version ToVersion Version }
type StopOperator ¶
type StopOperator struct {
BasedHandler
}
func (*StopOperator) Handle ¶
func (p *StopOperator) Handle(ctx *UpgradeContext) error
type UpdateCR ¶
type UpdateCR struct {
BasedHandler
}
func (*UpdateCR) Handle ¶
func (u *UpdateCR) Handle(context *UpgradeContext) error
type UpdateCRD ¶
type UpdateCRD struct {
BasedHandler
}
func (*UpdateCRD) Handle ¶
func (p *UpdateCRD) Handle(ctx *UpgradeContext) (err error)
type UpgradeContext ¶
type UpgradeContext struct { UpgradeMetaContext From *Version To Version UpdatedObjects map[schema.GroupVersionResource][]client.Object }
func NewUpgradeContext ¶
func NewUpgradeContext(ctx context.Context, config *restclient.Config, version string, crd string, ns string) *UpgradeContext
type UpgradeMetaContext ¶
type Workflow ¶
type Workflow []ContextHandlerFunc
func NewUpgradeWorkflow ¶
func NewUpgradeWorkflow() Workflow
func (Workflow) AddStage ¶
func (w Workflow) AddStage(stage ContextHandler) Workflow
func (Workflow) Do ¶
func (w Workflow) Do(ctx *UpgradeContext) error
func (Workflow) WrapStage ¶
func (w Workflow) WrapStage(stageFn ContextHandlerFunc) Workflow
Source Files ¶
Click to show internal directories.
Click to hide internal directories.