remote

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSecretNotFound     = errors.New("secret not found")
	ErrSecretMissingValue = errors.New("missing value in secret")
)

Functions

func GetKubeConfigSecret

func GetKubeConfigSecret(c client.Client, cluster, namespace string) (*corev1.Secret, error)

GetKubeConfigSecret retrieves the KubeConfig Secret (if any) from the given cluster name and namespace.

func KubeConfigFromSecret

func KubeConfigFromSecret(secret *corev1.Secret) ([]byte, error)

KubeConfigFromSecret uses the Secret to retrieve the KubeConfig.

func KubeConfigSecretName

func KubeConfigSecretName(cluster string) string

KubeConfigSecretName generates the expected name for the Kubeconfig secret to access a remote cluster given the cluster's name.

Types

type ClusterClient

type ClusterClient interface {
	RESTConfig() *restclient.Config
	CoreV1() (corev1.CoreV1Interface, error)
}

ClusterClient is an interface encapsulating methods to access a remote cluster.

func NewClusterClient

func NewClusterClient(c client.Client, cluster *v1alpha1.Cluster) (ClusterClient, error)

NewClusterClient creates a new ClusterClient.

Jump to

Keyboard shortcuts

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