Refactor ConfigMap and Secret resolvers and use controller.WithOnlyMetadata
predicate
#1545
Labels
area/performance
Performance related
backlog
Currently unprioritized work. May change with user feedback or as the product progresses.
Currently, we cache all the Secrets in the cluster., and ConfigMaps when the experimental Gateway API features are enabled, in NGF. This can lead to unnecessary memory consumption, as we only need to store any referenced resources. A better approach would be to use the
controller.WithOnlyMetadata()
predicate and then fetch the required resources when they are referenced.Additionally, the secret and configmap resolvers are in the graph package, but we have a resolver package which would be more logical for them to reside. There's also an opportunity for the resolvers to be refactored to deduplicate functionality. Moving the resolvers to the resolver package also simplifies passing the k8s client to the resolvers, which is required when using the
controller.WithOnlyMetadata
predicate as the referenced resources need to be fetched from the API by the resolver.AC:
controller.WithOnlyMetadata
predicate for Secrets and ConfigMapsThe text was updated successfully, but these errors were encountered: