jetstack / navigator

Managed Database-as-a-Service (DBaaS) on Kubernetes
Apache License 2.0
271 stars 31 forks source link

Add basic ElasticsearchCluster resource validation #199

Closed munnerz closed 6 years ago

munnerz commented 6 years ago

What this PR does / why we need it:

Adds an initial level of validation for ElasticsearchCluster resources.

Special notes for your reviewer:

Example output:

➜ kc create -f hack/testdata/es-cluster-test.template.yaml
The ElasticsearchCluster "test" is invalid:
* spec.pilot.tag: Required value
* spec.pilot.repository: Required value
* spec.nodePools[0].roles[2]: Unsupported value: "car": supported values: data, ingest, master
* spec.nodePools[1].name: Duplicate value: "mixed"

Release note:

Add resource validation for ElasticsearchCluster resources
munnerz commented 6 years ago

/test e2e

jetstack-ci-bot commented 6 years ago

@munnerz PR needs rebase

munnerz commented 6 years ago

/test e2e

munnerz commented 6 years ago

/test e2e

munnerz commented 6 years ago

You can see the unit test that ensures that size is valid regardless whether Enabled=true here: https://github.com/jetstack/navigator/pull/199/files#diff-37f8430e4ef53a4d14e2372ffa292324R262

We have to allow the zero value iff enabled = false so that users can write:

persistence:
  enabled: false
wallrj commented 6 years ago

/lgtm

jetstack-ci-bot commented 6 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wallrj

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files: - ~~[OWNERS](https://github.com/jetstack/navigator/blob/master/OWNERS)~~ [wallrj] You can indicate your approval by writing `/approve` in a comment You can cancel your approval by writing `/approve cancel` in a comment
munnerz commented 6 years ago

/retest

jetstack-ci-bot commented 6 years ago

/test all [submit-queue is verifying that this PR is safe to merge]

jetstack-ci-bot commented 6 years ago

Automatic merge from submit-queue.