-
Notifications
You must be signed in to change notification settings - Fork 157
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
encryption: add test helpers #583
encryption: add test helpers #583
Conversation
f994ef0
to
616a0e0
Compare
} | ||
|
||
func actionString(a clientgotesting.Action) string { | ||
return a.GetVerb() + ":" + a.GetResource().Resource + ":" + a.GetNamespace() |
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.
do we want to validate resource names in the future?
if len(grs) > 0 { | ||
migratedResourceBytes, err := json.Marshal(migratedGroupResources{Resources: grs}) | ||
if err != nil { | ||
panic(err) |
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 hope that the error will be meaningful
func createEncryptionCfgWithWriteKey(keysResources []encryptionKeysResourceTuple) *apiserverconfigv1.EncryptionConfiguration { | ||
configurations := []apiserverconfigv1.ResourceConfiguration{} | ||
for _, keysResource := range keysResources { | ||
// TODO allow secretbox -> not sure if encryptionKeysResourceTuple makes sense |
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.
nit: we could remove it since secretbox
is disabled anyway - https://github.com/enj/cluster-kube-apiserver-operator/blob/enj/f/enc_config_ref7/pkg/operator/encryption/key_controller_encryption.go#L248
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: p0lyn0mial, sttts The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
No description provided.