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
{{ message }}
This repository was archived by the owner on Apr 10, 2024. It is now read-only.
jenvtest is a relatively simple test that support integration testing with Kubernetes API Server.
4
+
The whole concept and implementation is relatively simple, this doc describes some high level concepts
5
+
and provides some more detailed information.
2
6
3
7
## Configuration Options
4
8
9
+
See available configuration options documented in [KubeAPIServerConfig](https://github.com/java-operator-sdk/jenvtest/blob/main/core/src/main/java/io/javaoperatorsdk/jenvtest/KubeAPIServerConfig.java#L6-L6)
5
10
11
+
Not all those properties can be overridden using [`@EnableKubeAPIServer`](https://github.com/java-operator-sdk/jenvtest/blob/main/core/src/main/java/io/javaoperatorsdk/jenvtest/junit/EnableKubeAPIServer.java)
12
+
annotation, since might not make sense to do it for an individual test case. However, those can be passed to
and also configured globally using environment variables, see [KubeAPIServerConfigBuilder](https://github.com/java-operator-sdk/jenvtest/blob/main/core/src/main/java/io/javaoperatorsdk/jenvtest/KubeAPIServerConfigBuilder.java)
6
15
16
+
### Updating kube config file
7
17
18
+
In general, it is not advised but if instructed kube config file (~/kube/config) is updated by the framework.
19
+
See related property in [`@EnableKubeAPIServer`](https://github.com/java-operator-sdk/jenvtest/blob/main/core/src/main/java/io/javaoperatorsdk/jenvtest/junit/EnableKubeAPIServer.java#L27-L27)
20
+
annotation. The config file is automatically cleaned up on stop.
8
21
9
22
## How does it work
10
23
11
24
In the background Kubernetes and etcd (and kubectl) binaries are downloaded if not found locally.
12
-
13
-
All the certificates for the Kube API Server and for the client is generated. The client config file
14
-
(`~/kube/config`) file is updated, to any client can be used to talk to the API Server.
25
+
All the certificates for the Kube API Server and for the client is generated.
26
+
The client certificates are generated with group `system:masters`;
15
27
16
28
## Downloading binaries
17
29
@@ -20,4 +32,4 @@ If there are multiple binaries found, the latest if selected (unless a target ve
20
32
21
33
Also [`setup-envtest`](https://pkg.go.dev/sigs.k8s.io/controller-runtime/tools/setup-envtest#section-readme) can be used
22
34
to download binaries manually. By executing `setup-envtest use --bin-dir ~/.jenvtest` will download the latest required
23
-
binaries to the default directory. This is useful if always running the tests in offline mode.
35
+
binaries to the default directory. This is useful if always running the tests in offline mode.
0 commit comments