cloudprovider

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitCloudProviderFlags

func InitCloudProviderFlags()

Types

type CloudProvider

type CloudProvider interface {
	Name() string
	ListPlugins() (map[string]Plugin, error)
}

type CloudProviderConfig

type CloudProviderConfig struct {
	KubernetesOptions   CloudProviderOptions
	AlibabaCloudOptions CloudProviderOptions
}

type CloudProviderOptions

type CloudProviderOptions interface {
	Enabled() bool
	Valid() bool
}

type ConfigFile

type ConfigFile struct {
	Path string
}

func NewConfigFile

func NewConfigFile(path string) *ConfigFile

func (*ConfigFile) Parse

func (cf *ConfigFile) Parse() *CloudProviderConfig

type Options

type Options struct {
	CloudProviderConfigFile string
}
var Opt *Options

type Plugin

type Plugin interface {
	Name() string
	// Alias define the plugin with similar func cross multi cloud provider
	Alias() string
	Init(client client.Client, options CloudProviderOptions, ctx context.Context) error
	// Pod Event handler
	OnPodAdded(client client.Client, pod *corev1.Pod, ctx context.Context) (*corev1.Pod, errors.PluginError)
	OnPodUpdated(client client.Client, pod *corev1.Pod, ctx context.Context) (*corev1.Pod, errors.PluginError)
	OnPodDeleted(client client.Client, pod *corev1.Pod, ctx context.Context) errors.PluginError
}

Directories

Path Synopsis
apis/v1beta1
Package v1beta1 Package v1 contains API Schema definitions for the alibabacloud v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=alibabacloud.com
Package v1beta1 Package v1 contains API Schema definitions for the alibabacloud v1beta1 API group +k8s:deepcopy-gen=package,register +groupName=alibabacloud.com

Jump to

Keyboard shortcuts

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