Skip to content

Commit be15ef9

Browse files
committed
bring back the auth order
1 parent 1ab9fa6 commit be15ef9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/psmdb/container.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,10 @@ func containerArgs(ctx context.Context, cr *api.PerconaServerMongoDB, replset *a
197197
"--bind_ip_all",
198198
}
199199

200+
if cr.CompareVersion("1.22.0") < 0 || replset.Configuration.IsAuthorizationEnabled() {
201+
args = append(args, "--auth")
202+
}
203+
200204
args = append(args,
201205
"--dbpath="+config.MongodContainerDataDir,
202206
"--port="+strconv.Itoa(int(replset.GetPort())),
@@ -205,10 +209,6 @@ func containerArgs(ctx context.Context, cr *api.PerconaServerMongoDB, replset *a
205209
"--relaxPermChecks",
206210
)
207211

208-
if cr.CompareVersion("1.22.0") < 0 || replset.Configuration.IsAuthorizationEnabled() {
209-
args = append(args, "--auth")
210-
}
211-
212212
name, err := replset.CustomReplsetName()
213213
if err == nil {
214214
// given that --auth option is optional, we cannot rely on the fixed hardcoded index.

0 commit comments

Comments
 (0)