ccm

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package ccm implements a Kubernetes Cloud Controller Manager

Index

Constants

View Source
const (
	// ProviderName is the name used when registering ourselves
	// as cloud providers
	ProviderName = "darvaza"
)

Variables

This section is empty.

Functions

func NewCommand

func NewCommand() (*cobra.Command, error)

NewCommand creates a cobra.Command for the Cloud Controller Manager using the default options

Types

type Options

type Options struct {
	// contains filtered or unexported fields
}

Options describes the Cloud Controller Manager (CCM) we want to build

func NewOptions

func NewOptions() (*Options, error)

NewOptions create Options to build a Cloud Controller Manager instance

func (*Options) AddController

func (opts *Options) AddController(name, clientName string, f app.InitFuncConstructor, aliases ...string)

AddController adds a controller to the options

func (*Options) Cloud

func (opts *Options) Cloud() cloudprovider.Interface

Cloud returns the initialized cloud provider

func (*Options) FlagSet

func (opts *Options) FlagSet(name string) *pflag.FlagSet

FlagSet returns a cli flagset by name

func (*Options) FlagSets

func (opts *Options) FlagSets() *flag.NamedFlagSets

FlagSets returns the cli flags

func (*Options) NewCommand

func (opts *Options) NewCommand() (*cobra.Command, error)

NewCommand creates a cobra.Command based on the Options

func (*Options) RemoveController

func (opts *Options) RemoveController(name string)

RemoveController removes a controller from the options

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider is an instance of the cloud we implement

func (*Provider) Clusters

func (*Provider) Clusters() (cloudprovider.Clusters, bool)

Clusters returns a clusters interface. Also returns true if the interface is supported, false otherwise.

func (*Provider) HasClusterID

func (*Provider) HasClusterID() bool

HasClusterID returns true if a ClusterID is required and set

func (*Provider) Initialize

func (*Provider) Initialize(_ cloudprovider.ControllerClientBuilder, _ <-chan struct{})

Initialize provides the cloud with a kubernetes client builder and may spawn goroutines to perform housekeeping or run custom controllers specific to the cloud provider. Any tasks started here should be cleaned up when the stop channel closes.

func (*Provider) Instances

func (*Provider) Instances() (cloudprovider.Instances, bool)

Instances returns an instances interface. Also returns true if the interface is supported, false otherwise.

func (*Provider) InstancesV2

func (*Provider) InstancesV2() (cloudprovider.InstancesV2, bool)

InstancesV2 is an implementation for instances and should only be implemented by external cloud providers. Implementing InstancesV2 is behaviorally identical to Instances but is optimized to significantly reduce API calls to the cloud provider when registering and syncing nodes. Implementation of this interface will disable calls to the Zones interface. Also returns true if the interface is supported, false otherwise.

func (*Provider) LoadBalancer

func (*Provider) LoadBalancer() (cloudprovider.LoadBalancer, bool)

LoadBalancer returns a balancer interface. Also returns true if the interface is supported, false otherwise.

func (*Provider) ProviderName

func (*Provider) ProviderName() string

ProviderName returns the cloud provider ID.

func (*Provider) Routes

func (*Provider) Routes() (cloudprovider.Routes, bool)

Routes returns a routes interface along with whether the interface is supported.

func (*Provider) Zones

func (*Provider) Zones() (cloudprovider.Zones, bool)

Zones returns a zones interface. Also returns true if the interface is supported, false otherwise. DEPRECATED: Zones is deprecated in favor of retrieving zone/region information from InstancesV2. This interface will not be called if InstancesV2 is enabled.

Jump to

Keyboard shortcuts

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