Skip to content

Commit

Permalink
Fix defaulting ClusterAuthMode (#426)
Browse files Browse the repository at this point in the history
ClusterAuthMode can't be set to `x509` when sslMode is `allowSSL`.
  • Loading branch information
the-redback authored and tamalsaha committed Aug 1, 2019
1 parent b750710 commit 3ee2a59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apis/kubedb/v1alpha1/mongodb_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ func (m *MongoDBSpec) SetDefaults() {
}

if (m.ReplicaSet != nil || m.ShardTopology != nil) && m.ClusterAuthMode == "" {
if m.SSLMode == SSLModeDisabled {
if m.SSLMode == SSLModeDisabled || m.SSLMode == SSLModeAllowSSL {
m.ClusterAuthMode = ClusterAuthModeKeyFile
} else {
m.ClusterAuthMode = ClusterAuthModeX509
Expand Down

0 comments on commit 3ee2a59

Please sign in to comment.