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

Commit

Permalink
Add working examples for running Elasticsearch and Kibana on openshift
Browse files Browse the repository at this point in the history
Closes: #15

We don't currently have automated testing for openshift clusters however
these have been manually tested and confirmed to work. For now having
an example on how to do this is nice but in the future we can consider
adding a value to pragmatically disable these features with something
like `openshift: true`

Special thanks to @geogdog for getting these working and providing the
correct changes needed.
  • Loading branch information
Crazybus committed Aug 22, 2019
1 parent 7e9b029 commit 77cac6a
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 0 deletions.
15 changes: 15 additions & 0 deletions elasticsearch/examples/openshift/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
default: test
include ../../../helpers/examples.mk

RELEASE := elasticsearch

template:
helm template --values ./values.yaml ../../

install:
helm upgrade --wait --timeout=600 --install $(RELEASE) --values ./values.yaml ../../ ; \

test: install goss

purge:
helm del --purge $(RELEASE)
17 changes: 17 additions & 0 deletions elasticsearch/examples/openshift/test/goss.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
http:
http://localhost:9200/_cluster/health:
status: 200
timeout: 2000
body:
- 'green'
- '"number_of_nodes":3'
- '"number_of_data_nodes":3'

http://localhost:9200:
status: 200
timeout: 2000
body:
- '"number" : "7.3.0"'
- '"cluster_name" : "elasticsearch"'
- '"name" : "elasticsearch-master-0"'
- 'You Know, for Search'
10 changes: 10 additions & 0 deletions elasticsearch/examples/openshift/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---

securityContext:
runAsUser: null

podSecurityContext:
fsGroup: null

sysctlInitContainer:
enabled: false
15 changes: 15 additions & 0 deletions kibana/examples/openshift/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
default: test
include ../../../helpers/examples.mk

RELEASE := kibana

template:
helm template --values ./values.yml ../../

install:
helm upgrade --wait --timeout=600 --install --values ./values.yml $(RELEASE) ../../ ; \

test: install goss

purge:
helm del --purge $(RELEASE)
4 changes: 4 additions & 0 deletions kibana/examples/openshift/test/goss.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
http:
http://localhost:5601/app/kibana:
status: 200
timeout: 2000
4 changes: 4 additions & 0 deletions kibana/examples/openshift/values.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---

fsGroup: null
runAsUser: null

0 comments on commit 77cac6a

Please sign in to comment.