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

Commit

Permalink
update README/values; Add test for schedulerName
Browse files Browse the repository at this point in the history
Signed-off-by: Sathya Balakrishnan <sathya@portworx.com>
  • Loading branch information
Sathya Balakrishnan committed Jun 3, 2019
1 parent 1b6baf9 commit e2c5b6b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion elasticsearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ helm install --name elasticsearch elastic/elasticsearch --version 7.1.0 --set im
| `nodeSelector` | Configurable [nodeSelector](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) so that you can target specific nodes for your Elasticsearch cluster | `{}` |
| `tolerations` | Configurable [tolerations](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `[]` |
| `ingress` | Configurable [ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) to expose the Elasticsearch service. See [`values.yaml`](./values.yaml) for an example | `enabled: false` |
| `schedulerName` | Name of the alternate scheduler (e.g. stork) | `nil` |
| `schedulerName` | Name of the [alternate scheduler](https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/#specify-schedulers-for-pods) | `nil` |

## Try it out

Expand Down
12 changes: 12 additions & 0 deletions elasticsearch/tests/elasticsearch_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,3 +569,15 @@ def test_priority_class_name():
r = helm_template(config)
priority_class_name = r['statefulset'][uname]['spec']['template']['spec']['priorityClassName']
assert priority_class_name == "highest"


def test_scheduler_name():
r = helm_template('')
spec = r['statefulset'][uname]['spec']['template']['spec']
assert 'schedulerName' not in spec

config = '''
schedulerName: "stork"
'''
r = helm_template(config)
assert r['statefulset'][uname]['spec']['template']['spec']['schedulerName'] == "stork"
2 changes: 1 addition & 1 deletion elasticsearch/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ readinessProbe:
# https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html#request-params wait_for_status
clusterHealthCheckParams: "wait_for_status=green&timeout=1s"

## Use an alternate scheduler, e.g. "stork".
## Use an alternate scheduler.
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
##
# schedulerName:
Expand Down

0 comments on commit e2c5b6b

Please sign in to comment.