provider

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

README

Follow these steps to be accepted as a provider within the Virtual Kubelet repo.

  1. Replicate the life-cycle of a pod for example creation and deletion of a pod and how that maps to your service.
  2. Create a new provider folder with a descriptive name and the necessary code.
  3. When committing your code add a README.md, helm chart, dockerfile and specify a maintainer of the provider.
  4. Within the PR itself add a justification for why the provider should be accepted, as well as customer use cases if applicable.

Some providers are translations of Virtual Kubelet to allow others to adapt their service or applications that are written in other languages.

Documentation

Index

Constants

View Source
const (
	// OperatingSystemLinux is the configuration value for defining Linux.
	OperatingSystemLinux = "linux"
	// OperatingSystemWindows is the configuration value for defining Windows.
	OperatingSystemWindows = "windows"
)

Variables

View Source
var (
	// ValidOperatingSystems defines the group of operating systems
	// that can be used as a kubelet node.
	ValidOperatingSystems = OperatingSystems{
		OperatingSystemLinux:   true,
		OperatingSystemWindows: true,
	}
)

Functions

This section is empty.

Types

type InitConfig

type InitConfig struct {
	ConfigPath        string
	NodeName          string
	OperatingSystem   string
	InternalIP        string
	DaemonPort        int32
	KubeClusterDomain string
	ResourceManager   *manager.ResourceManager
}

InitConfig is the config passed to initialize a registered provider.

type InitFunc

type InitFunc func(InitConfig) (Provider, error) //nolint:golint

type OperatingSystems

type OperatingSystems map[string]bool //nolint:golint

func (OperatingSystems) Names

func (o OperatingSystems) Names() []string

type Provider

type Provider interface {
	nodeutil.Provider
	// ConfigureNode enables a provider to configure the node object that
	// will be used for Kubernetes.
	ConfigureNode(context.Context, *v1.Node)
}

Provider wraps the core provider type with an extra function needed to bootstrap the node

type Store

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

Store is used for registering/fetching providers

func NewStore

func NewStore() *Store

func (*Store) Exists

func (s *Store) Exists(name string) bool

Exists returns if there is an init function registered under the provided name

func (*Store) Get

func (s *Store) Get(name string) InitFunc

Get gets the registered init func for the given name The returned function may be nil if the given name is not registered.

func (*Store) List

func (s *Store) List() []string

List lists all the registered providers

func (*Store) Register

func (s *Store) Register(name string, f InitFunc) error

Register registers a providers init func by name

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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