-
Notifications
You must be signed in to change notification settings - Fork 11
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
#Opensearch: missing fields during update cluster configuration #78
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: acharviakou The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @acharviakou. Thanks for your PR. I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Thank you for the changes @acharviakou |
As I can see one test failed Should I change something? |
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.
This is great @acharviakou, thank you for contributing!
Left two inline comment.
Can you also make the PR title the same as the issue title? and move the issue number to the PR description, thanks!
@@ -16,6 +16,7 @@ package domain | |||
import ( | |||
"context" | |||
"errors" | |||
|
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.
Can we have a simple update test checking these updates work? Thanks!
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.
Thanks for comment
Should I add e2e tests like here in PR? https://github.com/aws-controllers-k8s/opensearchservice-controller/pull/67/files#diff-aee6724aa306271cdd04ef6ed757ce3f297dd5b23d0b198d5012299779261960
Should I add patch commands in the same method or create separate one?
/retest |
@acharviakou: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Hi @michaelhtm
Controller is always trying to update OpenSearch cluster because of diff in state. It means 'ACK.ResourceSynced' condition is always 'False' Behaviour a bit explained in issue description aws-controllers-k8s/community#2219
Controller create domain in AWS, but removing autoTuneOptions.desiredState from k8s manifest. This is the logic of method to create cluster. I would suggest provide nil in DesiredState update method. In such case changes will be applied to AWS resource, but field will be removed from k8s manifest to eliminate diff.
This option can help in one more case. Some instances t2,t3 does not support AutoTune in general. Reply from AWS Support
Few more info. To create OpenSearch cluster using t3 instance I have to specify "autoTuneOptions.desiredState: DISABLED" to avoid validation error. But if I am applying the same manifest one more time this field is not required Please let me know if you have another suggestion. |
Hey @acharviakou it seems like AutoTuneOptionsInput field is called DesiredState, and in output they call it state. This confused the generator, which is why it does not set it during the code-generation. Here's how you can do that: https://aws-controllers-k8s.github.io/community/docs/contributor-docs/code-generator-config/#renames-renaming-things The example is not there right now, but we would appreciate if you can send a PR with the example from this PR you made 🙂. |
Issue #2219
Description of changes:
Set missing fields during domain update operation
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.