Skip to content

Commit e28c5c0

Browse files
authored
Merge pull request #1395 from yue9944882/bugfix/misses-api-discovery
Fixes a few places where the api-discovery is missed
2 parents 2c9b25d + 73651fc commit e28c5c0

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

extended/src/main/java/io/kubernetes/client/extended/kubectl/KubectlCordon.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public class KubectlCordon extends Kubectl.ResourceBuilder<V1Node, KubectlCordon
3434

3535
@Override
3636
public V1Node execute() throws KubectlException {
37+
refreshDiscovery();
3738
return performCordon();
3839
}
3940

extended/src/main/java/io/kubernetes/client/extended/kubectl/KubectlGet.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ public KubectlGetSingle name(String name) {
5757

5858
@Override
5959
public List<ApiType> execute() throws KubectlException {
60+
refreshDiscovery();
61+
6062
GenericKubernetesApi<ApiType, ? extends KubernetesListObject> api =
6163
apiTypeListClass == null
6264
? getGenericApi(apiTypeClass)

extended/src/main/java/io/kubernetes/client/extended/kubectl/KubectlPatch.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public KubectlPatch patchType(String patchType) {
4141

4242
@Override
4343
public ApiType execute() throws KubectlException {
44+
refreshDiscovery();
45+
4446
GenericKubernetesApi genericKubernetesApi = getGenericApi();
4547
if (ModelMapper.isNamespaced(apiTypeClass)) {
4648
return (ApiType) genericKubernetesApi.patch(namespace, name, patchType, patchContent);

0 commit comments

Comments
 (0)