Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct{}
Cluster represents a single cluster definition inside a ConfigFile.
type ConfigFile ¶
type ConfigFile struct { Path string `yaml:"-"` APIVersion string `yaml:"apiVersion"` Kind string `yaml:"kind"` CurrentContext string `yaml:"current-context"` Clusters []Cluster `yaml:"clusters"` Contexts []Context `yaml:"contexts"` }
ConfigFile represents the content of a kubeconfig file. Additionally, this also holds the path of that file inside the Path field.
func FindAllFiles ¶
func LoadConfigFile ¶
LoadConfigFile tries to load a ConfigFile from the given path inside a filesystem.
func (*ConfigFile) HasContext ¶
func (c *ConfigFile) HasContext(name string) bool
HasContext checks all the contexts defined in the configfile for one with the given name.
type Context ¶
type Context struct {
Name string `yaml:"name"`
}
Context represents a single context definition inside a ConfigFile.
type Environment ¶
Environment is an abstraction to the environment settings that are supported by kubeselect.
func LoadEnvironment ¶
func LoadEnvironment(ctx context.Context, filesystem afero.Fs, environ []string) (*Environment, error)
Loads an environment based on the given slice of environment variables. Internally, this also does some validation for which filesystem access is required.