Documentation ¶
Index ¶
- Constants
- func Providers() []string
- func Register(name string, provider Provider)
- type ControllerProvider
- type DelegateProvider
- func (p *DelegateProvider) Name() string
- func (p *DelegateProvider) OnFilter(ctx context.Context, app *applicationv1.App) (pass bool)
- func (DelegateProvider) PostInstall(ctx context.Context, ...) error
- func (DelegateProvider) PostRollback(ctx context.Context, ...) error
- func (DelegateProvider) PostUninstall(ctx context.Context, ...) error
- func (DelegateProvider) PostUpgrade(ctx context.Context, ...) error
- func (DelegateProvider) PreInstall(ctx context.Context, ...) error
- func (DelegateProvider) PreRollback(ctx context.Context, ...) error
- func (DelegateProvider) PreUninstall(ctx context.Context, ...) error
- func (DelegateProvider) PreUpgrade(ctx context.Context, ...) error
- type HooksProvider
- type Provider
- type UpdateStatusFunc
Constants ¶
View Source
const AnnotationProviderNameKey = "application.tkestack.io/provider-name"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ControllerProvider ¶
type ControllerProvider interface {
OnFilter(ctx context.Context, app *applicationv1.App) bool
}
type DelegateProvider ¶
type DelegateProvider struct {
ProviderName string
}
func (*DelegateProvider) Name ¶
func (p *DelegateProvider) Name() string
func (*DelegateProvider) OnFilter ¶
func (p *DelegateProvider) OnFilter(ctx context.Context, app *applicationv1.App) (pass bool)
func (DelegateProvider) PostInstall ¶
func (DelegateProvider) PostInstall(ctx context.Context, applicationClient applicationversionedclient.ApplicationV1Interface, platformClient platformversionedclient.PlatformV1Interface, app *applicationv1.App, repo appconfig.RepoConfiguration, updateStatusFunc UpdateStatusFunc) error
func (DelegateProvider) PostRollback ¶
func (DelegateProvider) PostRollback(ctx context.Context, applicationClient applicationversionedclient.ApplicationV1Interface, platformClient platformversionedclient.PlatformV1Interface, app *applicationv1.App, repo appconfig.RepoConfiguration, updateStatusFunc UpdateStatusFunc) error
func (DelegateProvider) PostUninstall ¶
func (DelegateProvider) PostUninstall(ctx context.Context, applicationClient applicationversionedclient.ApplicationV1Interface, platformClient platformversionedclient.PlatformV1Interface, app *applicationv1.App, repo appconfig.RepoConfiguration) error
func (DelegateProvider) PostUpgrade ¶
func (DelegateProvider) PostUpgrade(ctx context.Context, applicationClient applicationversionedclient.ApplicationV1Interface, platformClient platformversionedclient.PlatformV1Interface, app *applicationv1.App, repo appconfig.RepoConfiguration, updateStatusFunc UpdateStatusFunc) error
func (DelegateProvider) PreInstall ¶
func (DelegateProvider) PreInstall(ctx context.Context, applicationClient applicationversionedclient.ApplicationV1Interface, platformClient platformversionedclient.PlatformV1Interface, app *applicationv1.App, repo appconfig.RepoConfiguration, updateStatusFunc UpdateStatusFunc) error
func (DelegateProvider) PreRollback ¶
func (DelegateProvider) PreRollback(ctx context.Context, applicationClient applicationversionedclient.ApplicationV1Interface, platformClient platformversionedclient.PlatformV1Interface, app *applicationv1.App, repo appconfig.RepoConfiguration, updateStatusFunc UpdateStatusFunc) error
func (DelegateProvider) PreUninstall ¶
func (DelegateProvider) PreUninstall(ctx context.Context, applicationClient applicationversionedclient.ApplicationV1Interface, platformClient platformversionedclient.PlatformV1Interface, app *applicationv1.App, repo appconfig.RepoConfiguration) error
func (DelegateProvider) PreUpgrade ¶
func (DelegateProvider) PreUpgrade(ctx context.Context, applicationClient applicationversionedclient.ApplicationV1Interface, platformClient platformversionedclient.PlatformV1Interface, app *applicationv1.App, repo appconfig.RepoConfiguration, updateStatusFunc UpdateStatusFunc) error
type HooksProvider ¶
type HooksProvider interface { PreInstall(ctx context.Context, applicationClient applicationversionedclient.ApplicationV1Interface, platformClient platformversionedclient.PlatformV1Interface, app *applicationv1.App, repo appconfig.RepoConfiguration, updateStatusFunc UpdateStatusFunc) error PostInstall(ctx context.Context, applicationClient applicationversionedclient.ApplicationV1Interface, platformClient platformversionedclient.PlatformV1Interface, app *applicationv1.App, repo appconfig.RepoConfiguration, updateStatusFunc UpdateStatusFunc) error PreUpgrade(ctx context.Context, applicationClient applicationversionedclient.ApplicationV1Interface, platformClient platformversionedclient.PlatformV1Interface, app *applicationv1.App, repo appconfig.RepoConfiguration, updateStatusFunc UpdateStatusFunc) error PostUpgrade(ctx context.Context, applicationClient applicationversionedclient.ApplicationV1Interface, platformClient platformversionedclient.PlatformV1Interface, app *applicationv1.App, repo appconfig.RepoConfiguration, updateStatusFunc UpdateStatusFunc) error PreRollback(ctx context.Context, applicationClient applicationversionedclient.ApplicationV1Interface, platformClient platformversionedclient.PlatformV1Interface, app *applicationv1.App, repo appconfig.RepoConfiguration, updateStatusFunc UpdateStatusFunc) error PostRollback(ctx context.Context, applicationClient applicationversionedclient.ApplicationV1Interface, platformClient platformversionedclient.PlatformV1Interface, app *applicationv1.App, repo appconfig.RepoConfiguration, updateStatusFunc UpdateStatusFunc) error PreUninstall(ctx context.Context, applicationClient applicationversionedclient.ApplicationV1Interface, platformClient platformversionedclient.PlatformV1Interface, app *applicationv1.App, repo appconfig.RepoConfiguration) error PostUninstall(ctx context.Context, applicationClient applicationversionedclient.ApplicationV1Interface, platformClient platformversionedclient.PlatformV1Interface, app *applicationv1.App, repo appconfig.RepoConfiguration) error }
type Provider ¶
type Provider interface { Name() string ControllerProvider HooksProvider }
Provider defines a set of response interfaces for specific cluster types in cluster management.
func GetProvider ¶
func GetProvider(app *applicationv1.App) (Provider, error)
GetProvider will get your provider with the application, set an annotation with key, application.tkestack.io/provider-name, and value, the provider will work for your application.
type UpdateStatusFunc ¶
type UpdateStatusFunc func(ctx context.Context, app *applicationv1.App, previousStatus, newStatus *applicationv1.AppStatus) (*applicationv1.App, error)
Click to show internal directories.
Click to hide internal directories.