provider

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClusters

func GetClusters(config *Config) ([]*cluster.Cluster, error)

GetClusters returns all clusters for the given provider. When the provider field doesn't match our custom Type, we only log a warning instead of throwing an error. This allows kobs to start also, when one provided provider is invalid.

Types

type Config

type Config struct {
	Provider   Type              `yaml:"provider"`
	InCluster  incluster.Config  `yaml:"incluster"`
	Kubeconfig kubeconfig.Config `yaml:"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 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"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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