Documentation
¶
Index ¶
- func IsExecutionError(err error) bool
- func IsInvalidConfigError(err error) bool
- func IsNotFoundError(err error) bool
- func NewKubeConfigForRESTConfig(ctx context.Context, config *rest.Config, clusterName, namespace string) ([]byte, error)
- func NewRESTConfigForKubeConfig(ctx context.Context, kubeConfig []byte) (*rest.Config, error)
- type Config
- type Interface
- type KubeConfig
- type KubeConfigValue
- type KubeconfigAuthProvider
- type KubeconfigCluster
- type KubeconfigContext
- type KubeconfigNamedCluster
- type KubeconfigNamedContext
- type KubeconfigUser
- type KubeconfigUserKeyPair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsExecutionError ¶
IsExecutionError asserts executionError.
func IsInvalidConfigError ¶
IsInvalidConfigError asserts invalidConfigError.
Types ¶
type Config ¶
type Config struct {
Logger micrologger.Logger
K8sClient kubernetes.Interface
}
Config represents the configuration used to create a new kubeconfig library instance.
type KubeConfig ¶
type KubeConfig struct {
// contains filtered or unexported fields
}
KubeConfig provides functionality for connecting to remote clusters based on the specified kubeconfig.
func (*KubeConfig) NewRESTConfigForApp ¶
func (k *KubeConfig) NewRESTConfigForApp(ctx context.Context, app v1alpha1.App) (*rest.Config, error)
NewRESTConfigForApp returns a Kubernetes REST config for the cluster configured in the kubeconfig section of the app CR.
type KubeConfigValue ¶
type KubeConfigValue struct {
APIVersion string `yaml:"apiVersion"`
Kind string `yaml:"kind"`
Clusters []KubeconfigNamedCluster `yaml:"clusters"`
Users []KubeconfigUser `yaml:"users"`
Contexts []KubeconfigNamedContext `yaml:"contexts"`
CurrentContext string `yaml:"current-context"`
Preferences struct{} `yaml:"preferences"`
}
KubeConfigValue is a struct used to create a kubectl configuration YAML file.
type KubeconfigAuthProvider ¶ added in v0.2.1
type KubeconfigAuthProvider struct {
Name string `yaml:"name"`
Config map[string]string `yaml:"config"`
}
KubeconfigAuthProvider is a struct used to create a kubectl authentication provider
type KubeconfigCluster ¶
type KubeconfigCluster struct {
Server string `yaml:"server"`
CertificateAuthorityData string `yaml:"certificate-authority-data"`
CertificateAuthority string `yaml:"certificate-authority"`
}
KubeconfigCluster is a struct used to create a kubectl configuration YAML file
type KubeconfigContext ¶
type KubeconfigContext struct {
Cluster string `yaml:"cluster"`
Namespace string `yaml:"namespace,omitempty"`
User string `yaml:"user"`
}
KubeconfigContext is a struct used to create a kubectl configuration YAML file
type KubeconfigNamedCluster ¶
type KubeconfigNamedCluster struct {
Name string `yaml:"name"`
Cluster KubeconfigCluster `yaml:"cluster"`
}
KubeconfigNamedCluster is a struct used to create a kubectl configuration YAML file
type KubeconfigNamedContext ¶
type KubeconfigNamedContext struct {
Name string `yaml:"name"`
Context KubeconfigContext `yaml:"context"`
}
KubeconfigNamedContext is a struct used to create a kubectl configuration YAML file
type KubeconfigUser ¶
type KubeconfigUser struct {
Name string `yaml:"name"`
User KubeconfigUserKeyPair `yaml:"user"`
}
KubeconfigUser is a struct used to create a kubectl configuration YAML file
type KubeconfigUserKeyPair ¶
type KubeconfigUserKeyPair struct {
ClientCertificateData string `yaml:"client-certificate-data"`
ClientKeyData string `yaml:"client-key-data"`
AuthProvider KubeconfigAuthProvider `yaml:"auth-provider,omitempty"`
}
KubeconfigUserKeyPair is a struct used to create a kubectl configuration YAML file