Skip to content

Commit

Permalink
Update doc to make plugin installation via initContainer more robust (e…
Browse files Browse the repository at this point in the history
…lastic#7305)

Removes plugin before installing it to prevent edge cases where initContainer starts
crashing loopback when plugin installation failed partially.
  • Loading branch information
jeanfabrice authored and robbavey committed Dec 20, 2023
1 parent c7d1e94 commit a5cd487
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions deploy/eck-stack/charts/eck-elasticsearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ monitoring: {}
# metrics:
# elasticsearchRefs:
# - name: monitoring
# namespace: observability
# namespace: observability
# logs:
# elasticsearchRefs:
# - name: monitoring
Expand Down Expand Up @@ -176,7 +176,7 @@ nodeSets:
# https://v1-24.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#podtemplatespec-v1-core
#
# Only the commonly overridden/used fields will be noted below.
#
#
spec:

# If specified, the pod's scheduling constraints
Expand Down Expand Up @@ -207,7 +207,7 @@ nodeSets:
resources:
# Requests describes the minimum amount of compute resources required. If Requests is omitted for a container,
# it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value.
#
#
# Defaults used by the ECK Operator, if not specified, are below
limits:
# cpu: 1
Expand Down Expand Up @@ -267,7 +267,7 @@ nodeSets:
# - command:
# - sh
# - "-c"
# - bin/elasticsearch-plugin install --batch repository-s3
# - bin/elasticsearch-plugin remove --purge analysis-icu ; bin/elasticsearch-plugin install --batch analysis-icu
# name: install-plugins
# securityContext:
# privileged: true
Expand Down
1 change: 1 addition & 0 deletions docs/advanced-topics/service-meshes.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ spec:
- sh
- -c
- |
bin/elasticsearch-plugin remove --purge analysis-icu
bin/elasticsearch-plugin install --batch analysis-icu
----

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif::[]
To run Elasticsearch with specific plugins or configuration files installed on ECK, you have two options. Each option has its own pros and cons.

. Create a custom container image with the required plugins and configuration files.
+
+
* *Pros*
** Deployment is reproducible and reusable.
** Does not require internet access at runtime.
Expand Down Expand Up @@ -51,6 +51,7 @@ spec:
- sh
- -c
- |
bin/elasticsearch-plugin remove --purge repository-azure
bin/elasticsearch-plugin install --batch repository-azure
----

Expand Down Expand Up @@ -104,6 +105,7 @@ spec:
- |
#!/usr/bin/env bash
set -e
bin/elasticsearch-plugin remove --purge repository-s3 || true
bin/elasticsearch-plugin install --batch repository-s3
/bin/tini -- /usr/local/bin/docker-entrypoint.sh
----
----
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ spec:
- sh
- -c
- |
bin/elasticsearch-plugin remove --purge analysis-icu
bin/elasticsearch-plugin install --batch analysis-icu
----

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ spec:
- sh
- -c
- |
bin/elasticsearch-plugin remove --purge repository-gcs
bin/elasticsearch-plugin install --batch repository-gcs
----

Expand All @@ -438,7 +439,3 @@ Assuming you stored this in a file called `elasticsearch.yaml` you can in both c
----
kubectl apply -f elasticsearch.yaml
----




0 comments on commit a5cd487

Please sign in to comment.