Skip to content

Commit 17d49c2

Browse files
authored
Ssingudasu/bug fix conn timeout flag (#203)
* Bug fix conn timeout for cluster config * Bug fix conn timeout for cluster config
1 parent 757a906 commit 17d49c2

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

cmd/topicctl/subcmd/shared.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ func (s sharedOptions) getAdminClient(
125125
UsernameOverride: s.saslUsername,
126126
PasswordOverride: s.saslPassword,
127127
SecretsManagerArnOverride: s.saslSecretsManagerArn,
128+
KafkaConnTimeout: s.connTimeout,
128129
},
129130
)
130131
} else if s.brokerAddr != "" {

pkg/config/cluster.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ type AdminClientOpts struct {
203203
UsernameOverride string
204204
PasswordOverride string
205205
SecretsManagerArnOverride string
206+
KafkaConnTimeout time.Duration
206207
}
207208

208209
// NewAdminClient returns a new admin client using the parameters in the current cluster config.
@@ -268,6 +269,7 @@ func (c ClusterConfig) NewAdminClient(
268269
Password: saslPassword,
269270
SecretsManagerArn: secretsManagerArn,
270271
},
272+
ConnTimeout: opts.KafkaConnTimeout,
271273
},
272274
ExpectedClusterID: c.Spec.ClusterID,
273275
ReadOnly: opts.ReadOnly,
@@ -284,6 +286,7 @@ func (c ClusterConfig) NewAdminClient(
284286
ExpectedClusterID: c.Spec.ClusterID,
285287
Sess: sess,
286288
ReadOnly: opts.ReadOnly,
289+
KafkaConnTimeout: opts.KafkaConnTimeout,
287290
},
288291
)
289292
}

0 commit comments

Comments
 (0)