-
Notifications
You must be signed in to change notification settings - Fork 191
Disk encryption e2e tests ci cluster creation and tests #1822
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
Disk encryption e2e tests ci cluster creation and tests #1822
Conversation
|
Please rebase pull request. |
d4cbb97 to
cf4a7d8
Compare
cf4a7d8 to
5b63c3d
Compare
| diskEncryptionSet, err := clients.DiskEncryptionSets.Get(ctx, vnetResourceGroup, fmt.Sprintf("%s-disk-encryption-set", vnetResourceGroup)) | ||
| Expect(err).NotTo(HaveOccurred()) | ||
| expectedResourceIDs = append(expectedResourceIDs, strings.ToLower(*diskEncryptionSet.ID)) | ||
|
|
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.
This solves work item 12050816. I assigned it to you.
m1kola
left a comment
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.
How does this work?
I see that in CI we create KV, key, disk encrpyiont set and they get deleted together with vnetResourceGroup.
When not in CI:
-
What is the experience with
go run ./hack/cluster create?which in case of our testing environment is either a shared key from the shared keyvault, or a generated one in case of CI.
Do I undersntad correctly that we use resources from the shared environemnt and only add
Microsoft.KeyVault/vaults/accessPolicies? If so, I think there is mismatch in names between this PR and #1793. For example, key vault name isconcat(take(resourceGroup().name,15), '-sharedKV')vsfmt.Sprintf("%s%s", vnetResourceGroup, sharedKeyVaultNameSuffix)in this PR. -
What is the experience with
go run ./hack/cluster delete?
Do I understand correctly that we don't have to delete anything when not in CI because we use shared kv, key and disk encryption set?
3c19a43 to
2569226
Compare
|
Regarding the questions:
|
m1kola
left a comment
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.
I only have one question about condition for KV access policy (diskEncryptionKeyVaultAccessPolicy). Just double checking. If we actually don't need it - I'm happy to merge it as is.
Rest of the comments - let's create a small PR for them. These are 5 minutes changes and I don't want to hold this PR any longer becuase of them.
2569226 to
8499c97
Compare
m1kola
left a comment
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.
Great job! I think this is ready to be merged once e2es are green 🎉
Reminder to myself: squash on merge.
Which issue this PR addresses:
Second part of:
https://msazure.visualstudio.com/AzureRedHatOpenShift/_workitems/edit/7404076
What this PR does / why we need it:
This PR adds tests for end-to-end disk encryption. When creating a cluster in CI or via local deployment, all data and OS disks are encrypted with customer-owned keys, which in case of our testing environment is either a shared key from the shared keyvault, or a generated one in case of CI. The tests in this PR make sure that the default storage class uses disk encryption, and that all OS disks are encrypted.
Is there any documentation that needs to be updated for this PR?
no, everything works under the hood