Commit 861bd5a
authored
Add Kubernetes AgentInterface E2E backend (#24639)
* Add Kubernetes Agent E2E backend
* Use draft PR number for changelogs
* Remove unused Velero Kind port mapping
* Use shared named-port discovery helper
* Test generated discovery behavior
* Test generated discovery through public contract
* Extract Velero migration into stacked PR
* Encapsulate Agent backend startup policy
* Add Kubernetes discovery candidate stability helper
* Document Kubernetes candidate stability support
* Clean up unsupported CI environments
* Clarify Agent interface creation
* refactor(e2e): move Kubernetes discovery helper to consumer PR
* refactor(e2e): avoid caching Kubernetes Agent properties
* Restore unsupported CI backend state handling
* Clarify Kubernetes Agent constraints
* refactor(ddev): use singular Agent build config keys
* Remove Kubernetes Agent pod label option
* Remove custom Kubernetes Agent namespace option
* Deduplicate Agent log commands
* Simplify Kubernetes metadata access
* refactor(ddev): remove Kubernetes Agent owner ID
* Simplify Kubernetes Agent cluster ownership
* Update logs tests to Python 3.13
* Refine Kubernetes command contract tests
* Test Kubernetes topology command directly
* Reject non-Kind Kubernetes Agent contexts
* Relax Kubernetes orchestration assertions
* Update Kubernetes Agent description for E2E tests
* Simplify Kubernetes local package metadata
* Restore environment state cleanup ordering
* Wait for Kubernetes Agent before restart
* Fail fast on unsupported Agent supervision
* Simplify Kubernetes Agent restart checks
* Keep Kubernetes Agent restarts repeatable
* Detect Kubernetes Agent container state loss
* Rename Kubernetes Agent module constants
* Update Kubernetes node support description
Clarified the implementation details regarding Kubernetes node support.
* Decouple Kubernetes Agent tests from commands
* Expose shared Agent image normalization
* Require a Kubernetes metadata mapping
Reading self.metadata['kubernetes'] unguarded turned a missing metadata
block into a bare KeyError, so an environment that selects agent_type
'kubernetes' without the accompanying mapping failed with 'Unable to
start the Agent: kubernetes' and gave a raw traceback from ddev env
shell, which only handles CalledProcessError.
Validate the mapping where it is read so the failure names the missing
contract instead.
* Stamp the prepared marker before restarting the Agent
start() stamped PREPARED_MARKER after _restart_agent_process(), so a
container replaced during the restart was marked prepared. The marker
lives in the container filesystem and the pod declares no volumes, so a
replacement loses the copied conf.yaml, auto_conf.yaml and the editable
installs, while _wait_for_agent() still succeeds against the fresh
container. Every later _require_prepared() check then passed and tests
silently exercised the Agent-shipped integration with no configuration.
Stamp the marker once preparation is complete and assert it after the
restart, matching the invariant restart() already relies on. Checking
after the stamp instead would only observe the gap between the two
commands.
* Share Agent image normalization through the interface
* Clarify the prepared marker invariant
* Move Agent image normalization to a shared module
* Fail fast on unsupported Kubernetes Agent inputs
* Clarify shared-log backend limitation
* Preserve Agent check failures during config cleanup
* Clarify current Kubernetes Agent limitations
* Keep kubectl warnings out of structured output1 parent e681f1e commit 861bd5a
24 files changed
Lines changed: 1416 additions & 80 deletions
File tree
- datadog_checks_dev
- changelog.d
- datadog_checks/dev/plugin
- ddev
- changelog.d
- src/ddev
- cli/env
- e2e/agent
- tests
- cli/env
- e2e/agent
- docs/developer/ddev
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
223 | 226 | | |
224 | 227 | | |
225 | 228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
52 | 64 | | |
53 | 65 | | |
54 | 66 | | |
| |||
79 | 91 | | |
80 | 92 | | |
81 | 93 | | |
82 | | - | |
| 94 | + | |
83 | 95 | | |
84 | | - | |
85 | 96 | | |
86 | 97 | | |
87 | 98 | | |
| |||
91 | 102 | | |
92 | 103 | | |
93 | 104 | | |
94 | | - | |
95 | | - | |
| 105 | + | |
96 | 106 | | |
97 | 107 | | |
98 | 108 | | |
| |||
131 | 141 | | |
132 | 142 | | |
133 | 143 | | |
| 144 | + | |
134 | 145 | | |
135 | 146 | | |
136 | 147 | | |
| |||
141 | 152 | | |
142 | 153 | | |
143 | 154 | | |
| 155 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | | - | |
34 | | - | |
| 32 | + | |
35 | 33 | | |
36 | 34 | | |
37 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | | - | |
36 | | - | |
| 34 | + | |
37 | 35 | | |
38 | 36 | | |
39 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
| |||
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
155 | 156 | | |
156 | 157 | | |
157 | | - | |
| 158 | + | |
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
| 166 | + | |
| 167 | + | |
165 | 168 | | |
166 | 169 | | |
167 | 170 | | |
| |||
0 commit comments