plugin

package
v0.0.0-...-5e118e0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SnapshotSucceeded  = "SUCCESS"
	SnapshotInProgress = "IN_PROGRESS"
	SnapshotFailed     = "FAILED"

	RecoveryTypeSnapshot = "SNAPSHOT"
	RecoveryStageDone    = "DONE"
)
View Source
const (
	MoveEngineName      = "engineName"
	MoveEngineNamespace = "engineNamespace"

	RepositoryParameters   = "repository"
	ElasticsearchParameter = "elasticsearch"

	EngineModeActive = "active"
	ElasticUser      = "elastic"
	TLSCertKey       = "tls.crt"
	KeySnapshotName  = "snapshotName"

	ContainerPluginInstaller = "plugin-installer"
)

Variables

View Source
var ESGVR = schema.GroupVersionResource{
	Group:    "elasticsearch.k8s.elastic.co",
	Version:  "v1",
	Resource: "elasticsearches",
}

Functions

func NewElasticsearchClient

func NewElasticsearchClient(k8sClient kubernetes.Interface, opt ElasticsearchOptions) (*esv7.Client, error)

func WaitUntilElasticsearchReady

func WaitUntilElasticsearchReady(k8sClient kubernetes.Interface, dmClient dynamic.Interface, params PluginParameters, waitForInitContainer bool) error

Types

type ElasticsearchDDM

type ElasticsearchDDM struct {
	Log       logr.Logger
	P         framework.Plugin
	K8sClient kubernetes.Interface
	DmClient  dynamic.Interface
}

func (*ElasticsearchDDM) Init

func (d *ElasticsearchDDM) Init(params map[string]string) error

func (*ElasticsearchDDM) Status

func (d *ElasticsearchDDM) Status(params map[string]string) (int32, error)

func (*ElasticsearchDDM) Sync

func (d *ElasticsearchDDM) Sync(params map[string]string) (string, error)

type ElasticsearchOptions

type ElasticsearchOptions struct {
	Name               string `json:"name"`
	Namespace          string `json:"namespace"`
	ServiceName        string `json:"serviceName"`
	Scheme             string `json:"scheme"`
	Port               int32  `json:"port"`
	AuthSecret         string `json:"authSecret"`
	TLSSecret          string `json:"tlsSecret,omitempty"`
	InsecureSkipVerify bool   `json:"insecureSkipVerify,omitempty"`
}

type ErrorCause

type ErrorCause struct {
	RootCause []RootCause `json:"root_cause,omitempty"`
}

type ErrorInfo

type ErrorInfo struct {
	Error ErrorCause `json:"error,omitempty"`
}

type IndexesRecoveryStatus

type IndexesRecoveryStatus struct {
	Shards []ShardRecoveryStatus `json:"shards"`
}

IndexesRecoveryStatus is used to unmarshal the indexes recovery status from IndicesRecoveryRequest response

type PluginParameters

type PluginParameters struct {
	Repository    RepositoryOptions    `json:"repository"`
	Elasticsearch ElasticsearchOptions `json:"elasticsearch"`
}

type RecoverySource

type RecoverySource struct {
	Snapshot string `json:"snapshot,omitempty"`
}

type RepoCreateRequestBody

type RepoCreateRequestBody struct {
	Type     string             `json:"type"`
	Settings RepositorySettings `json:"settings"`
}

type RepositoryOptions

type RepositoryOptions struct {
	Name        string `json:"name"`
	Type        string `json:"type"`
	Bucket      string `json:"bucket"`
	Prefix      string `json:"prefix,omitempty"`
	Endpoint    string `json:"endpoint,omitempty"`
	Scheme      string `json:"scheme"`
	Credentials string `json:"credentials"`
}

type RepositorySettings

type RepositorySettings struct {
	Bucket   string `json:"bucket"`
	BasePath string `json:"base_path,omitempty"`
	Endpoint string `json:"endpoint,omitempty"`
	Protocol string `json:"protocol,omitempty"`
	ReadOnly string `json:"read_only,omitempty"`
}

type RootCause

type RootCause struct {
	Type   string `json:"type,omitempty"`
	Reason string `json:"reason,omitempty"`
}

type ShardRecoveryStatus

type ShardRecoveryStatus struct {
	Type   string         `json:"type"`
	Stage  string         `json:"stage"`
	Source RecoverySource `json:"source"`
}

type SnapshotGetResponse

type SnapshotGetResponse struct {
	Snapshots []SnapshotStatus `json:"snapshots"`
}

SnapshotGetResponse is used to unmarshal the response body of SnapshotGetRequest

type SnapshotStatus

type SnapshotStatus struct {
	Snapshot string `json:"snapshot"`
	State    string `json:"state"`
}

Jump to

Keyboard shortcuts

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