Skip to content
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 AWS API throttling #2218

Open
acharviakou opened this issue Nov 26, 2024 · 0 comments
Open

Opensearch AWS API throttling #2218

acharviakou opened this issue Nov 26, 2024 · 0 comments

Comments

@acharviakou
Copy link

acharviakou commented Nov 26, 2024

Describe the bug
Opensearch controller send a lot of requests to AWS API even if no changes expected
Can be related to requeue_on_success_seconds: 60
https://github.com/aws-controllers-k8s/opensearchservice-controller/blob/main/generator.yaml#L30

We have more than 30 clusters. Controller is running in each cluster. Account reach Opensearch API "Rate exceeded" error
Controller logs

2024-11-26T13:46:35.898Z	DEBUG	ackrt	> r.Sync	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "generation": 3}
2024-11-26T13:46:35.898Z	DEBUG	ackrt	>> r.resetConditions	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "generation": 3}
2024-11-26T13:46:35.898Z	DEBUG	ackrt	<< r.resetConditions	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "generation": 3}
2024-11-26T13:46:35.898Z	DEBUG	ackrt	>> rm.ResolveReferences	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:35.898Z	DEBUG	ackrt	<< rm.ResolveReferences	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:35.898Z	DEBUG	ackrt	>> rm.EnsureTags	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:35.898Z	DEBUG	ackrt	<< rm.EnsureTags	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:35.898Z	DEBUG	ackrt	>> rm.ReadOne	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:35.898Z	DEBUG	ackrt	>>> rm.sdkFind	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:36.018Z	DEBUG	ackrt	<<< rm.sdkFind	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:36.018Z	DEBUG	ackrt	<< rm.ReadOne	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:36.018Z	DEBUG	ackrt	>> r.updateResource	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:36.018Z	DEBUG	ackrt	<< r.updateResource	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:36.018Z	DEBUG	ackrt	>> r.lateInitializeResource	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:36.018Z	DEBUG	ackrt	>>> rm.LateInitialize	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:36.018Z	DEBUG	ackrt	no late initialization required.	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:36.018Z	DEBUG	ackrt	<<< rm.LateInitialize	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:36.018Z	DEBUG	ackrt	>>> r.patchResourceMetadataAndSpec	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:36.018Z	DEBUG	ackrt	no difference found between metadata and spec for desired and latest object.	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:36.018Z	DEBUG	ackrt	<<< r.patchResourceMetadataAndSpec	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:36.018Z	DEBUG	ackrt	<< r.lateInitializeResource	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:36.018Z	DEBUG	ackrt	>> r.ensureConditions	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:36.018Z	DEBUG	ackrt	<< r.ensureConditions	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:36.018Z	DEBUG	ackrt	< r.Sync	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:36.018Z	DEBUG	ackrt	requeuing	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3, "after": "1m0s"}
2024-11-26T13:46:36.018Z	DEBUG	ackrt	> r.patchResourceStatus	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:36.018Z	DEBUG	ackrt	>> kc.Patch (status)	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:36.035Z	DEBUG	ackrt	patched resource status	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3, "json": "{\"metadata\":{\"resourceVersion\":\"541453881\"},\"spec\":{\"tags\":[{\"key\":\"Name\",\"value\":\"os-d-test\"},{\"key\":\"Service\",\"value\":\"test-service\"},{\"key\":\"CreatedBy\",\"value\":\"EKS ACK\"},{\"key\":\"Owner\",\"value\":\"charviakoua\"},{\"key\":\"Environment\",\"value\":\"d\"}]},\"status\":{\"changeProgressDetails\":{\"lastUpdatedTime\":\"2024-11-26T13:46:17Z\"},\"conditions\":[{\"lastTransitionTime\":\"2024-11-26T13:46:36Z\",\"status\":\"True\",\"type\":\"ACK.ResourceSynced\"}],\"endpoints\":{\"vpc\":\"vpc-os-d-test-dfdffsdfsrtwrefsd24y.REGION_NAME.es.amazonaws.com\"}}}"}
2024-11-26T13:46:36.035Z	DEBUG	ackrt	<< kc.Patch (status)	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:36.035Z	DEBUG	ackrt	< r.patchResourceStatus	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3}
2024-11-26T13:46:36.035Z	DEBUG	ackrt	requeueing	{"kind": "Domain", "namespace": "test", "name": "os-d-test", "account": "ACCOUNT_ID", "role": "", "region": "REGION_NAME", "is_adopted": false, "generation": 3, "after": "1m0s"}

Steps to reproduce

Expected outcome
Ideally ACK should not send a lot of requests to AWS API every minute
Reduce number of API Calls

Environment
K8s 1.31
eks.12
OpenSearch domain
public.ecr.aws/aws-controllers-k8s/opensearchservice-controller:1.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant