You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
During syncing we read all the resources from the cluster. This causes a spike in memory consumption for clusters with a lot of resources (see #2633 ).
We read all the resources at once to check for ignore annotations:
The ideal solution would be to query resources by annotation, but Kubernetes doesn't support this.
To improve this, we could either or:
Get only the resources whose annotations we explicitly need to check, on demand. This may be tricky, since we don't currently keep track of apiVersions in the resource IDs.
(1) may result in an increase of cluster queries (since we may be syncing more individual resources than api groups exist in the cluster). We could create a smart query by api group, but only including relevant api groups (i.e. only groups including one of the resources we want to sync).
To save memory, we could only keep the ignore annotation of resources. When querying by api-group, this won't help that much without quite a bit of effort (to make sure that the k8s client only deserializes the annotations), otherwise Flux will still need enough memory to hold all the resources in an api group.
We could only care about ignoring resources previously created by Flux (by reusing the selector query used by garbage collection). This would allow us to considerably reduce the amount of resources deserialized. As a downside, a user won't be able indicate that a manually created cluster resource should be ignored by Flux when given the same resource in git.
The text was updated successfully, but these errors were encountered:
During syncing we read all the resources from the cluster. This causes a spike in memory consumption for clusters with a lot of resources (see #2633 ).
We read all the resources at once to check for
ignore
annotations:flux/pkg/cluster/kubernetes/sync.go
Lines 55 to 57 in dc8c1b9
The ideal solution would be to query resources by annotation, but Kubernetes doesn't support this.
To improve this, we could either or:
apiVersion
s in the resource IDs.The text was updated successfully, but these errors were encountered: