Commit 4c63bd5
Fix SSA BadRequestError by stripping server-managed fields
When objects are loaded from the Kubernetes API via load(), they include
server-managed fields (managedFields, creationTimestamp, generation,
resourceVersion, uid, selfLink, status). Server-side apply (SSA) rejects
requests that include these fields.
Added _strip_server_managed_fields() helper that removes these fields
before making SSA calls. Applied to both customobject.py:patch() and
kubeobject.py:update() methods.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent ce44855 commit 4c63bd5
File tree
2 files changed
+41
-4
lines changed- docker/mongodb-kubernetes-tests/kubeobject
2 files changed
+41
-4
lines changedLines changed: 34 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
8 | 9 | | |
9 | 10 | | |
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 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
11 | 41 | | |
12 | 42 | | |
13 | 43 | | |
| |||
132 | 162 | | |
133 | 163 | | |
134 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
135 | 168 | | |
136 | 169 | | |
137 | 170 | | |
138 | | - | |
| 171 | + | |
139 | 172 | | |
140 | 173 | | |
141 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
107 | | - | |
108 | | - | |
109 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
110 | 114 | | |
111 | 115 | | |
112 | 116 | | |
| |||
0 commit comments