Skip to content

Commit 8f2652d

Browse files
committed
Revert "Modified TIMEOUT VALUE"
This reverts commit 95eb094.
1 parent 95eb094 commit 8f2652d

File tree

1 file changed

+4
-5
lines changed
  • examples/src/main/java/io/kubernetes/client/examples

1 file changed

+4
-5
lines changed

examples/src/main/java/io/kubernetes/client/examples/Example.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ public class Example {
4545

4646
private final CoreV1Api corev1Api;
4747
private final static String DEFAULT_NAME_SPACE = "default";
48-
private final static Integer TIME_OUT_VALUE = 180;
4948

5049
/*
5150
For API_SERVER_NAME, you can get the server name as follows.
@@ -58,7 +57,7 @@ public class Example {
5857
$ kubectl describe secret $(kubectl get secrets | grep default | cut -f1 -d ' ') | grep -E '^token' | cut -f2 -d':' | tr -d '\t'
5958
*/
6059
private static final String ACCESS_TOKEN = "********************************";
61-
60+
6261
private final static Logger LOGGER = Logger.getLogger(Example.class.getName());
6362

6463
/**
@@ -124,7 +123,7 @@ public void executeCommand() throws ApiException {
124123
* @throws ApiException
125124
*/
126125
public List<String> getAllNameSapces() throws ApiException {
127-
V1NamespaceList listNamespace = corev1Api.listNamespace("true", null, null, Boolean.FALSE, null, 0, null, Integer.MAX_VALUE, Boolean.FALSE);
126+
V1NamespaceList listNamespace = corev1Api.listNamespace("true", null, null, Boolean.FALSE, null, Integer.SIZE, null, Integer.BYTES, Boolean.FALSE);
128127
List<String> list = listNamespace.getItems()
129128
.stream()
130129
.map(v1Namespace -> v1Namespace.getMetadata().getName())
@@ -177,7 +176,7 @@ public List<String> getNamespacedPod(String namespace) throws ApiException {
177176
* @throws ApiException
178177
*/
179178
public List<String> getNamespacedPod(String namespace, String label) throws ApiException {
180-
V1PodList listNamespacedPod = corev1Api.listNamespacedPod(namespace, null, null, null, Boolean.FALSE, label, Integer.MAX_VALUE, null, TIME_OUT_VALUE, Boolean.FALSE);
179+
V1PodList listNamespacedPod = corev1Api.listNamespacedPod(namespace, null, null, null, Boolean.FALSE, label, Integer.SIZE, null, Integer.BYTES, Boolean.FALSE);
181180
List<String> listPods = listNamespacedPod.getItems()
182181
.stream()
183182
.map(v1pod -> v1pod.getMetadata().getName())
@@ -192,7 +191,7 @@ public List<String> getNamespacedPod(String namespace, String label) throws ApiE
192191
* @throws ApiException
193192
*/
194193
public List<String> getServices() throws ApiException {
195-
V1ServiceList listNamespacedService = corev1Api.listNamespacedService(DEFAULT_NAME_SPACE, null, null, null, Boolean.FALSE, null, Integer.MAX_VALUE, null, TIME_OUT_VALUE, Boolean.FALSE);
194+
V1ServiceList listNamespacedService = corev1Api.listNamespacedService(DEFAULT_NAME_SPACE, null, null, null, Boolean.FALSE, null, Integer.SIZE, null, Integer.BYTES, Boolean.FALSE);
196195
return listNamespacedService.getItems().stream().map(v1service -> v1service.getMetadata().getName()).collect(Collectors.toList());
197196
}
198197

0 commit comments

Comments
 (0)