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

add capability to specify alternalte scheduler #141

Merged
merged 3 commits into from
Jun 7, 2019

Conversation

satchpx
Copy link
Contributor

@satchpx satchpx commented May 30, 2019

Signed-off-by: Sathya Balakrishnan sathya@portworx.com

  • Chart version not bumped (the versions are all bumped and released at the same time)
  • README.md updated with any new values or changes
  • Updated template tests in ${CHART}/tests/*.py
  • Updated integration tests in ${CHART}/examples/*/test/goss.yaml

Signed-off-by: Sathya Balakrishnan <sathya@portworx.com>
@satchpx
Copy link
Contributor Author

satchpx commented May 31, 2019

@Crazybus Hi, could you help review this? Or perhaps assign someone to?

@elasticmachine
Copy link
Collaborator

Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually?

Copy link
Contributor

@Crazybus Crazybus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add a basic template test to make sure that the templating and whitespacing is working correctly? Something like this should do the trick:

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"

@@ -100,6 +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` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a link to https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/#specify-schedulers-for-pods as something like alternate scheduler. Could you also remove the e.g. stork just to make sure that nobody gets confused thinking that it is supported or recommended for this chart.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -142,6 +142,11 @@ 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".
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above about removing stork as an example.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Signed-off-by: Sathya Balakrishnan <sathya@portworx.com>
Crazybus
Crazybus previously approved these changes Jun 4, 2019
Copy link
Contributor

@Crazybus Crazybus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

jenkins test this please

@Crazybus
Copy link
Contributor

Crazybus commented Jun 6, 2019

jenkins test this please

@Crazybus
Copy link
Contributor

Crazybus commented Jun 6, 2019

Build is failing due to a linting error:

15:19:44 ==> Linting ./
15:19:44 [ERROR] templates/: render error in "elasticsearch/templates/statefulset.yaml": template: elasticsearch/templates/statefulset.yaml:48:20: executing "elasticsearch/templates/statefulset.yaml" at <.Values.schedulerNam...>: map has no entry for key "schedulerName"

@Crazybus
Copy link
Contributor

Crazybus commented Jun 6, 2019

I think setting it to an empty string is what will make the linter happiest.

schedulerName: ""

Signed-off-by: Sathya Balakrishnan <sathya@portworx.com>
@satchpx
Copy link
Contributor Author

satchpx commented Jun 6, 2019

Done

@Crazybus
Copy link
Contributor

Crazybus commented Jun 7, 2019

jenkins test this please

@Crazybus Crazybus merged commit 51ab321 into elastic:master Jun 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants