Add doc information about useLegacyBundleCaStorage (#15303)

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
This commit is contained in:
Alexander Scheel 2022-05-11 13:02:46 -04:00 committed by GitHub
parent 435450ea6f
commit 8695b6cca6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -317,6 +317,14 @@ func (b *backend) initialize(ctx context.Context, _ *logical.InitializationReque
} }
func (b *backend) useLegacyBundleCaStorage() bool { func (b *backend) useLegacyBundleCaStorage() bool {
// This helper function is here to choose whether or not we use the newer
// issuer/key storage format or the older legacy ca bundle format.
//
// This happens because we might've upgraded secondary PR clusters to
// newer vault code versions. We still want to be able to service requests
// with the old bundle format (e.g., issuing and revoking certs), until
// the primary cluster's active node is upgraded to the newer Vault version
// and the storage is migrated to the new format.
version := b.pkiStorageVersion.Load() version := b.pkiStorageVersion.Load()
return version == nil || version == 0 return version == nil || version == 0
} }