provider

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Provider   Type              `json:"provider"`
	InCluster  incluster.Config  `json:"incluster"`
	Kubeconfig kubeconfig.Config `json:"kubeconfig"`
}

Config is the provider configuration to get Kubernetes clusters from. The provider configuration only contains the provider type and a provider specific configuration.

type Provider

type Provider interface {
	GetClusters() ([]cluster.Client, error)
}

Provider is the interface, which must be implemented by our cluster provider.

func New

func New(config *Config) Provider

New returns a new provider, which can be used to load all Kubernetes clusters with the given configuration.

type Type

type Type string

Type is the type of the cluster provider. At the moment it is only possible to load clusters via the incluster configuration or a Kubeconfig file. It is planed to implement support GKE, EKS and AKS later, so that all clusters can be automatically added from a cloud provider.

const (
	// INCLUSTER is the type of the cluster provider, when kobs should be used for the cluster where it is running in.
	INCLUSTER Type = "incluster"
	// KUBECONFIG is the type of the cluster provider, when kobs should be used for all clusters in a given Kubeconfig
	// file.
	KUBECONFIG Type = "kubeconfig"
	// SATELLITE is the type of the cluster provider, kobs should be used with a config from a kobs satellite.
	SATELLITE Type = "satellites"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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