-
Notifications
You must be signed in to change notification settings - Fork 726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Isolate operator from http service misconfiguration - Use internal service #5211
Isolate operator from http service misconfiguration - Use internal service #5211
Conversation
… use the internally managed service, which does not apply the spec's selector defined within the CRD when creating the service to avoid a user misconfiguring the selectors. Added a unit test to ensure that the service doesn't inherit it's CRD spec's selector.
Question for discussion: In this solution, would we want to only target the master nodes, instead of all nodes? |
From a discussion with members of the Elasticsearch team, they note that these ES calls optimally should not be directed at the masters: "/_cat/shards?format=json" relevant information from discussion
|
run full pr build |
Update comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Just one thing ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…rvice (elastic#5211) * When constructing the Elasticsearch client for internal operator use, use the internally managed service, which does not apply the spec's selector defined within the CRD when creating the service to avoid a user misconfiguring the selectors. Added a unit test to ensure that the service doesn't inherit it's CRD spec's selector. * Set all aspects of internal service explicitly. Update comments * remove setting ipfamilies * Review comments
Since #5005 has been open, with active discussion for quite some time, I thought it would be useful to go back to the beginning and look at what we were trying to accomplish in the original issue #4394, which was ensuring that the user can't misconfigure the operator so it can't manage an Elasticsearch cluster. In the original PR, we chose to go the route of choosing a random pod for communication between the operator, and the ES cluster, which caused its own set of concerns once we both saw the implementation, and tested the consequences of the implementation.
This PR shows the changes that would be applied to the operator if we chose the other route, which was managing an internal service that does not inherit the selector defined within the custom resources's spec. This will, at least, give us more information to make a better decision about which route we believe is best to move either solution forward to resolving the initial issue.
To be clear, only one of #5005, or this issue (or none if we so choose) will be merged. The other will be closed as is.
resolves #4394