Documentation
¶
Overview ¶
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
Index ¶
- Constants
- func InstanceIDFromProviderID(providerID string) (string, error)
- func NewProviderID(instanceID string) string
- type InstancesV2
- type Oxide
- func (o *Oxide) Clusters() (cloudprovider.Clusters, bool)
- func (o *Oxide) HasClusterID() bool
- func (o *Oxide) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{})
- func (o *Oxide) Instances() (cloudprovider.Instances, bool)
- func (o *Oxide) InstancesV2() (cloudprovider.InstancesV2, bool)
- func (o *Oxide) LoadBalancer() (cloudprovider.LoadBalancer, bool)
- func (o *Oxide) ProviderName() string
- func (o *Oxide) Routes() (cloudprovider.Routes, bool)
- func (o *Oxide) Zones() (cloudprovider.Zones, bool)
Constants ¶
const Name = "oxide"
Name is the name of this cloud provider.
Variables ¶
This section is empty.
Functions ¶
func InstanceIDFromProviderID ¶
InstanceIDFromProviderID extracts the Oxide instance ID from a provider ID.
func NewProviderID ¶
NewProviderID formats an Oxide instance ID as a provider ID.
Types ¶
type InstancesV2 ¶
type InstancesV2 struct {
// contains filtered or unexported fields
}
InstancesV2 implements cloudprovider.InstancesV2 to provide Oxide specific instance functionality.
func (*InstancesV2) InstanceExists ¶
InstanceExists checks whether the provided Kubernetes node exists as instance in Oxide.
func (*InstancesV2) InstanceMetadata ¶
func (i *InstancesV2) InstanceMetadata(ctx context.Context, node *v1.Node) (*cloudprovider.InstanceMetadata, error)
InstanceMetadata populates the metadata for the provided node, notably setting its provider ID.
func (*InstancesV2) InstanceShutdown ¶
InstanceShutdown checks whether the provided node is shut down in Oxide.
type Oxide ¶
type Oxide struct {
// contains filtered or unexported fields
}
Oxide is the Oxide cloud provider. It implements cloudprovider.Interface to provide Oxide specific functionality.
func (*Oxide) Clusters ¶
func (o *Oxide) Clusters() (cloudprovider.Clusters, bool)
Clusters is purposefully unimplemented. This is meant for a single Cloud Controller Manager to manage multiple Kubernetes clusters but the modern idiom is to run a single Cloud Controller Manager per Kubernetes cluster, making this irrelevant.
func (*Oxide) HasClusterID ¶
HasClusterID is purposefully unimplemented. A cluster ID is used to uniquely identify resources for a specific Kubernetes cluster when multiple Kubernetes clusters can conflict with each other when using shared resources (e.g., VPC, load balancer). Usually, such resources are tagged or labeled with the cluster ID but Oxide does not have resource tags or labels. Additionally, it's expected that a Kubernetes cluster on Oxide is deployed in its own VPC and does not share resources with other Kubernetes clusters. This may become supported in the future when Oxide has resource tags or labels.
func (*Oxide) Initialize ¶
func (o *Oxide) Initialize(clientBuilder cloudprovider.ControllerClientBuilder, stop <-chan struct{})
Initialize creates the Oxide and Kubernetes clients and spawns any additional controllers, if necessary.
func (*Oxide) Instances ¶
func (o *Oxide) Instances() (cloudprovider.Instances, bool)
Instances is purposefully unimplemented. Use Oxide.InstancesV2.
func (*Oxide) InstancesV2 ¶
func (o *Oxide) InstancesV2() (cloudprovider.InstancesV2, bool)
InstancesV2 returns an implementation of cloudprovider.InstancesV2 that provides functionality to initialize Kubernetes nodes, provide their metadata, and determine whether they exists to facilitate cleanup.
func (*Oxide) LoadBalancer ¶
func (o *Oxide) LoadBalancer() (cloudprovider.LoadBalancer, bool)
LoadBalancer is currently unimplemented. This may be implemented in the future.
func (*Oxide) ProviderName ¶
ProviderName returns the name of this cloud provider.
func (*Oxide) Routes ¶
func (o *Oxide) Routes() (cloudprovider.Routes, bool)
Routes is purposefully unimplemented. It is expected that the Kubernetes cluster uses a third-party CNI instead of this controller. This may be implemented in the future.
func (*Oxide) Zones ¶
func (o *Oxide) Zones() (cloudprovider.Zones, bool)
Zones is purposefully unimplemented. Zone and region information is retrieved from InstancesV2.InstanceMetadata instead.