AWSMachine metadata can exceed safe sizes due to cluster-api-provider-aws-last-applied-tags values #4530
Labels
kind/bug
Categorizes issue or PR as related to a bug.
priority/important-soon
Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
/kind bug
What steps did you take and what happened:
AWSMachine annotation values for
sigs.k8s.io/cluster-api-provider-aws-last-applied-tags
seem to accumulate and never be cleared or reset when volumes are removed for a machine. This results in problems for longer-lived awsmachines, especially if they are used in a context with frequent volume churn (Gitlab CI), because this annotation value can become excessively large. We have several dozen AWSMachines where this value exceeds 20k length:Today we noticed three cases where the value exceeded 250k length, which prevented the resources from being converted to older versions by the conversion webhook:
What did you expect to happen:
The number of elements stored in the
sigs.k8s.io/cluster-api-provider-aws-last-applied-tags
should match the number of volumes the correspondingnode
resource has attached. On one of the problematic AWSMachine resources, there were 1907 distinct volumes ids saved in the annotation values, but only 2 volumes present on the node.Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:
kubectl version
): 1.24.14/etc/os-release
): Ubuntu 20.04.6 LTSThe text was updated successfully, but these errors were encountered: