cloud-on-k8s
cloud-on-k8s copied to clipboard
Elasticsearch validating webhook swallows errors
https://github.com/elastic/cloud-on-k8s/blob/49dc892dacd9d3f83c95a111812506485c3bf319/pkg/controller/elasticsearch/validation/validations.go#L189-L190
The error returned from UnpackConfig is swallowed. We should at least log it is not return it to the user.
https://github.com/elastic/cloud-on-k8s/blob/49dc892dacd9d3f83c95a111812506485c3bf319/pkg/controller/elasticsearch/validation/validations.go#L212-L214
is triggered incorrectly if UnpackConfig fails and the validations haven't even run.
Example test case:
- name: default
config:
node.roles: ["master", "data", "ingest", "ml"]
cluster.max_shards_per_node: "2000"
cluster.max_shards_per_node.frozen: "4000"
This is theoretically correct Elasticsearch configuration but impossible to express in valid YAML