framework

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2018 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertCRD added in v0.8.0

func ConvertCRD(pathToYaml string) (*apiextensionsv1beta1.CustomResourceDefinition, error)

ConvertCRD takes in a path to the YAML file containing the manifest. It converts the file to the CustomResourceDefinition object.

func ConvertClusterRole added in v0.8.0

func ConvertClusterRole(pathToYaml string) (*rbacv1.ClusterRole, error)

ConvertClusterRole takes in a path to the YAML file containing the manifest. It converts the file to the ClusterRole object.

func ConvertClusterRoleBinding added in v0.8.0

func ConvertClusterRoleBinding(pathToYaml string) (*rbacv1.ClusterRoleBinding, error)

ConvertClusterRoleBinding takes in a path to the YAML file containing the manifest. It converts the file to the ClusterRoleBinding object.

func ConvertDeployment

func ConvertDeployment(pathToYaml string) (*appsv1beta1.Deployment, error)

ConvertDeployment takes in a path to the YAML file containing the manifest. It converts the file to the Deployment object.

func ConvertHabitat

func ConvertHabitat(pathToYaml string) (*habv1beta1.Habitat, error)

ConvertHabitat takes in a path to the YAML file containing the manifest. It converts the file to the Habitat object.

func ConvertRole added in v0.8.0

func ConvertRole(pathToYaml string) (*rbacv1.Role, error)

ConvertRole takes in a path to the YAML file containing the manifest. It converts the file to the Role object.

func ConvertRoleBinding added in v0.8.0

func ConvertRoleBinding(pathToYaml string) (*rbacv1.RoleBinding, error)

ConvertRoleBinding takes in a path to the YAML file containing the manifest. It converts the file to the RoleBinding object.

func ConvertSecret

func ConvertSecret(pathToYaml string) (*v1.Secret, error)

ConvertSecret takes in a path to the YAML file containing the manifest. It converts the file to the Secret object.

func ConvertService

func ConvertService(pathToYaml string) (*v1.Service, error)

ConvertService takes in a path to the YAML file containing the manifest. It converts the file to the Service object.

func ConvertServiceAccount added in v0.8.0

func ConvertServiceAccount(pathToYaml string) (*apiv1.ServiceAccount, error)

ConvertServiceAccount takes in a path to the YAML file containing the manifest It converts it from that file to the ServiceAccount object.

func QueryService

func QueryService(url string) (string, error)

QueryService makes an HTTP GET request to `url` and returns the body.

Types

type Framework

type Framework struct {
	Image               string
	KubeClient          kubernetes.Interface
	APIExtensionsClient apiextensionsclient.Interface
	Client              *habclient.HabitatV1beta1Client
	ExternalIP          string
	Namespace           string
}

func Setup

func Setup(image, kubeconfig, externalIP, namespace string) (*Framework, error)

Setup sets up the test Framework object by creating essential clients needed to talk to the Kubernetes API server.

func (*Framework) CreateHabitat

func (f *Framework) CreateHabitat(habitat *habv1beta1.Habitat) error

CreateHabitat creates a Habitat resource in cluster.

func (*Framework) DeleteCRD added in v0.8.0

func (f *Framework) DeleteCRD(name string) error

DeleteCRD deletes the CRD with given name

func (*Framework) DeleteHabitat

func (f *Framework) DeleteHabitat(habitatName string, ns string) error

DeleteHabitat deletes a Habitat as a user would.

func (*Framework) DeleteNamespace added in v0.8.0

func (f *Framework) DeleteNamespace() error

DeleteNamespace deletes the namespace that is stored in the Framework object while it's initialization

func (*Framework) DeleteService

func (f *Framework) DeleteService(service string) error

DeleteService delete a Kubernetes service provided.

func (*Framework) GetLoadBalancerIP added in v0.7.0

func (f *Framework) GetLoadBalancerIP(serviceName string) (string, error)

GetLoadBalancerIP waits for Load Balancer IP to become available and returns it

func (*Framework) WaitForEndpoints

func (f *Framework) WaitForEndpoints(habitatName string) error

func (*Framework) WaitForResources

func (f *Framework) WaitForResources(labelName, habitatName string, numPods int) error

WaitForResources waits until numPods are in the "Running" state. We wait for pods, because those take the longest to create. Waiting for anything else would be already testing.

Jump to

Keyboard shortcuts

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