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

Refactor ConfigMap and Secret resolvers and use controller.WithOnlyMetadata predicate #1545

Open
ciarams87 opened this issue Feb 7, 2024 · 2 comments
Labels
area/performance Performance related backlog Currently unprioritized work. May change with user feedback or as the product progresses.

Comments

@ciarams87
Copy link
Member

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:

  • Use controller.WithOnlyMetadata predicate for Secrets and ConfigMaps
  • Move the *resolvers to the resolver package
  • Refactor and dedupe the resolvers where necessary
@ciarams87 ciarams87 added the enhancement New feature or request label Feb 7, 2024
@pleshakov pleshakov added area/performance Performance related and removed area/performance Performance related labels Feb 12, 2024
@pleshakov
Copy link
Contributor

Related to #1487
Related to #1425

@pleshakov pleshakov added area/performance Performance related and removed enhancement New feature or request labels Feb 12, 2024
@pleshakov pleshakov added this to the v2.1.0 milestone Feb 12, 2024
@mpstefan
Copy link
Collaborator

mpstefan commented Jun 4, 2024

Placing this into the backlog unless there's a strong reason to include it within a near-future release.

@mpstefan mpstefan removed this from the v1.4.0 milestone Jun 4, 2024
@mpstefan mpstefan added the backlog Currently unprioritized work. May change with user feedback or as the product progresses. label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/performance Performance related backlog Currently unprioritized work. May change with user feedback or as the product progresses.
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants