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

ngrok API Update isn't triggered when secrets change #177

Open
alex-bezek opened this issue Mar 13, 2023 · 1 comment
Open

ngrok API Update isn't triggered when secrets change #177

alex-bezek opened this issue Mar 13, 2023 · 1 comment
Labels
area/controller Issues dealing with the controller bug Something isn't working priority/medium

Comments

@alex-bezek
Copy link
Collaborator

What happened

Some of the route-module CRD's now reference k8s secrets by name. If a secret is updated though, it won't pickup the change automatically. Since right now, we only synchronize the data when the sync function is triggered, which happens when ingress objects change, this doesn't happen until either another change happens, or the default multi-hour sync period triggers.

What you think should happen instead

When the secret is updated, we should quickly realize and update the resource in the ngrok api. 2 approaches come to mind:

How to reproduce

Create a EndpointWebhookVerification endpoint with a secret, confirm it works, update the secret and see the ngrok api isn't updated until something triggers a reconciliation.

@alex-bezek alex-bezek added bug Something isn't working area/controller Issues dealing with the controller needs-triage Issues that need triage labels Mar 13, 2023
@alex-bezek
Copy link
Collaborator Author

One problem with watching secrets from the https edges controller is that could watch lots of unnecessary secrets and cause a lot of unnecessary calls to the ngrok api since the edge controller is not batched via the store. An alternative approach would be for the ingress controller to:

  • in the driver/store when its building the desired edge objects
  • for each moduleset on an edge, find all reference secrets
  • take all the secrets metadata.resourceVersion fields, combine and hash them, and put an annotation on the httpsedge crd
  • so if the secrets don't change, the hash remains the same. If the secrets change, the version id in k8s for the secret will update, resulting in a new hash, a new annotation, and a trigger of the reconciliation loop for the https edge controller

@alex-bezek alex-bezek added priority/medium and removed needs-triage Issues that need triage labels Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controller Issues dealing with the controller bug Something isn't working priority/medium
Projects
None yet
Development

No branches or pull requests

1 participant