common

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package common contains code shared between the subcommands of crinit.

Index

Constants

This section is empty.

Variables

View Source
var (
	ComponentLabel = map[string]string{
		"app": "clusterregistry",
	}
)

Functions

func CreateAPIServer

func CreateAPIServer(clientset client.Interface, namespace, name, serverImage,
	etcdImage, advertiseAddress, credentialsName, serviceAccountName string, hasHTTPBasicAuthFile,
	hasTokenAuthFile bool, argOverrides map[string]string,
	pvc *v1.PersistentVolumeClaim, aggregated, dryRun bool) (*appsv1beta1.Deployment, error)

CreateAPIServer helper to create the apiserver deployment object and return the object.

func CreateAPIServerCredentialsSecret

func CreateAPIServerCredentialsSecret(clientset client.Interface, namespace,
	credentialsName string, credentials *util.Credentials, dryRun bool) (*v1.Secret, error)

CreateAPIServerCredentialsSecret helper to create secret object and return the object.

func CreateNamespace

func CreateNamespace(clientset client.Interface, namespace string,
	dryRun bool) (*v1.Namespace, error)

CreateNamespace helper to create the cluster registry namespace object and return the object.

func CreatePVC

func CreatePVC(clientset client.Interface, namespace, svcName, etcdPVCapacity,
	etcdPVStorageClass string, dryRun bool) (*v1.PersistentVolumeClaim, error)

CreatePVC helper to create the persistent volume claim object and return the object.

func CreateService

func CreateService(cmdOut io.Writer, clientset client.Interface, namespace,
	svcName, apiserverAdvertiseAddress string, apiserverPort *int32,
	apiserverServiceType v1.ServiceType,
	dryRun bool) (*v1.Service, []string, []string, error)

CreateService helper to create the cluster registry apiserver service object and return the object. If service type is load balancer, will wait for load balancer IP and return it and hostnames.

func DeleteKubeconfigEntry added in v0.0.4

func DeleteKubeconfigEntry(cmdOut io.Writer, pathOptions *clientcmd.PathOptions,
	name, kubeconfig string, dryRun, ignoreErrors bool) error

DeleteKubeconfigEntry handles updating the kubeconfig to remove the cluster registry entry that was previously added when the cluster registry was initialized.

func DeleteNamespace added in v0.0.4

func DeleteNamespace(cmdOut io.Writer, clientset client.Interface,
	namespace string, dryRun bool) error

DeleteNamespace deletes the cluster registry namespace.

func GetClusterNodeIPs

func GetClusterNodeIPs(clientset client.Interface) ([]string, error)

GetClusterNodeIPs returns a list of the IP addresses of nodes in the cluster, with a preference for external IP addresses.

func WaitForClusterRegistryDeletion added in v0.0.4

func WaitForClusterRegistryDeletion(cmdOut io.Writer, clientset client.Interface,
	namespace string, dryRun bool) error

WaitForClusterRegistryDeletion waits a certain amount of time for the namespace requested to be deleted.

func WaitForLoadBalancerAddress

func WaitForLoadBalancerAddress(cmdOut io.Writer, clientset client.Interface, svc *v1.Service, dryRun bool) ([]string, []string, error)

WaitForLoadBalancerAddress polls the apiserver for load balancer status to retrieve IPs and hostnames for it.

func WaitForPods

func WaitForPods(cmdOut io.Writer, clientset client.Interface, pods []string, namespace string) error

func WaitSrvHealthy

func WaitSrvHealthy(cmdOut io.Writer, crClientset client.Interface) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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