Skip to content

Commit

Permalink
Upgrade to Fabric8 6.9.2. (#1503)
Browse files Browse the repository at this point in the history
Co-authored-by: Ryan Baxter <[email protected]>
  • Loading branch information
Ryan Baxter and ryanjbaxter authored Nov 9, 2023
1 parent 15a0eac commit abbdef7
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ static List<StrippedSourceContainer> byNamespace(CoreV1Api coreV1Api, String nam
List<StrippedSourceContainer> result = CACHE.computeIfAbsent(namespace, x -> {
try {
b[0] = true;
return strippedConfigMaps(coreV1Api
.listNamespacedConfigMap(namespace, null, null, null,
null, null, null, null, null, null, null, null)
.getItems());
return strippedConfigMaps(coreV1Api.listNamespacedConfigMap(namespace, null, null, null, null, null,
null, null, null, null, null, null).getItems());
}
catch (ApiException apiException) {
throw new RuntimeException(apiException.getResponseBody(), apiException);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ static List<StrippedSourceContainer> byNamespace(CoreV1Api coreV1Api, String nam
List<StrippedSourceContainer> result = CACHE.computeIfAbsent(namespace, x -> {
try {
b[0] = true;
return strippedSecrets(coreV1Api
.listNamespacedSecret(namespace, null, null, null, null,
null, null, null, null, null, null, null)
.getItems());
return strippedSecrets(coreV1Api.listNamespacedSecret(namespace, null, null, null, null, null, null,
null, null, null, null, null).getItems());
}
catch (ApiException apiException) {
throw new RuntimeException(apiException.getResponseBody(), apiException);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,12 @@ void inform() {
}
SharedInformerFactory factory = new SharedInformerFactory(apiClient);
factories.add(factory);
informer = factory.sharedIndexInformerFor(
(CallGeneratorParams params) -> coreV1Api.listNamespacedConfigMapCall(namespace, null, null, null,
null, filter[0], null, params.resourceVersion, null, null, params.timeoutSeconds, params.watch,
null),
V1ConfigMap.class, V1ConfigMapList.class);
informer = factory
.sharedIndexInformerFor(
(CallGeneratorParams params) -> coreV1Api.listNamespacedConfigMapCall(namespace, null, null,
null, null, filter[0], null, params.resourceVersion, null, null,
params.timeoutSeconds, params.watch, null),
V1ConfigMap.class, V1ConfigMapList.class);

LOG.debug(() -> "added configmap informer for namespace : " + namespace + " with filter : " + filter[0]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ void inform() {
factories.add(factory);
informer = factory.sharedIndexInformerFor(
(CallGeneratorParams params) -> coreV1Api.listNamespacedSecretCall(namespace, null, null, null,
null, filter[0], null, params.resourceVersion, null, null, params.timeoutSeconds, params.watch,
null),
null, filter[0], null, params.resourceVersion, null, null, params.timeoutSeconds,
params.watch, null),
V1Secret.class, V1SecretList.class);

LOG.debug(() -> "added secret informer for namespace : " + namespace + " with filter : " + filter[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ public Flux<List<ServiceInstance>> get() {
}
else {
services = coreV1Api.listNamespacedService(getNamespace(), null, null, null,
"metadata.name=" + this.getServiceId(), null, null, null,
null, null, null, null).getItems();
"metadata.name=" + this.getServiceId(), null, null, null, null, null, null, null).getItems();
}
services.forEach(service -> result.add(mapper.map(service)));
}
Expand Down
2 changes: 1 addition & 1 deletion spring-cloud-kubernetes-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<description>Spring Cloud Kubernetes Dependencies</description>
<properties>
<hoverfly.version>0.13.0</hoverfly.version>
<kubernetes-fabric8-client.version>6.7.2</kubernetes-fabric8-client.version>
<kubernetes-fabric8-client.version>6.9.2</kubernetes-fabric8-client.version>
<kubernetes-native-client.version>19.0.0</kubernetes-native-client.version>
<wiremock.version>2.26.3</wiremock.version>
<commons.collections4.version>4.4</commons.collections4.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Fabric8UserAgentDefaultConfigurationTests {
@Test
void testUserAgent() {
String userAgent = client.getConfiguration().getUserAgent();
assertThat(userAgent).isEqualTo("fabric8-kubernetes-client/6.7.2");
assertThat(userAgent).isEqualTo("fabric8-kubernetes-client/6.9.2");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,7 @@ public void waitForReplicationController(String name, String namespace) {

public boolean isReplicationControllerReady(String name, String namespace) throws ApiException {
V1ReplicationControllerList controllerList = api.listNamespacedReplicationController(namespace, null, null,
null, "metadata.name=" + name, null, null, null, null,
null, null, null);
null, "metadata.name=" + name, null, null, null, null, null, null, null);
if (controllerList.getItems().size() < 1) {
fail("Replication controller with name " + name + "could not be found");
}
Expand Down Expand Up @@ -281,8 +280,7 @@ public void waitForDeploymentToBeDeleted(String deploymentName, String namespace

public boolean isDeploymentReady(String deploymentName, String namespace) throws ApiException {
V1DeploymentList deployments = appsApi.listNamespacedDeployment(namespace, null, null, null,
"metadata.name=" + deploymentName, null, null, null, null,
null, null, null);
"metadata.name=" + deploymentName, null, null, null, null, null, null, null);
if (deployments.getItems().size() < 1) {
fail("No deployments with the name " + deploymentName);
}
Expand Down Expand Up @@ -315,9 +313,8 @@ public void deleteNamespace(String name) throws Exception {
api.deleteNamespace(name, null, null, null, null, null, null);

await().pollInterval(Duration.ofSeconds(1)).atMost(30, TimeUnit.SECONDS)
.until(() -> api.listNamespace(null, null, null, null,
null, null, null, null, null, null, null).getItems()
.stream().noneMatch(x -> x.getMetadata().getName().equals(name)));
.until(() -> api.listNamespace(null, null, null, null, null, null, null, null, null, null, null)
.getItems().stream().noneMatch(x -> x.getMetadata().getName().equals(name)));
}

public void setUpClusterWide(String serviceAccountNamespace, Set<String> namespaces) throws Exception {
Expand Down Expand Up @@ -388,8 +385,8 @@ public void deployWiremock(String namespace, boolean rootPath, K3sContainer cont
*/
public void cleanUpWiremock(String namespace) throws Exception {
appsApi.deleteCollectionNamespacedDeployment(namespace, null, null, null,
"metadata.name=" + WIREMOCK_DEPLOYMENT_NAME, null, null, null,
null, null, null, null, null, null, null);
"metadata.name=" + WIREMOCK_DEPLOYMENT_NAME, null, null, null, null, null, null, null, null, null,
null);

api.deleteNamespacedService(WIREMOCK_APP_NAME, namespace, null, null, null, null, null, null);
networkingApi.deleteNamespacedIngress("wiremock-ingress", namespace, null, null, null, null, null, null);
Expand Down

0 comments on commit abbdef7

Please sign in to comment.