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

[elasticsearch] add workaround to fix kind example #434

Merged
merged 1 commit into from
Jan 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions elasticsearch/examples/kubernetes-kind/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ 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) ../../

test: install
Expand Down
21 changes: 21 additions & 0 deletions elasticsearch/examples/kubernetes-kind/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# KIND

An example of configuration for deploying Elasticsearch chart on [Kind][].

You can use `make install` to deploy it.

Note that this configuration should be used for test only and isn't recommended
for production.

## Current issue

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

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

[Kind]: https://kind.sigs.k8s.io/
[Kind issue]: https://github.com/kubernetes-sigs/kind/issues/830
[Kubernetes-sigs/kind#1157]: https://github.com/kubernetes-sigs/kind/pull/1157
[Rancher Local Path Provisioner]: https://github.com/rancher/local-path-provisioner
[Makefile]: ./Makefile#L5
15 changes: 1 addition & 14 deletions elasticsearch/examples/kubernetes-kind/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,7 @@ resources:
# Request smaller persistent volumes.
volumeClaimTemplate:
accessModes: [ "ReadWriteOnce" ]
storageClassName: "local-path"
resources:
requests:
storage: 100M
extraInitContainers: |
- name: create
image: busybox:1.28
command: ['mkdir', '/usr/share/elasticsearch/data/nodes/']
volumeMounts:
- mountPath: /usr/share/elasticsearch/data
name: elasticsearch-master
- name: file-permissions
image: busybox:1.28
command: ['chown', '-R', '1000:1000', '/usr/share/elasticsearch/']
volumeMounts:
- mountPath: /usr/share/elasticsearch/data
name: elasticsearch-master