kubernetes

package
v0.0.0-...-264ff9f Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNamespaceIfNotExist

func CreateNamespaceIfNotExist(
	namespace string,
	existingNamespaces map[string]bool,
	k8sClient *k8s.Clientset) error

func CreateSecrets

func CreateSecrets(
	k8sClient *k8s.Clientset,
	existingNamespaces map[string]bool,
	deployment *apis.Deployment) error

func CreateSecretsByNamespace

func CreateSecretsByNamespace(
	k8sClient *k8s.Clientset,
	namespace string,
	deployment *apis.Deployment) error

func CreateServiceForDeployment

func CreateServiceForDeployment(
	namespace string,
	serviceName string,
	family string,
	k8sClient *k8s.Clientset,
	task apis.KubernetesTask,
	container v1.Container,
	log *logging.Logger,
	skipCreatePublicService bool,
	internalHeadlessService bool) error

func DeleteK8S

func DeleteK8S(namespaces []string, kubeConfig *rest.Config, log *logging.Logger) error

func DeleteNodeReaderClusterRoleBindingToNamespace

func DeleteNodeReaderClusterRoleBindingToNamespace(k8sClient *k8s.Clientset, namespace string, log *logging.Logger)

func DeployKubernetesObjects

func DeployKubernetesObjects(
	config *viper.Viper,
	k8sClient *k8s.Clientset,
	deployment *apis.Deployment,
	userName string,
	log *logging.Logger) (map[string]ServiceMapping, error)

func DeployServices

func DeployServices(
	config *viper.Viper,
	k8sClient *k8s.Clientset,
	deployment *apis.Deployment,
	deployNamespace string,
	existingNamespaces map[string]bool,
	userName string,
	log *logging.Logger) (map[string]ServiceMapping, error)

func FindNodeIdFromServiceName

func FindNodeIdFromServiceName(deployment *apis.Deployment, serviceName string) (int, error)

FindNodeIdFromServiceName finds the node id that should be running this service

func GetAllDeployedNamespaces

func GetAllDeployedNamespaces(deployment *apis.Deployment) []string

func GetExistingNamespaces

func GetExistingNamespaces(k8sClient *k8s.Clientset) (map[string]bool, error)

func GetNamespace

func GetNamespace(objectMeta metav1.ObjectMeta) string

func GrantNodeReaderPermissionToNamespace

func GrantNodeReaderPermissionToNamespace(k8sClient *k8s.Clientset, namespace string, log *logging.Logger) error

GrantNodeReaderPermissionToNamespace grant read permission to the default user belongs to specified namespace

func TagKubeNodes

func TagKubeNodes(
	k8sClient *k8s.Clientset,
	deploymentName string,
	clusterDefinition apis.ClusterDefinition,
	nodeNames map[int]string,
	log *logging.Logger) error

func WaitUntilKubernetesNodeExists

func WaitUntilKubernetesNodeExists(
	k8sClient *k8s.Clientset,
	nodeNames []string,
	timeout time.Duration,
	log *logging.Logger) error

Types

type ServiceMapping

type ServiceMapping struct {
	NodeId     int    `json:"nodeId"`
	NodeName   string `json:"nodeName"`
	PublicUrl  string `json:"publicUrl"`
	PrivateUrl string `json:"privateUrl"`
}

Jump to

Keyboard shortcuts

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