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

Add validation for spec.refreshAfter and min constraints for HVSA #376

Merged
merged 3 commits into from
Sep 25, 2023

Conversation

benashz
Copy link
Collaborator

@benashz benashz commented Sep 25, 2023

Ensure that only support duration string values can be set for spec.refreshAfter. This change affects VaultStaticSecret and HCPVaultSecretsApp specs.

In addition to the change above, apply a minimum constraint on the configured HVSA refreshAfter, with the default value being 30s. This value can be set from the command line option -min-refresh-after-hvsa.

Additional enhancements:

  • chart: support extending the controller.manager's args with the new extraArgs value.

Ensure that only support duration string values can be set for
spec.refreshAfter. This change affects VaultStaticSecret and
HCPVaultSecretsApp specs.

In addition to the change above, apply a minimum constraint on the
configured HVSA refreshAfter, with the default value being 30s. This
value can be set from the command line option '-min-refresh-after-hvsa'.

Additional enhancements:
- chart: support extending the controller.manager's args with the new
  extraArgs value.
@benashz benashz requested a review from a team as a code owner September 25, 2023 17:38
Copy link
Contributor

@tomhjp tomhjp left a comment

Choose a reason for hiding this comment

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

LGTM

api/v1beta1/hcpvaultsecretsapp_types.go Outdated Show resolved Hide resolved
controllers/common.go Outdated Show resolved Hide resolved
test/unit/deployment.bats Outdated Show resolved Hide resolved
- drop support for negative durations
Copy link
Contributor

@kschoche kschoche left a comment

Choose a reason for hiding this comment

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

Looks good!

- make some bats Deployment tests more deterministic
@benashz benashz merged commit acc2517 into main Sep 25, 2023
38 checks passed
@benashz benashz deleted the VAULT-20135/hvs-provide-min-polling-constraints branch September 25, 2023 21:03
@benashz benashz added this to the v0.3.0 milestone Sep 26, 2023
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.

4 participants