Skip to content

Commit 62d6c62

Browse files
authored
Merge pull request #1936 from brendandburns/122.2
Regenerate for Kubernetes 1.22.2
2 parents c52b277 + 2a7c313 commit 62d6c62

File tree

2,973 files changed

+357784
-549063
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,973 files changed

+357784
-549063
lines changed

e2e/src/test/groovy/io/kubernetes/client/e2e/util/ModelMapperTest.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ package io.kubernetes.client.e2e.util
1515
import io.kubernetes.client.Discovery
1616
import io.kubernetes.client.apimachinery.GroupVersionKind
1717
import io.kubernetes.client.apimachinery.GroupVersionResource
18+
import io.kubernetes.client.openapi.models.V1CustomResourceDefinition
1819
import io.kubernetes.client.openapi.models.V1Deployment
1920
import io.kubernetes.client.openapi.models.V1Pod
20-
import io.kubernetes.client.openapi.models.V1beta1CustomResourceDefinition
2121
import io.kubernetes.client.util.ClientBuilder
2222
import io.kubernetes.client.util.ModelMapper
2323
import spock.lang.Specification
@@ -39,8 +39,8 @@ class ModelMapperTest extends Specification {
3939
new GroupVersionResource("apps", "v1", "deployments") == ModelMapper.getGroupVersionResourceByClass(V1Deployment.class)
4040
ModelMapper.isNamespaced(V1Deployment.class)
4141

42-
new GroupVersionKind("apiextensions.k8s.io", "v1beta1", "CustomResourceDefinition") == ModelMapper.getGroupVersionKindByClass(V1beta1CustomResourceDefinition.class)
43-
new GroupVersionResource("apiextensions.k8s.io", "v1beta1", "customresourcedefinitions") == ModelMapper.getGroupVersionResourceByClass(V1beta1CustomResourceDefinition.class)
44-
!ModelMapper.isNamespaced(V1beta1CustomResourceDefinition.class)
42+
new GroupVersionKind("apiextensions.k8s.io", "v1", "CustomResourceDefinition") == ModelMapper.getGroupVersionKindByClass(V1CustomResourceDefinition.class)
43+
new GroupVersionResource("apiextensions.k8s.io", "v1", "customresourcedefinitions") == ModelMapper.getGroupVersionResourceByClass(V1CustomResourceDefinition.class)
44+
!ModelMapper.isNamespaced(V1CustomResourceDefinition.class)
4545
}
4646
}

