k8s

package
v0.0.0-...-4ffe290 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApiSleepSeconds   = 5
	ApiSocketAttempts = 40
	ClusterName       = "kuber-test-1"
	AwsProfile        = "kuber-test"
)

Variables

This section is empty.

Functions

func CreateCluster

func CreateCluster(options cmd.Options)

func CreateClusterDef

func CreateClusterDef(options cmd.Options)

func DeleteCluster

func DeleteCluster(options cmd.Options)

func FindNode

func FindNode(name string, nodes []corev1.Node) *corev1.Node

func GetCluster

func GetCluster(kc KuberCluster) (*cluster.Cluster, error)

func GetConfig

func GetConfig() (*rest.Config, error)

func GetConfig2

func GetConfig2() (*rest.Config, error)

func GetConfigWithSsh

func GetConfigWithSsh(existing *cluster.Cluster, confDir string) (string, error)

func GetKubeConfigPath

func GetKubeConfigPath(path string) (string, error)

func GetNodes

func GetNodes(region string) *corev1.NodeList

func GetPodClient

func GetPodClient(namespace string) v1.PodInterface

func GetPodGroupName

func GetPodGroupName(pod *corev1.Pod) *string

func GetPods

func GetPods(namespace string) *corev1.PodList

func GetStateStore

func GetStateStore(kc KuberCluster) (stateStore state.ClusterStorer)

func GroupPods

func GroupPods(pods []corev1.Pod) (podGroup map[string][]corev1.Pod)

func ListPodsOnNode

func ListPodsOnNode(ListPodsOnNode func(opts metav1.ListOptions) (*corev1.PodList, error), node corev1.Node) []corev1.Pod

func LogPods

func LogPods(podGroups map[string][]corev1.Pod)

func Options

func Options(clusterName string, awsProfile string) cmd.Options

func RetryGetConfigWithSsh

func RetryGetConfigWithSsh(existing *cluster.Cluster, confDir string) (string, error)

func TagK8SWorkers

func TagK8SWorkers(region string)

func TestApiListen

func TestApiListen(t *testing.T)

func TestCreateCluster

func TestCreateCluster(t *testing.T)

func TestCreateClusterDef

func TestCreateClusterDef(t *testing.T)

func TestCreateDeleteCluster

func TestCreateDeleteCluster(t *testing.T)

func TestDeleteCluster

func TestDeleteCluster(t *testing.T)

func TestGetCluster

func TestGetCluster(t *testing.T)

func TestGetSateStore

func TestGetSateStore(t *testing.T)

func TestMain

func TestMain(m *testing.M)

Types

type Cluster

type Cluster struct {
	ID   string `json:"id" description:"identifier of the kuber"`
	Name string `json:"name" description:"name of the cluster"`
}

type ClusterResource

type ClusterResource struct {
}

func (ClusterResource) ScaleCluster

func (cl ClusterResource) ScaleCluster(request *restful.Request, response *restful.Response)

func (ClusterResource) WebService

func (cl ClusterResource) WebService() *restful.WebService

type KuberCluster

type KuberCluster struct {
	Name             string
	Location         string
	NodeInstanceType string
	Cluster          string
	Amazon           aws.AmazonKuberCluster
	Azure            azure.AzureKuberCluster
}

Jump to

Keyboard shortcuts

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