Skip to content

Commit 2cd3539

Browse files
dajudgeclaude
andauthored
Fix README for 2.0.0 release (#412)
- Update version references from 1.4.6 to 2.0.0 - Replace JUnit 4 @ClassRule with JUnit 5 @Testcontainers/@container - Fix grammar: "libraries offers" -> "library offers" - Fix typo in etcd version example - Add missing <> type parameters for consistency - Update K8s version example to VERSION_1_34_0 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]>
1 parent 46d9e24 commit 2cd3539

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Kubernetes clusters for integration testing.
3131

3232
# Container Flavors
3333

34-
The Kindcontainer libraries offers three different Kubernetes container implementations:
34+
The Kindcontainer library offers three different Kubernetes container implementations:
3535

3636
* `ApiServerContainer`
3737
* `K3sContainer`
@@ -58,7 +58,7 @@ Add the Kindcontainer dependency:
5858
<dependency>
5959
<groupId>com.dajudge.kindcontainer</groupId>
6060
<artifactId>kindcontainer</artifactId>
61-
<version>1.4.6</version>
61+
<version>2.0.0</version>
6262
<scope>test</scope>
6363
</dependency>
6464
</dependencies>
@@ -75,7 +75,7 @@ repositories {
7575
}
7676
7777
dependencies {
78-
testImplementation "com.dajudge.kindcontainer:kindcontainer:1.4.6"
78+
testImplementation "com.dajudge.kindcontainer:kindcontainer:2.0.0"
7979
}
8080
```
8181

@@ -161,7 +161,7 @@ constructor. The following example illustrates this process for the `KindContain
161161
analogous for the other two containers as well.
162162

163163
```java
164-
KindContainer<?> container=new KindContainer<>(KindContainerVersion.VERSION_1_24_1);
164+
KindContainer<?> container = new KindContainer<>(KindContainerVersion.VERSION_1_34_0);
165165
```
166166

167167
## Using the `kubectl` and `helm` fluent APIs
@@ -176,8 +176,9 @@ You can use them directly during container instantiation like this:
176176

177177
```java
178178
// Kubectl example
179+
@Testcontainers
179180
public class SomeKubectlTest {
180-
@ClassRule
181+
@Container
181182
public static final ApiServerContainer<?> KUBE = new ApiServerContainer<>()
182183
.withKubectl(kubectl -> {
183184
kubectl.apply
@@ -187,8 +188,9 @@ public class SomeKubectlTest {
187188
}
188189

189190
// Helm3 example
191+
@Testcontainers
190192
public class SomeHelmTest {
191-
@ClassRule
193+
@Container
192194
public static final KindContainer<?> KUBE = new KindContainer<>()
193195
.withHelm3(helm -> {
194196
helm.repo.add.run("mittwald", "https://helm.mittwald.de");
@@ -249,7 +251,7 @@ K3sContainer<?> container = new K3sContainer<>()
249251
being used to start that support container use method `withEtcdImage()`:
250252

251253
```java
252-
ApiServerContainer<?> container = new ApiServerContainer<>().withEtcdImage(DockerImageName.parse("my-registry.com/etcd:.4.13-0"));
254+
ApiServerContainer<?> container = new ApiServerContainer<>().withEtcdImage(DockerImageName.parse("my-registry.com/etcd:3.5.12-0"));
253255
```
254256

255257
### `sshd` and `nginx` image for webhook testing
@@ -259,7 +261,7 @@ images
259261
are being used to start those support containers use the `withNginxImage()` and `withOpensshServerImage()` methods.
260262

261263
```java
262-
ApiServerContainer<?> container = new ApiServerContainer()
264+
ApiServerContainer<?> container = new ApiServerContainer<>()
263265
.withNginxImage(DockerImageName.parse("my-registry/nginx:1.23.3"))
264266
.withOpensshServerImage(DockerImageName.parse("my-registry/openssh-server:9.0_p1-r2-ls99"));
265267
```
@@ -273,7 +275,7 @@ You can use Kindcontainer to test your admission controllers.
273275

274276
Example:
275277
```java
276-
ApiServerContainer<?> container = new ApiServerContainer().withAdmissionController(admission -> {
278+
ApiServerContainer<?> container = new ApiServerContainer<>().withAdmissionController(admission -> {
277279
admission.validating() // use mutating() for a mutating admission controller
278280
.withNewWebhook("validating.kindcontainer.dajudge.com")
279281
.atPort(webhookPort)

0 commit comments

Comments
 (0)