examples/examples-release-13/src/main/java/io/kubernetes/client/examples/PrometheusExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public static void main(String[] args) throws IOException, ApiException {
5050
api.listPodForAllNamespaces(null, null, null, null, null, null, null, null, null, null);
5151
// A request that should return 404
5252
try {
53-
V1Pod pod = api.readNamespacedPod("foo", "bar", null, null, null);
53+
V1Pod pod = api.readNamespacedPod("foo", "bar", null);
5454
} catch (ApiException ex) {
5555
if (ex.getCode() != 404) {
5656
throw ex;

examples/examples-release-13/src/test/java/io/kubernetes/client/examples/ExampleTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void exactUrlOnly() throws IOException, ApiException {
4949
.withBody(client.getJSON().serialize(ns1))));
5050

5151
CoreV1Api api = new CoreV1Api();
52-
V1Namespace ns2 = api.readNamespace("name", null, null, null);
52+
V1Namespace ns2 = api.readNamespace("name", null);
5353
assertEquals(ns1, ns2);
5454
}
5555
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ private void waitForPodDelete(CoreV1Api api, String name, String namespace)
113113
long start = System.currentTimeMillis();
114114
do {
115115
try {
116-
api.readNamespacedPod(name, namespace, null, null, null);
116+
api.readNamespacedPod(name, namespace, null);
117117
} catch (ApiException ex) {
118118
if (ex.getCode() == HttpURLConnection.HTTP_NOT_FOUND) {
119119
return;

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,13 @@ public List<History> execute() throws KubectlException {
7474
refreshDiscovery();
7575
try {
7676
if (apiTypeClass.equals(V1Deployment.class)) {
77-
V1Deployment deployment = api.readNamespacedDeployment(name, namespace, null, null, null);
77+
V1Deployment deployment = api.readNamespacedDeployment(name, namespace, null);
7878
deploymentViewHistory(deployment, api);
7979
} else if (apiTypeClass.equals(V1DaemonSet.class)) {
80-
V1DaemonSet daemonSet = api.readNamespacedDaemonSet(name, namespace, null, null, null);
80+
V1DaemonSet daemonSet = api.readNamespacedDaemonSet(name, namespace, null);
8181
daemonSetViewHistory(daemonSet, api);
8282
} else if (apiTypeClass.equals(V1StatefulSet.class)) {
83-
V1StatefulSet statefulSet =
84-
api.readNamespacedStatefulSet(name, namespace, null, null, null);
83+
V1StatefulSet statefulSet = api.readNamespacedStatefulSet(name, namespace, null);
8584
statefulSetViewHistory(statefulSet, api);
8685
} else {
8786
throw new KubectlException("Unsupported class for rollout history: " + apiTypeClass);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public V1Node execute() throws KubectlException {
6868

6969
private V1Node executeInternal() throws KubectlException, ApiException, IOException {
7070
CoreV1Api v1 = new CoreV1Api(apiClient);
71-
V1Node node = v1.readNode(name, null, null, null);
71+
V1Node node = v1.readNode(name, null);
7272

7373
TaintsBuilder builder = Taints.taints(node);
7474
for (Map.Entry<String, Pair<String, String>> taint : addingTaints.entrySet()) {

extended/src/main/java/io/kubernetes/client/extended/leaderelection/resourcelock/ConfigMapLock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public ConfigMapLock(String namespace, String name, String identity, ApiClient a
5858

5959
@Override
6060
public LeaderElectionRecord get() throws ApiException {
61-
V1ConfigMap configMap = coreV1Client.readNamespacedConfigMap(name, namespace, null, null, null);
61+
V1ConfigMap configMap = coreV1Client.readNamespacedConfigMap(name, namespace, null);
6262
configMapRefer.set(configMap);
6363

6464
Map<String, String> annotations = configMap.getMetadata().getAnnotations();

extended/src/main/java/io/kubernetes/client/extended/leaderelection/resourcelock/EndpointsLock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public EndpointsLock(String namespace, String name, String identity, ApiClient a
5858

5959
@Override
6060
public LeaderElectionRecord get() throws ApiException {
61-
V1Endpoints endpoints = coreV1Client.readNamespacedEndpoints(name, namespace, null, null, null);
61+
V1Endpoints endpoints = coreV1Client.readNamespacedEndpoints(name, namespace, null);
6262
endpointsRefer.set(endpoints);
6363

6464
Map<String, String> annotations = endpoints.getMetadata().getAnnotations();

extended/src/main/java/io/kubernetes/client/extended/leaderelection/resourcelock/LeaseLock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public LeaseLock(String namespace, String name, String identity, ApiClient apiCl
5858

5959
@Override
6060
public LeaderElectionRecord get() throws ApiException {
61-
V1Lease lease = coordinationV1Api.readNamespacedLease(name, namespace, null, null, null);
61+
V1Lease lease = coordinationV1Api.readNamespacedLease(name, namespace, null);
6262
leaseRefer.set(lease);
6363
return getRecordFromLease(lease.getSpec());
6464
}

extended/src/test/java/io/kubernetes/client/extended/network/EndpointsLoadBalancerTests.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
import static org.junit.Assert.*;
1616

1717
import io.kubernetes.client.extended.network.exception.NoAvailableAddressException;
18+
import io.kubernetes.client.openapi.models.CoreV1EndpointPort;
1819
import io.kubernetes.client.openapi.models.V1EndpointAddress;
19-
import io.kubernetes.client.openapi.models.V1EndpointPort;
2020
import io.kubernetes.client.openapi.models.V1EndpointSubset;
2121
import io.kubernetes.client.openapi.models.V1Endpoints;
2222
import java.util.Arrays;
@@ -32,29 +32,29 @@ public class EndpointsLoadBalancerTests {
3232
new V1EndpointSubset()
3333
.addAddressesItem(new V1EndpointAddress().ip("127.0.0.1"))
3434
.addAddressesItem(new V1EndpointAddress().ip("127.0.0.2"))
35-
.addPortsItem(new V1EndpointPort().port(8080)));
35+
.addPortsItem(new CoreV1EndpointPort().port(8080)));
3636

3737
private final V1Endpoints twoPortTwoHostEp =
3838
new V1Endpoints()
3939
.addSubsetsItem(
4040
new V1EndpointSubset()
4141
.addAddressesItem(new V1EndpointAddress().ip("127.0.0.1"))
4242
.addAddressesItem(new V1EndpointAddress().ip("127.0.0.2"))
43-
.addPortsItem(new V1EndpointPort().port(8080))
44-
.addPortsItem(new V1EndpointPort().port(8081)));
43+
.addPortsItem(new CoreV1EndpointPort().port(8080))
44+
.addPortsItem(new CoreV1EndpointPort().port(8081)));
4545

4646
private final V1Endpoints twoSubsetTwoPortTwoHostEp =
4747
new V1Endpoints()
4848
.addSubsetsItem(
4949
new V1EndpointSubset()
5050
.addAddressesItem(new V1EndpointAddress().ip("127.0.0.1"))
5151
.addAddressesItem(new V1EndpointAddress().ip("127.0.0.2"))
52-
.addPortsItem(new V1EndpointPort().port(8080))
53-
.addPortsItem(new V1EndpointPort().port(8081)))
52+
.addPortsItem(new CoreV1EndpointPort().port(8080))
53+
.addPortsItem(new CoreV1EndpointPort().port(8081)))
5454
.addSubsetsItem(
5555
new V1EndpointSubset()
5656
.addAddressesItem(new V1EndpointAddress().ip("127.0.0.3"))
57-
.addPortsItem(new V1EndpointPort().port(8082)));
57+
.addPortsItem(new CoreV1EndpointPort().port(8082)));
5858

5959
@Test
6060
public void testGetTargetIP1() throws NoAvailableAddressException {

0 commit comments

Comments
 (0)