k8shandler

package
v0.0.0-...-693f4f6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrUpdateConfigMaps

func CreateOrUpdateConfigMaps(dpl *v1alpha1.Elasticsearch) (string, error)

CreateOrUpdateConfigMaps ensures the existens of ConfigMaps with Elasticsearch configuration

func CreateOrUpdateElasticsearchCluster

func CreateOrUpdateElasticsearchCluster(dpl *v1alpha1.Elasticsearch, configMapName, serviceAccountName string) error

CreateOrUpdateElasticsearchCluster creates an Elasticsearch deployment

func CreateOrUpdateServiceAccount

func CreateOrUpdateServiceAccount(dpl *v1alpha1.Elasticsearch) (string, error)

CreateOrUpdateServiceAccount ensures the existence of the serviceaccount for Elasticsearch cluster

func CreateOrUpdateServices

func CreateOrUpdateServices(dpl *v1alpha1.Elasticsearch) error

CreateOrUpdateServices ensures the existence of the services for Elasticsearch cluster

Types

type ClusterState

type ClusterState struct {
	Nodes                []*nodeState
	DanglingStatefulSets *apps.StatefulSetList
	DanglingDeployments  *apps.DeploymentList
	DanglingReplicaSets  *apps.ReplicaSetList
	DanglingPods         *v1.PodList
}

ClusterState struct represents the state of the cluster

func NewClusterState

func NewClusterState(dpl *v1alpha1.Elasticsearch, configMapName, serviceAccountName string) (ClusterState, error)

NewClusterState func generates ClusterState for the current cluster

func (*ClusterState) UpdateStatus

func (cState *ClusterState) UpdateStatus(dpl *v1alpha1.Elasticsearch) error

UpdateStatus updates the status of Elasticsearch CRD

type NodeTypeFactory

type NodeTypeFactory func(name, namespace string) NodeTypeInterface

NodeTypeFactory is a factory to construct either statefulset or deployment

type NodeTypeInterface

type NodeTypeInterface interface {
	// contains filtered or unexported methods
}

NodeTypeInterface interace represents individual Elasticsearch node

func NewDeploymentNode

func NewDeploymentNode(name, namespace string) NodeTypeInterface

NewDeploymentNode constructs deploymentNode struct for data nodes

func NewStatefulSetNode

func NewStatefulSetNode(name, namespace string) NodeTypeInterface

NewStatefulSetNode constructs statefulSetNode struct for non-data nodes

Jump to

Keyboard shortcuts

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