This repository was archived by the owner on Apr 10, 2024. It is now read-only.
Commit 8e5f87f
authored
Work around conflicts with existing
In some environments, where the user has an existing `kubeconfig` file
with an active context using the `client-key-data` or
`client-certificate-data` fields, the `kubectl` client used in the Kube
API server readiness check does not know what certificates to use and
the API Server startup fails with the exception `JenvtestException: Kube
API Server did not start properly`.
This PR works around it by specifying the `KUBECONFIG` environment
variable to an non-existent config file when calling `kubectl` in the
readiness check. That makes the `kubectl` process not use the
pre-existing `kubeconfig` with its certificates and makes everything
work.
This is not needed is the user asks for updating the `kubeconfig` file
as in such case, the `kubeconfig` already contains the correct
configuration and no special handling is needed.
This should resolve #116
Signed-off-by: Jakub Scholz <[email protected]>kubeconfig file (#133)1 parent 3664f1a commit 8e5f87f
File tree
2 files changed
+28
-13
lines changed- core/src/main/java/io/javaoperatorsdk/jenvtest/process
2 files changed
+28
-13
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
Lines changed: 27 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
| 48 | + | |
48 | 49 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
56 | 71 | | |
57 | 72 | | |
58 | 73 | | |
| |||
0 commit comments