Skip to content

Commit

Permalink
fix(deps): update io.kubernetes.client.java to v19 (major) (#648)
Browse files Browse the repository at this point in the history
* fix(deps): update io.kubernetes.client.java to v19

* Remove deleted apis

* Fix client calls (extra parameter)

* Api calls in groovy
  • Loading branch information
renovate[bot] authored Jan 22, 2024
1 parent f369843 commit dffb6aa
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public String getPod(final @NotNull String namespace, final @NotNull String name

@Get("/{namespace}")
public Map<String, String> index(final @NotNull String namespace) throws ApiException {
V1PodList v1PodList = coreV1Api.listNamespacedPod(namespace, null, null, null, null, null, null, null, null, null, false);
V1PodList v1PodList = coreV1Api.listNamespacedPod(namespace, null, null, null, null, null, null, null, null, null, null, false);
return v1PodList.getItems().stream()
.filter(p -> p.getStatus() != null)
.collect(Collectors.toMap(
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rxjava2 = '2.2.21'
rxjava3 = '3.1.8'
shadow = '8.0.0'
system-lambda = '1.2.1'
io-kubernetes-client-java = '18.0.0'
io-kubernetes-client-java = '19.0.0'
io-fabric8-kubernetes-client = '6.10.0'

micronaut-discovery = "4.2.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class CoreV1ApiReactorClientSpec extends KubernetesSpecification {
null,
null,
null,
null,
null).block()

then:
Expand All @@ -58,6 +59,7 @@ class CoreV1ApiReactorClientSpec extends KubernetesSpecification {
null,
null,
null,
null,
null).block()

then:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class CoreV1ApiRxClientSpec extends KubernetesSpecification {
null,
null,
null,
null,
null).blockingGet()

then:
Expand All @@ -60,6 +61,7 @@ class CoreV1ApiRxClientSpec extends KubernetesSpecification {
null,
null,
null,
null,
null).blockingGet()

then:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class CoreV1ApiRxClientSpec extends KubernetesSpecification {
null,
null,
null,
null,
null).blockingGet()

then:
Expand All @@ -60,6 +61,7 @@ class CoreV1ApiRxClientSpec extends KubernetesSpecification {
null,
null,
null,
null,
null).blockingGet()

then:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
*/
package io.micronaut.kubernetes.client;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

import io.kubernetes.client.openapi.apis.AdmissionregistrationApi;
import io.kubernetes.client.openapi.apis.AdmissionregistrationV1Api;
import io.kubernetes.client.openapi.apis.ApiextensionsApi;
Expand All @@ -34,7 +31,6 @@
import io.kubernetes.client.openapi.apis.AutoscalingApi;
import io.kubernetes.client.openapi.apis.AutoscalingV1Api;
import io.kubernetes.client.openapi.apis.AutoscalingV2Api;
import io.kubernetes.client.openapi.apis.AutoscalingV2beta2Api;
import io.kubernetes.client.openapi.apis.BatchApi;
import io.kubernetes.client.openapi.apis.BatchV1Api;
import io.kubernetes.client.openapi.apis.CertificatesApi;
Expand All @@ -49,7 +45,6 @@
import io.kubernetes.client.openapi.apis.EventsApi;
import io.kubernetes.client.openapi.apis.EventsV1Api;
import io.kubernetes.client.openapi.apis.FlowcontrolApiserverApi;
import io.kubernetes.client.openapi.apis.FlowcontrolApiserverV1beta1Api;
import io.kubernetes.client.openapi.apis.FlowcontrolApiserverV1beta2Api;
import io.kubernetes.client.openapi.apis.InternalApiserverApi;
import io.kubernetes.client.openapi.apis.InternalApiserverV1alpha1Api;
Expand All @@ -67,10 +62,12 @@
import io.kubernetes.client.openapi.apis.SchedulingV1Api;
import io.kubernetes.client.openapi.apis.StorageApi;
import io.kubernetes.client.openapi.apis.StorageV1Api;
import io.kubernetes.client.openapi.apis.StorageV1beta1Api;
import io.kubernetes.client.openapi.apis.VersionApi;
import io.kubernetes.client.openapi.apis.WellKnownApi;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
* Internal annotation to trigger the creation of Api clients.
*
Expand Down Expand Up @@ -99,7 +96,6 @@ Class<?>[] value() default {
AutoscalingApi.class,
AutoscalingV1Api.class,
AutoscalingV2Api .class,
AutoscalingV2beta2Api.class,
BatchApi.class,
BatchV1Api.class,
CertificatesApi.class,
Expand All @@ -114,7 +110,6 @@ Class<?>[] value() default {
EventsApi.class,
EventsV1Api.class,
FlowcontrolApiserverApi.class,
FlowcontrolApiserverV1beta1Api.class,
FlowcontrolApiserverV1beta2Api.class,
InternalApiserverApi.class,
InternalApiserverV1alpha1Api.class,
Expand All @@ -132,7 +127,6 @@ Class<?>[] value() default {
SchedulingV1Api.class,
StorageApi.class,
StorageV1Api.class,
StorageV1beta1Api.class,
VersionApi.class,
WellKnownApi.class,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ApiClientFactorySpec extends KubernetesSpecification {

CoreV1Api coreV1Api = applicationContext.getBean(CoreV1Api)
when:
V1PodList podList = coreV1Api.listNamespacedPod("kube-system", null, null, null, null, null, null, null, null, null, null)
V1PodList podList = coreV1Api.listNamespacedPod("kube-system", null, null, null, null, null, null, null, null, null, null, null)

then:
podList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ private Flux<PropertySource> getPropertySourcesFromConfigMaps() {
}
})
.flatMap(labelSelector ->
client.listNamespacedConfigMap(configuration.getNamespace(), null, null, null, null, labelSelector, null, null, null, null))
client.listNamespacedConfigMap(configuration.getNamespace(), null, null, null, null, labelSelector, null, null, null, null, null))
.doOnError(ApiException.class, throwable -> LOG.error("Error to list ConfigMaps in the namespace [" + configuration.getNamespace() + "]: " + throwable.getResponseBody(), throwable))
.onErrorResume(throwable -> exceptionOnPodLabelsMissing
? Mono.error(throwable)
Expand Down Expand Up @@ -297,7 +297,7 @@ private Publisher<PropertySource> getPropertySourcesFromSecrets() {

Flux<PropertySource> secretListFlowable = computePodLabelSelector(client,
configuration.getSecrets().getPodLabels(), configuration.getNamespace(), labels, exceptionOnPodLabelsMissing)
.flatMap(labelSelector -> client.listNamespacedSecret(configuration.getNamespace(), null, null, null, null, labelSelector, null, null, null, null))
.flatMap(labelSelector -> client.listNamespacedSecret(configuration.getNamespace(), null, null, null, null, labelSelector, null, null, null, null, null))
.doOnError(ApiException.class, throwable -> LOG.error("Failed to list Secrets in the namespace [" + configuration.getNamespace() + "]: " + throwable.getResponseBody(), throwable))
.onErrorResume(throwable -> exceptionOnPodLabelsMissing
? Mono.error(throwable)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public Flux<V1Endpoints> listEndpoints(String namespace) {
LOG.trace("Using API to fetch endpoints from namespace [{}]", namespace);
}

return client.listNamespacedEndpoints(namespace, null, null, null, null, null, null, null, null, null)
return client.listNamespacedEndpoints(namespace, null, null, null, null, null, null, null, null, null, null)
.doOnError(ApiException.class, throwable -> LOG.error("Failed to list Endpoints from namespace [" + namespace + "]: " + throwable.getResponseBody(), throwable))
.flatMapIterable(V1EndpointsList::getItems);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public Flux<V1Service> listServices(String namespace) {
LOG.trace("Using API to fetch services from namespace [{}]", namespace);
}

return client.listNamespacedService(namespace, null, null, null, null, null, null, null, null, null)
return client.listNamespacedService(namespace, null, null, null, null, null, null, null, null, null, null)
.doOnError(ApiException.class, throwable -> LOG.error("Failed to list Services from namespace [" + namespace + "]: " + throwable.getResponseBody(), throwable))
.flatMapIterable(V1ServiceList::getItems);
}
Expand Down

0 comments on commit dffb6aa

Please sign in to comment.