Skip to content

Conversation

benashz
Copy link
Collaborator

@benashz benashz commented May 16, 2024

Previously, upon the first application of a VaultStaticSecret instance that had spec.hmacSecretData explicitly set to false, the K8s API would replace that value with default as is defined in the CRD's schema. This fix makes HMACSecretData a pointer receiver, which make K8s do the right thing.

  • add regression tests

@benashz benashz force-pushed the VAULT-27088/vss-fix-cannot-disable-hmacSecretData-on-first-apply branch from 325d198 to b876541 Compare May 16, 2024 18:05
@benashz benashz changed the title Ensure that spec.hmacSecretData's value honoured Ensure that spec.hmacSecretData's value is honoured May 16, 2024
@benashz benashz added this to the v0.7.0 milestone May 16, 2024
@benashz benashz force-pushed the VAULT-27088/vss-fix-cannot-disable-hmacSecretData-on-first-apply branch from b876541 to d7280ba Compare May 16, 2024 19:27
@benashz benashz marked this pull request as ready for review May 16, 2024 19:28
@benashz benashz requested a review from a team as a code owner May 16, 2024 19:28
Previously, upon the first application of a VaultStaticSecret instance
that had spec.hmacSecretData explicitly set to false, the K8s API would
replace that value with default as is defined in the CRD's schema. This
fix makes HMACSecretData a pointer receiver, which make K8s do the right
thing.
@benashz benashz force-pushed the VAULT-27088/vss-fix-cannot-disable-hmacSecretData-on-first-apply branch from d7280ba to 5f5de78 Compare May 16, 2024 19:30
Copy link
Collaborator

@fairclothjm fairclothjm left a comment

Choose a reason for hiding this comment

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

LGTM

@benashz
Copy link
Collaborator Author

benashz commented May 16, 2024

Thanks!

@benashz benashz merged commit 92e1eb7 into main May 16, 2024
@benashz benashz deleted the VAULT-27088/vss-fix-cannot-disable-hmacSecretData-on-first-apply branch May 16, 2024 21:03
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.

Vault operator is setting VaultStaticSecret hmacSecretData field to true
2 participants