provider

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: MPL-2.0 Imports: 12 Imported by: 0

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

View Source
const Name = "oxide"

Name is the name of this cloud provider.

Variables

This section is empty.

Functions

func InstanceIDFromProviderID

func InstanceIDFromProviderID(providerID string) (string, error)

InstanceIDFromProviderID extracts the Oxide instance ID from a provider ID.

func NewProviderID

func NewProviderID(instanceID string) string

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

func (i *InstancesV2) InstanceExists(ctx context.Context, node *v1.Node) (bool, error)

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

func (i *InstancesV2) InstanceShutdown(ctx context.Context, node *v1.Node) (bool, error)

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

func (o *Oxide) HasClusterID() bool

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

func (o *Oxide) ProviderName() string

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.

Jump to

Keyboard shortcuts

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