Documentation ¶
Index ¶
- func NewDriver() types.Driver
- func TickerContext(ctx context.Context, duration time.Duration) <-chan time.Time
- type Driver
- func (d *Driver) Create(ctx context.Context, opts *types.DriverOptions, _ *types.ClusterInfo) (*types.ClusterInfo, error)
- func (d *Driver) ETCDRestore(ctx context.Context, info *types.ClusterInfo, opts *types.DriverOptions, ...) error
- func (d *Driver) ETCDSave(ctx context.Context, info *types.ClusterInfo, opts *types.DriverOptions, ...) error
- func (d *Driver) GetCapabilities(ctx context.Context) (*types.Capabilities, error)
- func (d *Driver) GetClusterSize(ctx context.Context, info *types.ClusterInfo) (*types.NodeCount, error)
- func (d *Driver) GetDriverCreateOptions(ctx context.Context) (*types.DriverFlags, error)
- func (d *Driver) GetDriverUpdateOptions(ctx context.Context) (*types.DriverFlags, error)
- func (d *Driver) GetK8SCapabilities(ctx context.Context, opts *types.DriverOptions) (*types.K8SCapabilities, error)
- func (d *Driver) GetVersion(ctx context.Context, info *types.ClusterInfo) (*types.KubernetesVersion, error)
- func (d *Driver) PostCheck(ctx context.Context, info *types.ClusterInfo) (*types.ClusterInfo, error)
- func (d *Driver) Remove(ctx context.Context, info *types.ClusterInfo) error
- func (d *Driver) RemoveLegacyServiceAccount(ctx context.Context, info *types.ClusterInfo) error
- func (d *Driver) SetClusterSize(ctx context.Context, info *types.ClusterInfo, count *types.NodeCount) error
- func (d *Driver) SetVersion(ctx context.Context, info *types.ClusterInfo, version *types.KubernetesVersion) error
- func (d *Driver) Update(ctx context.Context, info *types.ClusterInfo, opts *types.DriverOptions) (*types.ClusterInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver defines the struct of tke driver
func (*Driver) Create ¶
func (d *Driver) Create(ctx context.Context, opts *types.DriverOptions, _ *types.ClusterInfo) (*types.ClusterInfo, error)
Create implements driver create interface
func (*Driver) ETCDRestore ¶ added in v0.2.1
func (d *Driver) ETCDRestore(ctx context.Context, info *types.ClusterInfo, opts *types.DriverOptions, snapshotName string) error
ETCDRestore will restore etcd snapshot from s3 server
func (*Driver) ETCDSave ¶ added in v0.2.1
func (d *Driver) ETCDSave(ctx context.Context, info *types.ClusterInfo, opts *types.DriverOptions, snapshotName string) error
ETCDSave will backup etcd snapshot to s3 server
func (*Driver) GetCapabilities ¶
GetCapabilities implements driver get capabilities interface
func (*Driver) GetClusterSize ¶
func (d *Driver) GetClusterSize(ctx context.Context, info *types.ClusterInfo) (*types.NodeCount, error)
GetClusterSize implements driver get cluster size interface
func (*Driver) GetDriverCreateOptions ¶
GetDriverCreateOptions implements driver interface
func (*Driver) GetDriverUpdateOptions ¶
GetDriverUpdateOptions implements driver interface
func (*Driver) GetK8SCapabilities ¶ added in v0.2.0
func (d *Driver) GetK8SCapabilities(ctx context.Context, opts *types.DriverOptions) (*types.K8SCapabilities, error)
GetK8SCapabilities defines TKE k8s capabilities
func (*Driver) GetVersion ¶
func (d *Driver) GetVersion(ctx context.Context, info *types.ClusterInfo) (*types.KubernetesVersion, error)
GetVersion implements driver get cluster kubernetes version interface
func (*Driver) PostCheck ¶
func (d *Driver) PostCheck(ctx context.Context, info *types.ClusterInfo) (*types.ClusterInfo, error)
PostCheck implements driver postCheck interface
func (*Driver) RemoveLegacyServiceAccount ¶ added in v0.2.1
RemoveLegacyServiceAccount remove any old service accounts that the driver has created
func (*Driver) SetClusterSize ¶
func (d *Driver) SetClusterSize(ctx context.Context, info *types.ClusterInfo, count *types.NodeCount) error
SetClusterSize implements driver set cluster size interface
func (*Driver) SetVersion ¶
func (d *Driver) SetVersion(ctx context.Context, info *types.ClusterInfo, version *types.KubernetesVersion) error
SetVersion implements driver set cluster kubernetes version interface
func (*Driver) Update ¶
func (d *Driver) Update(ctx context.Context, info *types.ClusterInfo, opts *types.DriverOptions) (*types.ClusterInfo, error)
Update implements driver update interface