gce

package
v1.5.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2019 License: Apache-2.0 Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudConfig added in v1.1.6

type CloudConfig struct {
	Global GlobalOpts
}

CloudConfig contains only the section global.

func (*CloudConfig) AsString added in v1.1.6

func (cc *CloudConfig) AsString() (string, error)

AsString renders the cloud configuration as string.

type CloudProviderSpec added in v1.1.5

type CloudProviderSpec struct {
	ServiceAccount        providerconfig.ConfigVarString `json:"serviceAccount,omitempty"`
	Zone                  providerconfig.ConfigVarString `json:"zone"`
	MachineType           providerconfig.ConfigVarString `json:"machineType"`
	DiskSize              int64                          `json:"diskSize"`
	DiskType              providerconfig.ConfigVarString `json:"diskType"`
	Network               providerconfig.ConfigVarString `json:"network"`
	Subnetwork            providerconfig.ConfigVarString `json:"subnetwork"`
	Preemptible           providerconfig.ConfigVarBool   `json:"preemptible"`
	Labels                map[string]string              `json:"labels,omitempty"`
	Tags                  []string                       `json:"tags,omitempty"`
	AssignPublicIPAddress *providerconfig.ConfigVarBool  `json:"assignPublicIPAddress,omitempty"`
	MultiZone             providerconfig.ConfigVarBool   `json:"multizone"`
	Regional              providerconfig.ConfigVarBool   `json:"regional"`
}

CloudProviderSpec contains the specification of the cloud provider taken from the provider configuration.

type GlobalOpts added in v1.1.6

type GlobalOpts struct {
	ProjectID      string
	LocalZone      string
	NetworkName    string
	SubnetworkName string
	TokenURL       string
	MultiZone      bool
	Regional       bool
	NodeTags       []string
}

GlobalOpts contains the values of the global section of the cloud configuration.

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(spec v1alpha1.MachineSpec) (v1alpha1.MachineSpec, error)

AddDefaults reads the MachineSpec and applies defaults for provider specific fields

func (*Provider) Cleanup

func (p *Provider) Cleanup(machine *v1alpha1.Machine, data *cloudprovidertypes.ProviderData) (bool, error)

Cleanup deletes the instance associated with the machine and all associated resources.

func (*Provider) Create

func (p *Provider) Create(
	machine *v1alpha1.Machine,
	data *cloudprovidertypes.ProviderData,
	userdata string,
) (instance.Instance, error)

Create inserts a cloud instance according to the given machine.

func (*Provider) Get

Get retrieves a node instance that is associated with the given machine.

func (*Provider) GetCloudConfig

func (p *Provider) GetCloudConfig(spec v1alpha1.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 *v1alpha1.Machine) (map[string]string, error)

MachineMetricsLabels returns labels used for the Prometheus metrics about created machines.

func (*Provider) MigrateUID

func (p *Provider) MigrateUID(machine *v1alpha1.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(machines v1alpha1.MachineList) error

SetMetricsForMachines allows providers to provide provider-specific metrics.

func (*Provider) Validate

func (p *Provider) Validate(spec v1alpha1.MachineSpec) error

Validate checks the given machine's specification.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL