Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context stores the config and clients to connect with a particular kubernetes cluster.
func NewContextFromConfig ¶
NewContextFromConfig writes the given kubeconfig to a file, and the returns NewContextFromPath for that file.
func NewContextFromPath ¶
NewContextFromPath creates a new Context for the cluster specified in the given kubeconfig file.
func (*Context) AddEnv ¶
AddEnv adds the necessary environment variables to a exec.Cmd, such that the command will use the k8s cluster specified by this context.
func (*Context) Clientset ¶
func (ctx *Context) Clientset() *kubernetes.Clientset
Clientset returns the kubernetes Clientset for this cluster.
func (*Context) RestConfig ¶
RestConfig returns the kubernetes client config for this cluster.
type Provider ¶
type Provider interface { // GetCluster returns the Context for a cluster matching the given spec, a cleanup function for tearing down the cluster, or an error on failure. // The caller is responsible for calling Context.Close GetCluster(context.Context, *experimentpb.ClusterSpec) (*Context, func(), error) // Close cleanups the provider. Close() error }
Provider is an interface for implementations that can provide a cluster conforming to a given ClusterSpec.