-
Notifications
You must be signed in to change notification settings - Fork 38
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
Surface IsNotFound error in GetPreRotationTime #466
Comments
could you add a note about when that happens? trying to rotate a non-existent secret sounds weird to me, so providing more context will be helpful! |
Updated! Let me know if I should add more context 😄 |
looks good and agree it's a good first issue |
It looks like this has been completed. Can this be closed? |
how this has been completed? not sure |
@mathetake must have been an oversight. Can you assign this to me? I am already using this and would like to find a couple things to contribute to. Starting here. |
sure, feel free to raise a PR |
Description:
GetPreRotationTime
should surfaceapierrors.IsNotFound
instead of swallowing the error. Callers of the function should be in charge of handling the error.ai-gateway/internal/controller/rotators/aws_oidc_rotator.go
Lines 106 to 107 in 9efcd32
Context:
For OIDC backendSecurityPolicies, the controller is in charge of storing the temporary credentials to access the provider (AWS is only currently supported). The controller does this by storing the credentials (obtained from STS in AWS) in a Kubernetes secret. The secret will be created by the controller if it was previously deleted OR if a new BackendSecurityPolicy was created (or policy was updated to use OIDC).
[optional Relevant Links:]
This line will need to check if err is NotFound, and if so, rotate credentials.
https://github.com/envoyproxy/ai-gateway/blob/main/internal/controller/backend_security_policy.go#L97
The text was updated successfully, but these errors were encountered: