Documentation ¶
Index ¶
- func GetESURL(esHost string, useSSL *bool) string
- func TemplateImagePullSecrets(ips []myspec.ImagePullSecrets) []v1.LocalObjectReference
- type K8sutil
- func (k *K8sutil) CertsSecretExists(namespace, clusterName string) bool
- func (k *K8sutil) ConfigmapExists(namespace, name string) bool
- func (k *K8sutil) CreateCerebroConfiguration(esHost string, useSSL *bool) map[string]string
- func (k *K8sutil) CreateCerebroDeployment(baseImage, clusterName, namespace, cert string, ...) error
- func (k *K8sutil) CreateCertsSecret(namespace, clusterName, certsDir string) error
- func (k *K8sutil) CreateClientDeployment(baseImage string, replicas *int32, javaOptions string, ...) error
- func (k *K8sutil) CreateClientService(clusterName, namespace string, nodePort int32) error
- func (k *K8sutil) CreateConfigMap(namespace string, name string, data map[string]string) error
- func (k *K8sutil) CreateDataNodeDeployment(deploymentType string, replicas *int32, baseImage, storageClass string, ...) error
- func (k *K8sutil) CreateDataService(clusterName, namespace string) error
- func (k *K8sutil) CreateDiscoveryService(clusterName, namespace string) error
- func (k *K8sutil) CreateKibanaDeployment(baseImage, clusterName, namespace string, ...) error
- func (k *K8sutil) CreateKubernetesCustomResourceDefinition() error
- func (k *K8sutil) CreateMgmtService(service string, clusterName, namespace string) error
- func (k *K8sutil) CreateNodeInitDaemonset(namespace string) error
- func (k *K8sutil) CreateStorageClass(zone, storageClassProvisioner, storageType string, clusterName string) error
- func (k *K8sutil) DeleteCertsSecret(namespace, clusterName string) error
- func (k *K8sutil) DeleteDeployment(clusterName, namespace, deploymentType string) error
- func (k *K8sutil) DeleteServices(clusterName, namespace string) error
- func (k *K8sutil) DeleteStatefulSet(deploymentType, clusterName, namespace string) error
- func (k *K8sutil) DeleteStorageClasses(clusterName string) error
- func (k *K8sutil) GenerateCerts(configDir, certsDir, namespace, clusterName string) error
- func (k *K8sutil) GetClientServiceName(clusterName string) string
- func (k *K8sutil) GetClientServiceNameFullDNS(clusterName, namespace string) string
- func (k *K8sutil) MonitorDataPods(stopchan chan struct{}) (<-chan *v1.Pod, <-chan error)
- func (k *K8sutil) MonitorElasticSearchEvents(stopchan chan struct{}) (<-chan *myspec.ElasticsearchCluster, <-chan error)
- func (k *K8sutil) UpdateConfigMap(namespace string, name string, data map[string]string) error
- func (k *K8sutil) UpdateVolumeReclaimPolicy(policy, namespace string, name string)
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 CrdClient genclient.Interface Kclient kubernetes.Interface KubeExt apiextensionsclient.Interface K8sVersion []int MasterHost string }
K8sutil defines the kube object
func (*K8sutil) CertsSecretExists ¶ added in v0.0.5
CertsSecretExists returms true if secret exists
func (*K8sutil) ConfigmapExists ¶ added in v0.0.9
ConfigmapExists returns true if configmap exists
func (*K8sutil) CreateCerebroConfiguration ¶ added in v0.0.9
CreateCerebroConfiguration creates Cerebro configuration
func (*K8sutil) CreateCerebroDeployment ¶ added in v0.0.9
func (k *K8sutil) CreateCerebroDeployment(baseImage, clusterName, namespace, cert string, imagePullSecrets []myspec.ImagePullSecrets, useSSL *bool) error
CreateCerebroDeployment creates a deployment of Cerebro
func (*K8sutil) CreateCertsSecret ¶ added in v0.0.5
CreateCertsSecret creates the certs secrets
func (*K8sutil) CreateClientDeployment ¶ added in v0.0.7
func (k *K8sutil) CreateClientDeployment(baseImage string, replicas *int32, javaOptions string, resources myspec.Resources, imagePullSecrets []myspec.ImagePullSecrets, clusterName, statsdEndpoint, networkHost, namespace string, useSSL *bool) error
CreateClientDeployment creates the client deployment
func (*K8sutil) CreateClientService ¶
CreateClientService creates the client service
func (*K8sutil) CreateConfigMap ¶ added in v0.0.9
CreateConfigMap creates a new configMap
func (*K8sutil) CreateDataNodeDeployment ¶
func (k *K8sutil) CreateDataNodeDeployment(deploymentType string, replicas *int32, baseImage, storageClass string, dataDiskSize string, resources myspec.Resources, imagePullSecrets []myspec.ImagePullSecrets, clusterName, statsdEndpoint, networkHost, namespace, javaOptions string, useSSL *bool) 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) CreateKibanaDeployment ¶ added in v0.0.7
func (k *K8sutil) CreateKibanaDeployment(baseImage, clusterName, namespace string, imagePullSecrets []myspec.ImagePullSecrets, useSSL *bool) error
CreateKibanaDeployment creates a deployment of Kibana
func (*K8sutil) CreateKubernetesCustomResourceDefinition ¶ added in v0.0.8
CreateKubernetesCustomResourceDefinition checks if ElasticSearch CRD exists. If not, create
func (*K8sutil) CreateMgmtService ¶ added in v0.2.0
CreateMgmtServices creates service for kibana or cerebro
func (*K8sutil) CreateNodeInitDaemonset ¶ added in v0.0.11
CreateNodeInitDaemonset creates the node init daemonset
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) DeleteCertsSecret ¶ added in v0.0.5
DeleteCertsSecret deletes the certs secret
func (*K8sutil) DeleteDeployment ¶ added in v0.0.7
TODO just mount the secret needed by each deployment DeleteDeployment deletes a 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) GenerateCerts ¶ added in v0.0.5
GenerateCerts creates certs
func (*K8sutil) GetClientServiceName ¶ added in v0.0.5
GetClientServiceName return the name of the client service
func (*K8sutil) GetClientServiceNameFullDNS ¶ added in v0.0.5
GetClientServiceNameFullDNS return the full DNS name of the client service
func (*K8sutil) MonitorDataPods ¶ added in v0.0.5
MonitorDataPods watches for new or changed data node pods
func (*K8sutil) MonitorElasticSearchEvents ¶
func (k *K8sutil) MonitorElasticSearchEvents(stopchan chan struct{}) (<-chan *myspec.ElasticsearchCluster, <-chan error)
MonitorElasticSearchEvents watches for new or removed clusters
func (*K8sutil) UpdateConfigMap ¶ added in v0.0.9
UpdateConfigMap update a existent configmap
func (*K8sutil) UpdateVolumeReclaimPolicy ¶ added in v0.0.5
UpdateVolumeReclaimPolicy updates the policy of the volume after it's created: See: https://github.com/kubernetes/kubernetes/issues/38192