File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -218,16 +218,20 @@ func (c ClusterConfig) NewAdminClient(
218
218
var saslUsername string
219
219
var saslPassword string
220
220
var secretsManagerArn string
221
+
222
+ overridingUserPass := false
221
223
if opts .UsernameOverride != "" {
222
224
log .Debugf ("Setting SASL username from override value" )
223
225
saslUsername = opts .UsernameOverride
226
+ overridingUserPass = true
224
227
} else {
225
228
saslUsername = c .Spec .SASL .Username
226
229
}
227
230
228
231
if opts .PasswordOverride != "" {
229
232
log .Debugf ("Setting SASL password from override value" )
230
233
saslPassword = opts .PasswordOverride
234
+ overridingUserPass = true
231
235
} else {
232
236
saslPassword = c .Spec .SASL .Password
233
237
}
@@ -238,6 +242,15 @@ func (c ClusterConfig) NewAdminClient(
238
242
} else {
239
243
secretsManagerArn = c .Spec .SASL .SecretsManagerArn
240
244
}
245
+ if overridingUserPass {
246
+ // Make sure both user and pass were provided
247
+ if saslUsername == "" || saslPassword == "" {
248
+ return nil , errors .New ("Both username and password are required when overriding config" )
249
+ } else {
250
+ log .Warn ("Username/Password override takes precedence over SecretsManagerArn" )
251
+ secretsManagerArn = ""
252
+ }
253
+ }
241
254
242
255
var saslMechanism admin.SASLMechanism
243
256
var err error
Original file line number Diff line number Diff line change 1
1
package version
2
2
3
3
// Version is the current topicctl version.
4
- const Version = "1.19.1 "
4
+ const Version = "1.19.2 "
You can’t perform that action at this time.
0 commit comments