Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions spring-cloud-kubernetes-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@
<description>Spring Cloud Kubernetes Dependencies</description>
<properties>
<hoverfly.version>0.13.0</hoverfly.version>
<kubernetes-fabric8-client.version>5.12.2</kubernetes-fabric8-client.version>
<kubernetes-fabric8-client.version>6.2.0</kubernetes-fabric8-client.version>
<kubernetes-native-client.version>16.0.2</kubernetes-native-client.version>
<istio-client.version>1.7.7.1</istio-client.version>
<wiremock.version>2.26.3</wiremock.version>
<spring-retry.version>1.3.1</spring-retry.version>
<commons.collections4.version>4.4</commons.collections4.version>
Expand Down Expand Up @@ -72,12 +71,6 @@
<version>${kubernetes-native-client.version}</version>
</dependency>

<dependency>
<groupId>me.snowdrop</groupId>
<artifactId>istio-client</artifactId>
<version>${istio-client.version}</version>
</dependency>

<dependency>
<groupId>org.springframework.retry</groupId>
<artifactId>spring-retry</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ class Fabric8PodUtilsTest {

private final File certFile = Mockito.mock(File.class);

private final MixedOperation<Pod, PodList, PodResource<Pod>> mixed = Mockito.mock(MixedOperation.class);
private final MixedOperation<Pod, PodList, PodResource> mixed = Mockito.mock(MixedOperation.class);

private final Pod pod = Mockito.mock(Pod.class);

private final PodResource<Pod> podResource = Mockito.mock(PodResource.class);
private final PodResource podResource = Mockito.mock(PodResource.class);

private MockedStatic<EnvReader> envReader;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import io.fabric8.kubernetes.client.KubernetesClient;
import io.fabric8.kubernetes.client.informers.ResourceEventHandler;
import io.fabric8.kubernetes.client.informers.SharedIndexInformer;
import io.fabric8.kubernetes.client.informers.SharedInformer;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
import org.apache.commons.logging.LogFactory;
Expand Down Expand Up @@ -104,7 +103,7 @@ private void inform() {

@PreDestroy
private void shutdown() {
informers.forEach(SharedInformer::close);
informers.forEach(SharedIndexInformer::close);
// Ensure the kubernetes client is cleaned up from spare threads when shutting
// down
kubernetesClient.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import io.fabric8.kubernetes.client.KubernetesClient;
import io.fabric8.kubernetes.client.informers.ResourceEventHandler;
import io.fabric8.kubernetes.client.informers.SharedIndexInformer;
import io.fabric8.kubernetes.client.informers.SharedInformer;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
import org.apache.commons.logging.LogFactory;
Expand Down Expand Up @@ -81,7 +80,7 @@ public Fabric8EventBasedSecretsChangeDetector(AbstractEnvironment environment, C

@PreDestroy
private void shutdown() {
informers.forEach(SharedInformer::close);
informers.forEach(SharedIndexInformer::close);
// Ensure the kubernetes client is cleaned up from spare threads when shutting
// down
kubernetesClient.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import io.fabric8.kubernetes.api.model.ServiceList;
import io.fabric8.kubernetes.client.KubernetesClient;
import io.fabric8.kubernetes.client.dsl.FilterWatchListDeletable;
import io.fabric8.kubernetes.client.dsl.ServiceResource;

/**
* A regular java.util.function that is used to hide the complexity of the
Expand All @@ -42,6 +43,6 @@
* @author Georgios Andrianakis
*/
public interface KubernetesClientServicesFunction
extends Function<KubernetesClient, FilterWatchListDeletable<Service, ServiceList>> {
extends Function<KubernetesClient, FilterWatchListDeletable<Service, ServiceList, ServiceResource<Service>>> {

}
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class KubernetesCatalogWatchTest {
private static final NonNamespaceOperation<Endpoints, EndpointsList, Resource<Endpoints>> NON_NAMESPACE_OPERATION = Mockito
.mock(NonNamespaceOperation.class);

private static final FilterWatchListDeletable<Endpoints, EndpointsList> FILTER_WATCH_LIST_DELETABLE = Mockito
private static final FilterWatchListDeletable<Endpoints, EndpointsList, Resource<Endpoints>> FILTER_WATCH_LIST_DELETABLE = Mockito
.mock(FilterWatchListDeletable.class);

private static final ArgumentCaptor<HeartbeatEvent> HEARTBEAT_EVENT_ARGUMENT_CAPTOR = ArgumentCaptor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public class KubernetesDiscoveryClientFilterMetadataTest {
private ServiceResource<Service> serviceResource;

@Mock
FilterWatchListDeletable<Endpoints, EndpointsList> filter;
FilterWatchListDeletable<Endpoints, EndpointsList, Resource<Endpoints>> filter;

@Test
public void testAllExtraMetadataDisabled() {
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-kubernetes-fabric8-istio/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>me.snowdrop</groupId>
<groupId>io.fabric8</groupId>
<artifactId>istio-client</artifactId>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

package org.springframework.cloud.kubernetes.fabric8.istio;

import io.fabric8.istio.client.DefaultIstioClient;
import io.fabric8.istio.client.IstioClient;
import io.fabric8.kubernetes.client.Config;
import me.snowdrop.istio.client.DefaultIstioClient;
import me.snowdrop.istio.client.IstioClient;

import org.springframework.boot.autoconfigure.condition.ConditionalOnCloudPlatform;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package org.springframework.cloud.kubernetes.fabric8.istio;

import me.snowdrop.istio.client.IstioClient;
import io.fabric8.istio.client.IstioClient;
import org.junit.jupiter.api.Test;

import org.springframework.beans.factory.annotation.Autowired;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package org.springframework.cloud.kubernetes.fabric8.istio;

import me.snowdrop.istio.client.IstioClient;
import io.fabric8.istio.client.IstioClient;
import org.junit.jupiter.api.Test;

import org.springframework.beans.factory.annotation.Autowired;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package org.springframework.cloud.kubernetes.fabric8.istio;

import me.snowdrop.istio.client.IstioClient;
import io.fabric8.istio.client.IstioClient;
import org.junit.jupiter.api.Test;

import org.springframework.beans.factory.annotation.Autowired;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package org.springframework.cloud.kubernetes.fabric8.istio;

import me.snowdrop.istio.client.IstioClient;
import io.fabric8.istio.client.IstioClient;
import org.junit.jupiter.api.Test;

import org.springframework.beans.factory.annotation.Autowired;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import io.fabric8.kubernetes.client.Watcher;
import io.fabric8.kubernetes.client.WatcherException;
import io.fabric8.kubernetes.client.dsl.PodResource;
import io.fabric8.kubernetes.client.internal.readiness.Readiness;
import io.fabric8.kubernetes.client.readiness.Readiness;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -60,7 +60,7 @@ public void start() {
synchronized (this.lock) {
if (this.watch == null) {
LOGGER.debug("Starting pod readiness watcher for '{}'", this.podName);
PodResource<Pod> podResource = this.kubernetesClient.pods().withName(this.podName);
PodResource podResource = this.kubernetesClient.pods().withName(this.podName);
this.previousState = podResource.isReady();
this.watch = podResource.watch(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ public class Fabric8PodReadinessWatcherTest {
private KubernetesClient mockKubernetesClient;

@Mock
private MixedOperation<Pod, PodList, PodResource<Pod>> mockPodsOperation;
private MixedOperation<Pod, PodList, PodResource> mockPodsOperation;

@Mock
private PodResource<Pod> mockPodResource;
private PodResource mockPodResource;

@Mock
private Pod mockPod;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ private Service buildService(String name, String uid, int port, String portName,

private Service buildService(String name, String uid, List<ServicePort> ports, Map<String, String> labels,
Map<String, String> annotations) {
return new ServiceBuilder().withNewMetadata().withName(name).withNewUid(uid).addToLabels(labels)
return new ServiceBuilder().withNewMetadata().withName(name).withUid(uid).addToLabels(labels)
.withAnnotations(annotations).endMetadata().withNewSpec().addAllToPorts(ports).endSpec().build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import io.fabric8.kubernetes.api.model.ServiceBuilder;
import io.fabric8.kubernetes.api.model.ServiceList;
import io.fabric8.kubernetes.client.KubernetesClient;
import io.fabric8.kubernetes.client.dsl.FilterWatchListMultiDeletable;
import io.fabric8.kubernetes.client.dsl.AnyNamespaceOperation;
import io.fabric8.kubernetes.client.dsl.MixedOperation;
import io.fabric8.kubernetes.client.dsl.NonNamespaceOperation;
import io.fabric8.kubernetes.client.dsl.ServiceResource;
Expand Down Expand Up @@ -65,7 +65,7 @@ class KubernetesServiceListSupplierTests {
ServiceResource<Service> serviceResource;

@Mock
FilterWatchListMultiDeletable<Service, ServiceList> multiDeletable;
AnyNamespaceOperation<Service, ServiceList, ServiceResource<Service>> multiDeletable;

@Test
void testPositiveMatch() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import io.fabric8.kubernetes.client.Config;
import io.fabric8.kubernetes.client.DefaultKubernetesClient;
import io.fabric8.kubernetes.client.KubernetesClient;
import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation;
import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import io.fabric8.kubernetes.client.Config;
import io.fabric8.kubernetes.client.DefaultKubernetesClient;
import io.fabric8.kubernetes.client.KubernetesClient;
import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation;
import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import io.fabric8.kubernetes.client.Config;
import io.fabric8.kubernetes.client.DefaultKubernetesClient;
import io.fabric8.kubernetes.client.KubernetesClient;
import io.fabric8.kubernetes.client.dsl.base.HasMetadataOperation;
import io.fabric8.kubernetes.client.dsl.internal.HasMetadataOperation;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import java.util.Arrays;
import java.util.List;

import me.snowdrop.istio.client.IstioClient;
import io.fabric8.istio.client.IstioClient;

import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.GetMapping;
Expand Down