You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/modules/redpanda.md
+71
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,8 @@ If you need to enable TLS use `WithTLS` with a valid PEM encoded certificate and
61
61
62
62
#### AdditionalListener
63
63
64
+
- Since testcontainers-go <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.28.0"><span class="tc-version">:material-tag: v0.28.0</span></a>
65
+
64
66
There are scenarios where additional listeners are needed, for example if you
65
67
want to consume/from another container in the same network
66
68
@@ -79,12 +81,77 @@ Produce messages using the new registered listener
79
81
[Produce/consume via registered listener](../../modules/redpanda/redpanda_test.go) inside_block:withListenerExec
80
82
<!--/codeinclude-->
81
83
84
+
#### AddingServiceAccounts
85
+
86
+
- Since testcontainers-go <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
87
+
88
+
It's possible to add service accounts to the Redpanda container using the `WithNewServiceAccount` option, setting the service account name and its password.
89
+
E.g. `WithNewServiceAccount("service-account", "password")`.
90
+
91
+
#### Adding Super Users
92
+
93
+
- Since testcontainers-go <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
94
+
95
+
When a super user is needed, you can use the `WithSuperusers` option, passing a variadic list of super users.
96
+
E.g. `WithSuperusers("superuser-1", "superuser-2")`.
97
+
98
+
#### Enabling SASL
99
+
100
+
- Since testcontainers-go <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
101
+
102
+
The `WithEnableSASL()` option enables SASL scram sha authentication. By default, no authentication (plaintext) is used.
103
+
When setting an authentication method, make sure to add users as well and authorize them using the `WithSuperusers()` option.
104
+
105
+
#### WithEnableKafkaAuthorization
106
+
107
+
- Since testcontainers-go <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
108
+
109
+
The `WithEnableKafkaAuthorization` enables authorization for connections on the Kafka API.
110
+
111
+
#### WithEnableWasmTransform
112
+
113
+
- Since testcontainers-go <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.28.0"><span class="tc-version">:material-tag: v0.28.0</span></a>
114
+
115
+
The `WithEnableWasmTransform` enables wasm transform.
116
+
117
+
!!!warning
118
+
Should not be used with RP versions before 23.3
119
+
120
+
#### WithEnableSchemaRegistryHTTPBasicAuth
121
+
122
+
- Since testcontainers-go <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
123
+
124
+
The `WithEnableSchemaRegistryHTTPBasicAuth` enables HTTP basic authentication for the Schema Registry.
125
+
126
+
#### WithAutoCreateTopics
127
+
128
+
- Since testcontainers-go <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.22.0"><span class="tc-version">:material-tag: v0.22.0</span></a>
129
+
130
+
The `WithAutoCreateTopics` option enables the auto-creation of topics.
131
+
132
+
#### WithTLS
133
+
134
+
- Since testcontainers-go <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.24.0"><span class="tc-version">:material-tag: v0.24.0</span></a>
135
+
136
+
The `WithTLS` option enables TLS encryption. It requires a valid PEM encoded certificate and key, passed as byte slices.
137
+
E.g. `WithTLS([]byte(cert), []byte(key))`.
138
+
139
+
#### WithBootstrapConfig
140
+
141
+
- Since testcontainers-go <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.33.0"><span class="tc-version">:material-tag: v0.33.0</span></a>
142
+
143
+
`WithBootstrapConfig` adds an arbitrary config key-value pair to the Redpanda container. Per the name, this config will be interpolated into the generated bootstrap
144
+
config file, which is particularly useful for configs requiring a restart when otherwise applied to a running Redpanda instance.
145
+
E.g. `WithBootstrapConfig("config_key", config_value)`, where `config_value` is of type `any`.
146
+
82
147
### Container Methods
83
148
84
149
The Redpanda container exposes the following methods:
85
150
86
151
#### KafkaSeedBroker
87
152
153
+
- Since testcontainers-go <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
154
+
88
155
KafkaSeedBroker returns the seed broker that should be used for connecting
89
156
to the Kafka API with your Kafka client. It'll be returned in the format:
90
157
"host:port" - for example: "localhost:55687".
@@ -95,6 +162,8 @@ to the Kafka API with your Kafka client. It'll be returned in the format:
95
162
96
163
#### SchemaRegistryAddress
97
164
165
+
- Since testcontainers-go <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
166
+
98
167
SchemaRegistryAddress returns the address to the schema registry API. This
99
168
is an HTTP-based API and thus the returned format will be: http://host:port.
100
169
@@ -105,6 +174,8 @@ is an HTTP-based API and thus the returned format will be: http://host:port.
105
174
106
175
#### AdminAPIAddress
107
176
177
+
- Since testcontainers-go <a href="https://github.com/testcontainers/testcontainers-go/releases/tag/v0.20.0"><span class="tc-version">:material-tag: v0.20.0</span></a>
178
+
108
179
AdminAPIAddress returns the address to the RedpandaAdminAPI. This
109
180
is an HTTP-based API and thus the returned format will be: http://host:port.
0 commit comments