Documentation ¶
Index ¶
- Constants
- func AreOpensearchStsReady(log vzlog.VerrazzanoLogger, client client.Client, ...) bool
- func GetOSDHTTPEndpoint(client clipkg.Client) (string, error)
- func GetOpenSearchHTTPEndpoint(client clipkg.Client) (string, error)
- func GetVerrazzanoPassword(client clipkg.Client) (string, error)
- func IsSingleDataNodeCluster(ctx spi.ComponentContext) bool
- func NewComponent() spi.Component
- type ClusterHealth
- type DataStream
- type DataStreams
- type ISMPolicy
- type ISMTemplate
- type Index
- type InlinePolicy
- type OSClient
- func (o *OSClient) ConfigureISM(log vzlog.VerrazzanoLogger, client clipkg.Client, vz *vzv1alpha1.Verrazzano) error
- func (o *OSClient) DeleteDefaultISMPolicy(log vzlog.VerrazzanoLogger, client clipkg.Client, vz *vzv1alpha1.Verrazzano) error
- func (o *OSClient) IsClusterHealthy(client clipkg.Client) (bool, error)
- func (o *OSClient) IsOpenSearchReady(client clipkg.Client) bool
- func (o *OSClient) SetAutoExpandIndices(log vzlog.VerrazzanoLogger, client clipkg.Client, vz *vzv1alpha1.Verrazzano) error
- func (o *OSClient) SyncDefaultISMPolicy(log vzlog.VerrazzanoLogger, client clipkg.Client, vz *vzv1alpha1.Verrazzano) error
- type PolicyConditions
- type PolicyList
- type PolicyState
- type PolicyTransition
- type TimeStamp
Constants ¶
const ( // ComponentName is the name of the component ComponentName = "opensearch" // ComponentNamespace is the namespace of the component ComponentNamespace = constants.VerrazzanoSystemNamespace )
const ComponentJSONName = "opensearch"
ComponentJSONName is the JSON name of the opensearch component in CRD
const (
HealthGreen = "green"
)
Variables ¶
This section is empty.
Functions ¶
func AreOpensearchStsReady ¶ added in v1.7.0
func AreOpensearchStsReady(log vzlog.VerrazzanoLogger, client client.Client, namespacedNames []types.NamespacedName, expectedReplicas int32, prefix string) bool
AreOpensearchStsReady Check that the OS statefulsets have the minimum number of specified replicas ready and available. It ignores the updated replicas check if updated replicas are zero or cluster is not healthy.
func GetOSDHTTPEndpoint ¶ added in v1.7.0
func GetOpenSearchHTTPEndpoint ¶ added in v1.7.0
func GetVerrazzanoPassword ¶ added in v1.7.0
GetVerrazzanoPassword returns the password credential for the Verrazzano secret
func IsSingleDataNodeCluster ¶ added in v1.4.0
func IsSingleDataNodeCluster(ctx spi.ComponentContext) bool
IsSingleDataNodeCluster returns true if there is exactly 1 or 0 data nodes
func NewComponent ¶
Types ¶
type ClusterHealth ¶ added in v1.7.0
type ClusterHealth struct {
Status string `json:"status"`
}
type DataStream ¶ added in v1.7.0
type DataStreams ¶ added in v1.7.0
type DataStreams struct {
DataStreams []DataStream `json:"data_streams,omitempty"`
}
type ISMPolicy ¶ added in v1.7.0
type ISMPolicy struct { ID *string `json:"_id,omitempty"` PrimaryTerm *int `json:"_primary_term,omitempty"` SequenceNumber *int `json:"_seq_no,omitempty"` Status *int `json:"status,omitempty"` Policy InlinePolicy `json:"policy"` }
type ISMTemplate ¶ added in v1.7.0
type InlinePolicy ¶ added in v1.7.0
type InlinePolicy struct { DefaultState string `json:"default_state"` Description string `json:"description"` States []PolicyState `json:"states"` ISMTemplate []ISMTemplate `json:"ism_template"` }
type OSClient ¶ added in v1.7.0
type OSClient struct { DoHTTP func(request *http.Request) (*http.Response, error) // contains filtered or unexported fields }
func NewOSClient ¶ added in v1.7.0
func (*OSClient) ConfigureISM ¶ added in v1.7.0
func (o *OSClient) ConfigureISM(log vzlog.VerrazzanoLogger, client clipkg.Client, vz *vzv1alpha1.Verrazzano) error
ConfigureISM sets up the ISM Policies
func (*OSClient) DeleteDefaultISMPolicy ¶ added in v1.7.0
func (o *OSClient) DeleteDefaultISMPolicy(log vzlog.VerrazzanoLogger, client clipkg.Client, vz *vzv1alpha1.Verrazzano) error
DeleteDefaultISMPolicy deletes the default ISM policy if they exists
func (*OSClient) IsClusterHealthy ¶ added in v1.7.0
IsClusterHealthy checks whether Opensearch Cluster is healthy or not.
func (*OSClient) IsOpenSearchReady ¶ added in v1.7.0
IsOpenSearchReady returns true when all OpenSearch pods are ready, false otherwise
func (*OSClient) SetAutoExpandIndices ¶ added in v1.7.0
func (o *OSClient) SetAutoExpandIndices(log vzlog.VerrazzanoLogger, client clipkg.Client, vz *vzv1alpha1.Verrazzano) error
SetAutoExpandIndices updates the default index settings to auto expand replicas (max 1) when nodes are added to the cluster
func (*OSClient) SyncDefaultISMPolicy ¶ added in v1.7.0
func (o *OSClient) SyncDefaultISMPolicy(log vzlog.VerrazzanoLogger, client clipkg.Client, vz *vzv1alpha1.Verrazzano) error
SyncDefaultISMPolicy set up the default ISM Policies.
type PolicyConditions ¶ added in v1.7.0
type PolicyList ¶ added in v1.7.0
type PolicyState ¶ added in v1.7.0
type PolicyState struct { Name string `json:"name"` Actions []map[string]interface{} `json:"actions,omitempty"` Transitions []PolicyTransition `json:"transitions,omitempty"` }
type PolicyTransition ¶ added in v1.7.0
type PolicyTransition struct { StateName string `json:"state_name"` Conditions *PolicyConditions `json:"conditions,omitempty"` }