-
Notifications
You must be signed in to change notification settings - Fork 729
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
Elasticsearch: Set status.ObservedGeneration from metadata.Generation. #5331
Elasticsearch: Set status.ObservedGeneration from metadata.Generation. #5331
Conversation
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.
The actual change looks good to me. I have some concerns about editing conflicts but those do not need to be solved in this PR. Other then that only a few comments on testing.
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
run full pr build |
Set observedGeneration from metadata.generation when generating initial state during ES reconcile. Make observedGeneration optional in spec. Adjust docs for observedGeneration. Add .DS_Store to git ignore. Add tests for observedGeneration behavior. Add e2e test for observedGeneration.
Adjust wording for state during ES reconciliation, as it's not a pointer.
Update ObservedGeneration documentation/comments. Remove duplicative license header. Use named field in test struct.
Remove specific es generation test. Add generation test to all es mutation tests.
Update final generation e2e test step to be wrapped in test.Eventually
fd11076
to
395986e
Compare
…n status being set initially.
elastic#5331) * Add es.status.ObservedGeneration to ES spec. Set observedGeneration from metadata.generation when generating initial state during ES reconcile. Make observedGeneration optional in spec. Adjust docs for observedGeneration. Add .DS_Store to git ignore. Add tests for observedGeneration behavior. Add e2e test for observedGeneration. * Move observedGeneration to be more alphabetical in struct. Adjust wording for state during ES reconciliation, as it's not a pointer. * Correct Spelling * Update documentation in test * Update test comments * Update e2e test to just update annotations, not disable tls. * remove unused ctx * allow fake k8s client to be disable/enabled on demand * directive `//nolint:gosimple` is unused for linter gosimple (nolintlint) * Fix phantom lint error?? * no need for func in testing, just call DisableFailing * Remove MacOS files from gitignore. Update ObservedGeneration documentation/comments. Remove duplicative license header. Use named field in test struct. * rename test file * remove new build tag format from new e2e file. * Removing changes associated with a failing k8s client. * Update crd generation description. Remove specific es generation test. Add generation test to all es mutation tests. * Correct runtime spelling. Update final generation e2e test step to be wrapped in test.Eventually * Use errors.New when not needing formatting. * remove erroneous nolint * s/CompareClusterGenerations/CompareClusterGenerationsSteps/g * Fix indentation in state.go * Adjust ES generation tests because of recent change concerning unknown status being set initially.
This change is Elasticsearch specific at the moment
related to #3392
This change allows status.ObservedGeneration to be kept in sync with metadata.Generation according to the rules described in the above issue. This change adds a set of unit tests which show more details into when observedGeneration will, and will not be updated according to any errors that may occur during ES reconciliation. All mutated end-to-end Elasticsearch tests include steps to show how this generation/observedGeneration change is intended to function in a true cluster.