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

Nr 116101 - Make TTL not mandatory in secret management command #1939

Conversation

rahulreddy15
Copy link
Contributor

Scenarios handled:

If ttl is not present: use default ( DefaultTTL is used and a warning is logged to provide TTL )

If ttl is present and valid: override default ( wask as usual )

If ttl is present and invalid: throw an error ( Invalid TTL value throws error ErrTTLInvalid and agent does not start.

@rahulreddy15 rahulreddy15 requested review from DavSanchez and a team October 23, 2024 06:35
DavSanchez
DavSanchez previously approved these changes Oct 23, 2024
Copy link
Contributor

@DavSanchez DavSanchez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great! Just added a nit but overall LGTM!

pkg/databind/pkg/databind/cache.go Outdated Show resolved Hide resolved
DavSanchez
DavSanchez previously approved these changes Oct 24, 2024
Copy link
Contributor

@DavSanchez DavSanchez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

pkg/databind/pkg/databind/binder_test.go Outdated Show resolved Hide resolved
@rahulreddy15 rahulreddy15 force-pushed the NR-116101-make-ttl-not-mandatory-in-secret-management-command branch from 714122e to c013771 Compare October 24, 2024 11:23
rahulreddy15 and others added 7 commits October 24, 2024 16:57
…by the ValuesWithTTL interface

cache.go - gatherer supports 'no ttl' and 'invalid ttl' values by just defaulting to defaultTTL

binder.go - had to move errors to command.go to avoid creating a cycle dependency

binder_test.go and command_test.go have been modified to test new functionality
Cannot multiply defaultVariablesTTL with time.Second because defaultVariablesTTL is already a time.Duration object.
@rahulreddy15 rahulreddy15 force-pushed the NR-116101-make-ttl-not-mandatory-in-secret-management-command branch from 765261f to 361b75c Compare October 24, 2024 11:29
@rahulreddy15 rahulreddy15 merged commit 4bd1636 into master Oct 24, 2024
9 checks passed
@rahulreddy15 rahulreddy15 deleted the NR-116101-make-ttl-not-mandatory-in-secret-management-command branch October 24, 2024 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants