Documentation ¶
Index ¶
- type Provider
- func (p *Provider) AddDefaults(_ *zap.SugaredLogger, spec clusterv1alpha1.MachineSpec) (clusterv1alpha1.MachineSpec, error)
- func (p *Provider) Cleanup(ctx context.Context, _ *zap.SugaredLogger, machine *clusterv1alpha1.Machine, ...) (bool, error)
- func (p *Provider) Create(ctx context.Context, log *zap.SugaredLogger, machine *clusterv1alpha1.Machine, ...) (instance.Instance, error)
- func (p *Provider) Get(ctx context.Context, _ *zap.SugaredLogger, machine *clusterv1alpha1.Machine, ...) (instance.Instance, error)
- func (p *Provider) GetCloudConfig(spec clusterv1alpha1.MachineSpec) (config string, name string, err error)
- func (p *Provider) MachineMetricsLabels(machine *clusterv1alpha1.Machine) (map[string]string, error)
- func (p *Provider) MigrateUID(ctx context.Context, _ *zap.SugaredLogger, machine *clusterv1alpha1.Machine, ...) error
- func (p *Provider) SetMetricsForMachines(_ clusterv1alpha1.MachineList) error
- func (p *Provider) Validate(_ context.Context, _ *zap.SugaredLogger, spec clusterv1alpha1.MachineSpec) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements the cloud.Provider interface for the Google Cloud Platform.
func New ¶
func New(configVarResolver *providerconfig.ConfigVarResolver) *Provider
New creates a cloud provider instance for the Google Cloud Platform.
func (*Provider) AddDefaults ¶
func (p *Provider) AddDefaults(_ *zap.SugaredLogger, spec clusterv1alpha1.MachineSpec) (clusterv1alpha1.MachineSpec, error)
AddDefaults reads the MachineSpec and applies defaults for provider specific fields.
func (*Provider) Cleanup ¶
func (p *Provider) Cleanup(ctx context.Context, _ *zap.SugaredLogger, machine *clusterv1alpha1.Machine, _ *cloudprovidertypes.ProviderData) (bool, error)
Cleanup deletes the instance associated with the machine and all associated resources.
func (*Provider) Create ¶
func (p *Provider) Create(ctx context.Context, log *zap.SugaredLogger, machine *clusterv1alpha1.Machine, data *cloudprovidertypes.ProviderData, userdata string) (instance.Instance, error)
Create inserts a cloud instance according to the given machine.
func (*Provider) Get ¶
func (p *Provider) Get(ctx context.Context, _ *zap.SugaredLogger, machine *clusterv1alpha1.Machine, _ *cloudprovidertypes.ProviderData) (instance.Instance, error)
Get retrieves a node instance that is associated with the given machine.
func (*Provider) GetCloudConfig ¶
func (p *Provider) GetCloudConfig(spec clusterv1alpha1.MachineSpec) (config string, name string, err error)
GetCloudConfig returns the cloud provider specific cloud-config for the kubelet.
func (*Provider) MachineMetricsLabels ¶
func (p *Provider) MachineMetricsLabels(machine *clusterv1alpha1.Machine) (map[string]string, error)
MachineMetricsLabels returns labels used for the Prometheus metrics about created machines.
func (*Provider) MigrateUID ¶
func (p *Provider) MigrateUID(ctx context.Context, _ *zap.SugaredLogger, machine *clusterv1alpha1.Machine, newUID types.UID) error
MigrateUID updates the UID of an instance after the controller migrates types and the UID of the machine object changed.
func (*Provider) SetMetricsForMachines ¶
func (p *Provider) SetMetricsForMachines(_ clusterv1alpha1.MachineList) error
SetMetricsForMachines allows providers to provide provider-specific metrics.
func (*Provider) Validate ¶
func (p *Provider) Validate(_ context.Context, _ *zap.SugaredLogger, spec clusterv1alpha1.MachineSpec) error
Validate checks the given machine's specification.