Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
[elasticsearch] update kind example for version >= 0.7.0 (#669)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmlrt committed Jun 18, 2020
1 parent 2dc6fc2 commit 950e6c5
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 9 deletions.
5 changes: 4 additions & 1 deletion elasticsearch/examples/kubernetes-kind/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ default: test
RELEASE := helm-es-kind

install:
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml
helm upgrade --wait --timeout=900 --install --values values.yaml $(RELEASE) ../../

install-local-path:
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml
helm upgrade --wait --timeout=900 --install --values values-local-path.yaml $(RELEASE) ../../

test: install
helm test $(RELEASE)

Expand Down
14 changes: 6 additions & 8 deletions elasticsearch/examples/kubernetes-kind/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,19 @@ using [custom values][].
Note that this configuration should be used for test only and isn't recommended
for production.

Note that Kind < 0.7.0 are affected by a [kind issue][] with mount points
created from PVCs not writable by non-root users. [kubernetes-sigs/kind#1157][]
fix it in Kind 0.7.0.

## Requirements

There is currently an [kind issue][] with mount points created from PVCs not
writable by non-root users. [kubernetes-sigs/kind#1157][] should fix it in a
future release.

Meanwhile, the workaround is to install manually
The workaround for Kind < 0.7.0 is to install manually
[Rancher Local Path Provisioner][] and use `local-path` storage class for
Elasticsearch volumes (see [Makefile][] instructions).


## Usage

* Deploy Elasticsearch chart with the default values: `make install`
* For Kind >= 0.7.0: Deploy Elasticsearch chart with the default values: `make install`
* For Kind < 0.7.0: Deploy Elasticsearch chart with `local-path` storage class: `make install-local-path`

* You can now setup a port forward to query Elasticsearch API:

Expand Down
23 changes: 23 additions & 0 deletions elasticsearch/examples/kubernetes-kind/values-local-path.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
# Permit co-located instances for solitary minikube virtual machines.
antiAffinity: "soft"

# Shrink default JVM heap.
esJavaOpts: "-Xmx128m -Xms128m"

# Allocate smaller chunks of memory per pod.
resources:
requests:
cpu: "100m"
memory: "512M"
limits:
cpu: "1000m"
memory: "512M"

# Request smaller persistent volumes.
volumeClaimTemplate:
accessModes: [ "ReadWriteOnce" ]
storageClassName: "local-path"
resources:
requests:
storage: 100M

0 comments on commit 950e6c5

Please sign in to comment.