forked from fabric8io/kubernetes-client
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix fabric8io#2316: Cannot load resource from stream without apiVersion
In case of duplicate Kubernetes resources found, when no apiVersion is provided return first item found instead of null
- Loading branch information
1 parent
a0a4516
commit 492d18e
Showing
4 changed files
with
68 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
kubernetes-tests/src/test/resources/valid-deployment-without-apiversion.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"kind": "Deployment", | ||
"metadata": { | ||
"name": "test", | ||
"labels": { | ||
"app": "test" | ||
} | ||
}, | ||
"spec": { | ||
"selector": { | ||
"matchLabels": { | ||
"app": "test" | ||
} | ||
}, | ||
"replicas": 1, | ||
"template": { | ||
"metadata": { | ||
"labels": { | ||
"app": "test" | ||
} | ||
}, | ||
"spec": { | ||
"containers": [ | ||
{ | ||
"name": "test", | ||
"image": "busybox:latest", | ||
"command": [ | ||
"/bin/sh", | ||
"-c" | ||
], | ||
"args": [ | ||
"sleep 60" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |