-
Notifications
You must be signed in to change notification settings - Fork 151
K8SPSMDB-1154: disable encryption by default for inMemory #1912
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
base: main
Are you sure you want to change the base?
Conversation
pkg/apis/psmdb/v1/psmdb_defaults.go
Outdated
encryptionEnabled, err := rs.Configuration.IsEncryptionEnabled() | ||
if err != nil { | ||
return errors.Wrap(err, "failed to parse replset configuration") | ||
} | ||
if encryptionEnabled != nil && *encryptionEnabled { | ||
return errors.New("inMemory storage engine doesn't support encryption") | ||
} | ||
} |
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.
Since we already have the function func isEncryptionEnabled(cr *api.PerconaServerMongoDB, replset *api.ReplsetSpec) (bool, error) {
. I think we can utilize it for the most part of this logic by returning a verified not nil boolean.
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 to note, I think that we can move this function in psmdb_defaults
and then utilize it elsewhere in the codebase.
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.
pkg/psmdb/statefulset.go
Outdated
@@ -584,7 +584,11 @@ func isEncryptionEnabled(cr *api.PerconaServerMongoDB, replset *api.ReplsetSpec) | |||
if err != nil { | |||
return false, errors.Wrap(err, "failed to parse replset configuration") | |||
} | |||
|
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.
Since the cr is not used by this function at all, maybe we can remove it from the function signature.
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.
commit: ab1be45 |
https://perconadev.atlassian.net/browse/K8SPSMDB-1154
DESCRIPTION
Problem:
It's not possible to deploy a cluster with the
--enableEncryption
flag when theinMemory
storage engine is used.Solution:
Don't set the
--enableEncryption
flag when theinMemory
storage engine is used.CHECKLIST
Jira
Needs Doc
) and QA (Needs QA
)?Tests
compare/*-oc.yml
)?Config/Logging/Testability