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
ceph: auto detect vault k/v version #8265
Conversation
6bc05b8
to
d30cedf
Compare
d30cedf
to
9e2a4a3
Compare
| backendPath = vault.DefaultBackendPath | ||
| } | ||
|
|
||
| backend := GetParam(secretConfig, vault.VaultBackendKey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to still support this if there is auto-detection? This won't have a backward compatibility issue right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoever passes a parameter expects it to be interpreted even if it happens to be incorrect. This could be useful for checking errors too.
90863ca
to
dbcdb26
Compare
dbcdb26
to
8198084
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a couple nits
4357d51
to
d4444f2
Compare
d4444f2
to
e08e7d1
Compare
| } | ||
|
|
||
| switch GetParam(securitySpec.KeyManagementService.ConnectionDetails, Provider) { | ||
| case "vault": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be an error case if the provider is not vault?
| return errors.Errorf("failed to read k8s kms secret %q key %q (not found or empty)", KMSTokenSecretNameKey, securitySpec.KeyManagementService.TokenSecretName) | ||
| secretEngine := securitySpec.KeyManagementService.ConnectionDetails[VaultSecretEngineKey] | ||
| switch secretEngine { | ||
| case VaultKVSecretEngineKey: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An error case if this is not the case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No we also support the transit engine, so we don't need to error here.
e08e7d1
to
2b741e8
Compare
Rook will now auto detect the kv version of the vault server. This allows users not having to pass the VAULT_BACKEND configuration in the CephCluster CR. Signed-off-by: Sébastien Han <seb@redhat.com>
2b741e8
to
99e00de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ceph: auto detect vault k/v version (backport #8265)
Rook will now auto detect the kv version of the vault server. This
allows users not having to pass the VAULT_BACKEND configuration in the
CephCluster CR.
Signed-off-by: Sébastien Han seb@redhat.com
Description of your changes:
Which issue is resolved by this Pull Request:
Resolves #
Checklist:
make codegen) has been run to update object specifications, if necessary.