Documentation ¶
Index ¶
- func TemplateImagePullSecrets(ips []myspec.ImagePullSecrets) []v1.LocalObjectReference
- type K8sutil
- func (k *K8sutil) CreateClientMasterDeployment(deploymentType, baseImage string, replicas *int32, javaOptions string, ...) error
- func (k *K8sutil) CreateClientService(clusterName string, nodePort int32) error
- func (k *K8sutil) CreateDataNodeDeployment(replicas *int32, baseImage, storageClass string, dataDiskSize string, ...) error
- func (k *K8sutil) CreateDataService(clusterName string) error
- func (k *K8sutil) CreateDiscoveryService(clusterName string) error
- func (k *K8sutil) CreateKubernetesThirdPartyResource() error
- func (k *K8sutil) CreateStorageClass(zone, storageClassProvisioner, storageType string, clusterName string) error
- func (k *K8sutil) DeleteClientMasterDeployment(deploymentType string, clusterName string) error
- func (k *K8sutil) DeleteServices(clusterName string)
- func (k *K8sutil) DeleteStatefulSet(clusterName string) error
- func (k *K8sutil) DeleteStorageClasses(clusterName string) error
- func (k *K8sutil) GetElasticSearchClusters() ([]myspec.ElasticsearchCluster, error)
- func (k *K8sutil) MonitorElasticSearchEvents(stopchan chan struct{}) (<-chan *myspec.ElasticsearchCluster, <-chan error)
- type KubeInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TemplateImagePullSecrets ¶
func TemplateImagePullSecrets(ips []myspec.ImagePullSecrets) []v1.LocalObjectReference
Types ¶
type K8sutil ¶
type K8sutil struct { Config *rest.Config TprClient *rest.RESTClient Kclient KubeInterface MasterHost string }
K8sutil defines the kube object
func (*K8sutil) CreateClientMasterDeployment ¶
func (k *K8sutil) CreateClientMasterDeployment(deploymentType, baseImage string, replicas *int32, javaOptions string, resources myspec.Resources, imagePullSecrets []myspec.ImagePullSecrets, clusterName, statsdEndpoint string) error
CreateClientMasterDeployment creates the client or master deployment
func (*K8sutil) CreateClientService ¶
CreateClientService creates the client service
func (*K8sutil) CreateDataNodeDeployment ¶
func (k *K8sutil) CreateDataNodeDeployment(replicas *int32, baseImage, storageClass string, dataDiskSize string, resources myspec.Resources, imagePullSecrets []myspec.ImagePullSecrets, clusterName, statsdEndpoint string) error
CreateDataNodeDeployment creates the data node deployment
func (*K8sutil) CreateDataService ¶
CreateDataService creates the data service
func (*K8sutil) CreateDiscoveryService ¶
CreateDiscoveryService creates the discovery service
func (*K8sutil) CreateKubernetesThirdPartyResource ¶
CreateKubernetesThirdPartyResource checks if ElasticSearch TPR exists. If not, create
func (*K8sutil) CreateStorageClass ¶
func (k *K8sutil) CreateStorageClass(zone, storageClassProvisioner, storageType string, clusterName string) error
CreateStorageClass creates a storage class NOTE: Right now only creating AWS EBS volumes type gp2
func (*K8sutil) DeleteClientMasterDeployment ¶
DeleteClientMasterDeployment deletes the client or master deployment
func (*K8sutil) DeleteServices ¶
DeleteServices creates the discovery service
func (*K8sutil) DeleteStatefulSet ¶
DeleteStatefulSet deletes the data statefulset
func (*K8sutil) DeleteStorageClasses ¶
DeleteStorageClasses removes storage classes tied to the operator
func (*K8sutil) GetElasticSearchClusters ¶
func (k *K8sutil) GetElasticSearchClusters() ([]myspec.ElasticsearchCluster, error)
GetElasticSearchClusters returns a list of custom clusters defined
func (*K8sutil) MonitorElasticSearchEvents ¶
func (k *K8sutil) MonitorElasticSearchEvents(stopchan chan struct{}) (<-chan *myspec.ElasticsearchCluster, <-chan error)
MonitorElasticSearchEvents watches for new or removed clusters
type KubeInterface ¶
type KubeInterface interface { Services(namespace string) coreType.ServiceInterface ThirdPartyResources() extensionsType.ThirdPartyResourceInterface Deployments(namespace string) extensionsType.DeploymentInterface StatefulSets(namespace string) appsType.StatefulSetInterface StorageClasses() storageType.StorageClassInterface ReplicaSets(namespace string) extensionsType.ReplicaSetInterface }
KubeInterface abstracts the kubernetes client