Commit 79b593e
committed
fix: recover from panic in IsMinikubeKubernetes when kubeconfig extensions are plain strings
Some tools (e.g. Teleport) write kubeconfig cluster extensions as raw
YAML strings rather than structured objects. When devspace calls
runtime.DefaultUnstructuredConverter.ToUnstructured() on such an
extension, the k8s apimachinery reflection layer panics instead of
returning an error:
panic: reflect.Set: value of type string is not assignable to
type map[string]interface {}
Extract the per-extension check into a helper (isMinikubeExtension)
that uses recover() to catch the panic and treat unparseable extensions
as non-minikube, allowing the build to proceed normally.1 parent af83b7e commit 79b593e
1 file changed
Lines changed: 24 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
| 258 | + | |
| 259 | + | |
265 | 260 | | |
266 | 261 | | |
267 | 262 | | |
268 | 263 | | |
269 | 264 | | |
270 | 265 | | |
271 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
272 | 289 | | |
273 | 290 | | |
274 | 291 | | |
| |||
0 commit comments