Skip to content

Commit

Permalink
Merge pull request kubernetes-client#1936 from brendandburns/122.2
Browse files Browse the repository at this point in the history
Regenerate for Kubernetes 1.22.2
  • Loading branch information
k8s-ci-robot authored Oct 21, 2021
2 parents c52b277 + 2a7c313 commit 62d6c62
Show file tree
Hide file tree
Showing 2,973 changed files with 357,784 additions and 549,063 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ package io.kubernetes.client.e2e.util
import io.kubernetes.client.Discovery
import io.kubernetes.client.apimachinery.GroupVersionKind
import io.kubernetes.client.apimachinery.GroupVersionResource
import io.kubernetes.client.openapi.models.V1CustomResourceDefinition
import io.kubernetes.client.openapi.models.V1Deployment
import io.kubernetes.client.openapi.models.V1Pod
import io.kubernetes.client.openapi.models.V1beta1CustomResourceDefinition
import io.kubernetes.client.util.ClientBuilder
import io.kubernetes.client.util.ModelMapper
import spock.lang.Specification
Expand All @@ -39,8 +39,8 @@ class ModelMapperTest extends Specification {
new GroupVersionResource("apps", "v1", "deployments") == ModelMapper.getGroupVersionResourceByClass(V1Deployment.class)
ModelMapper.isNamespaced(V1Deployment.class)

new GroupVersionKind("apiextensions.k8s.io", "v1beta1", "CustomResourceDefinition") == ModelMapper.getGroupVersionKindByClass(V1beta1CustomResourceDefinition.class)
new GroupVersionResource("apiextensions.k8s.io", "v1beta1", "customresourcedefinitions") == ModelMapper.getGroupVersionResourceByClass(V1beta1CustomResourceDefinition.class)
!ModelMapper.isNamespaced(V1beta1CustomResourceDefinition.class)
new GroupVersionKind("apiextensions.k8s.io", "v1", "CustomResourceDefinition") == ModelMapper.getGroupVersionKindByClass(V1CustomResourceDefinition.class)
new GroupVersionResource("apiextensions.k8s.io", "v1", "customresourcedefinitions") == ModelMapper.getGroupVersionResourceByClass(V1CustomResourceDefinition.class)
!ModelMapper.isNamespaced(V1CustomResourceDefinition.class)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static void main(String[] args) throws IOException, ApiException {
api.listPodForAllNamespaces(null, null, null, null, null, null, null, null, null, null);
// A request that should return 404
try {
V1Pod pod = api.readNamespacedPod("foo", "bar", null, null, null);
V1Pod pod = api.readNamespacedPod("foo", "bar", null);
} catch (ApiException ex) {
if (ex.getCode() != 404) {
throw ex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void exactUrlOnly() throws IOException, ApiException {
.withBody(client.getJSON().serialize(ns1))));

CoreV1Api api = new CoreV1Api();
V1Namespace ns2 = api.readNamespace("name", null, null, null);
V1Namespace ns2 = api.readNamespace("name", null);
assertEquals(ns1, ns2);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private void waitForPodDelete(CoreV1Api api, String name, String namespace)
long start = System.currentTimeMillis();
do {
try {
api.readNamespacedPod(name, namespace, null, null, null);
api.readNamespacedPod(name, namespace, null);
} catch (ApiException ex) {
if (ex.getCode() == HttpURLConnection.HTTP_NOT_FOUND) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,13 @@ public List<History> execute() throws KubectlException {
refreshDiscovery();
try {
if (apiTypeClass.equals(V1Deployment.class)) {
V1Deployment deployment = api.readNamespacedDeployment(name, namespace, null, null, null);
V1Deployment deployment = api.readNamespacedDeployment(name, namespace, null);
deploymentViewHistory(deployment, api);
} else if (apiTypeClass.equals(V1DaemonSet.class)) {
V1DaemonSet daemonSet = api.readNamespacedDaemonSet(name, namespace, null, null, null);
V1DaemonSet daemonSet = api.readNamespacedDaemonSet(name, namespace, null);
daemonSetViewHistory(daemonSet, api);
} else if (apiTypeClass.equals(V1StatefulSet.class)) {
V1StatefulSet statefulSet =
api.readNamespacedStatefulSet(name, namespace, null, null, null);
V1StatefulSet statefulSet = api.readNamespacedStatefulSet(name, namespace, null);
statefulSetViewHistory(statefulSet, api);
} else {
throw new KubectlException("Unsupported class for rollout history: " + apiTypeClass);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public V1Node execute() throws KubectlException {

private V1Node executeInternal() throws KubectlException, ApiException, IOException {
CoreV1Api v1 = new CoreV1Api(apiClient);
V1Node node = v1.readNode(name, null, null, null);
V1Node node = v1.readNode(name, null);

TaintsBuilder builder = Taints.taints(node);
for (Map.Entry<String, Pair<String, String>> taint : addingTaints.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public ConfigMapLock(String namespace, String name, String identity, ApiClient a

@Override
public LeaderElectionRecord get() throws ApiException {
V1ConfigMap configMap = coreV1Client.readNamespacedConfigMap(name, namespace, null, null, null);
V1ConfigMap configMap = coreV1Client.readNamespacedConfigMap(name, namespace, null);
configMapRefer.set(configMap);

Map<String, String> annotations = configMap.getMetadata().getAnnotations();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public EndpointsLock(String namespace, String name, String identity, ApiClient a

@Override
public LeaderElectionRecord get() throws ApiException {
V1Endpoints endpoints = coreV1Client.readNamespacedEndpoints(name, namespace, null, null, null);
V1Endpoints endpoints = coreV1Client.readNamespacedEndpoints(name, namespace, null);
endpointsRefer.set(endpoints);

Map<String, String> annotations = endpoints.getMetadata().getAnnotations();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public LeaseLock(String namespace, String name, String identity, ApiClient apiCl

@Override
public LeaderElectionRecord get() throws ApiException {
V1Lease lease = coordinationV1Api.readNamespacedLease(name, namespace, null, null, null);
V1Lease lease = coordinationV1Api.readNamespacedLease(name, namespace, null);
leaseRefer.set(lease);
return getRecordFromLease(lease.getSpec());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import static org.junit.Assert.*;

import io.kubernetes.client.extended.network.exception.NoAvailableAddressException;
import io.kubernetes.client.openapi.models.CoreV1EndpointPort;
import io.kubernetes.client.openapi.models.V1EndpointAddress;
import io.kubernetes.client.openapi.models.V1EndpointPort;
import io.kubernetes.client.openapi.models.V1EndpointSubset;
import io.kubernetes.client.openapi.models.V1Endpoints;
import java.util.Arrays;
Expand All @@ -32,29 +32,29 @@ public class EndpointsLoadBalancerTests {
new V1EndpointSubset()
.addAddressesItem(new V1EndpointAddress().ip("127.0.0.1"))
.addAddressesItem(new V1EndpointAddress().ip("127.0.0.2"))
.addPortsItem(new V1EndpointPort().port(8080)));
.addPortsItem(new CoreV1EndpointPort().port(8080)));

private final V1Endpoints twoPortTwoHostEp =
new V1Endpoints()
.addSubsetsItem(
new V1EndpointSubset()
.addAddressesItem(new V1EndpointAddress().ip("127.0.0.1"))
.addAddressesItem(new V1EndpointAddress().ip("127.0.0.2"))
.addPortsItem(new V1EndpointPort().port(8080))
.addPortsItem(new V1EndpointPort().port(8081)));
.addPortsItem(new CoreV1EndpointPort().port(8080))
.addPortsItem(new CoreV1EndpointPort().port(8081)));

private final V1Endpoints twoSubsetTwoPortTwoHostEp =
new V1Endpoints()
.addSubsetsItem(
new V1EndpointSubset()
.addAddressesItem(new V1EndpointAddress().ip("127.0.0.1"))
.addAddressesItem(new V1EndpointAddress().ip("127.0.0.2"))
.addPortsItem(new V1EndpointPort().port(8080))
.addPortsItem(new V1EndpointPort().port(8081)))
.addPortsItem(new CoreV1EndpointPort().port(8080))
.addPortsItem(new CoreV1EndpointPort().port(8081)))
.addSubsetsItem(
new V1EndpointSubset()
.addAddressesItem(new V1EndpointAddress().ip("127.0.0.3"))
.addPortsItem(new V1EndpointPort().port(8082)));
.addPortsItem(new CoreV1EndpointPort().port(8082)));

@Test
public void testGetTargetIP1() throws NoAvailableAddressException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import static org.junit.Assert.*;

import io.kubernetes.client.extended.network.exception.NoAvailableAddressException;
import io.kubernetes.client.openapi.models.CoreV1EndpointPort;
import io.kubernetes.client.openapi.models.V1EndpointAddress;
import io.kubernetes.client.openapi.models.V1EndpointPort;
import io.kubernetes.client.openapi.models.V1EndpointSubset;
import io.kubernetes.client.openapi.models.V1Endpoints;
import java.util.ArrayList;
Expand All @@ -32,8 +32,8 @@ public class RoundRobinEndpointsLoadBalancerTests {
new V1EndpointSubset()
.addAddressesItem(new V1EndpointAddress().ip("127.0.0.1"))
.addAddressesItem(new V1EndpointAddress().ip("127.0.0.2"))
.addPortsItem(new V1EndpointPort().port(8080))
.addPortsItem(new V1EndpointPort().port(8081)));
.addPortsItem(new CoreV1EndpointPort().port(8080))
.addPortsItem(new CoreV1EndpointPort().port(8081)));

@Test
public void testChooseIPFromNullListShouldThrowException() {
Expand Down
32 changes: 32 additions & 0 deletions fluent-gen/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Instructions for rebuilding fluents

## Step zero
Start from a totally clean environment (eg. a clean VM if you can), clone everything.

## Step one
Comment out the existing fluent module from the pom.xml

```xml
...
<!--
<module>fluent</module>
<module>spring</module>
<module>e2e</module>
<module>examples</module>
-->
...
```

## Step two
`mvn install`

## Step three
```
cd fluent-gen; ./generate.sh
```

## Step four
Comment the above modules back into the pom.xml

## Step five
`mvn install`
2 changes: 1 addition & 1 deletion fluent-gen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<parent>
<groupId>io.kubernetes</groupId>
<artifactId>client-java-parent</artifactId>
<version>12.0.1-SNAPSHOT</version>
<version>13.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Loading

0 comments on commit 62d6c62

Please sign in to comment.