Skip to content

Commit

Permalink
Bump Kubernetes Client to 6.3.1
Browse files Browse the repository at this point in the history
Fix #1116
  • Loading branch information
Sgitario authored and iocanel committed Dec 21, 2022
1 parent a452b1e commit 5d505fe
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 120 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
io.fabric8.certmanager.api.model.v1.Certificate
io.fabric8.certmanager.api.model.v1.Issuer

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
io.dekorate.prometheus.model.ServiceMonitor

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
io.dekorate.servicebinding.model.ServiceBinding
29 changes: 7 additions & 22 deletions core/src/main/java/io/dekorate/processor/AptReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.StreamSupport;

import javax.annotation.processing.ProcessingEnvironment;
import javax.tools.Diagnostic;
Expand All @@ -32,12 +37,10 @@
import io.dekorate.WithProject;
import io.dekorate.utils.Serialization;
import io.dekorate.utils.Strings;
import io.fabric8.kubernetes.api.KubernetesResourceMappingProvider;
import io.fabric8.kubernetes.api.model.HasMetadata;
import io.fabric8.kubernetes.api.model.KubernetesList;
import io.fabric8.kubernetes.api.model.KubernetesListBuilder;
import io.fabric8.kubernetes.api.model.KubernetesResource;
import io.fabric8.kubernetes.internal.KubernetesDeserializer;

public class AptReader implements SessionReader, WithProject {

Expand All @@ -53,24 +56,6 @@ public class AptReader implements SessionReader, WithProject {
this.processingEnv = processingEnv;
this.inputFileIncludePattern = Pattern.compile(INPUT_FILE_INCLUDE_REGEX);
this.inputFileExcludePattern = Pattern.compile(INPUT_FILE_EXCLUDE_REGEX);
hack();
}

private void hack() {
// InternalResourceMappingProvider not loaded in FMP probably due to Kubernetes-Client collisions
StreamSupport
.stream(ServiceLoader.load(KubernetesResourceMappingProvider.class, AptReader.class.getClassLoader())
.spliterator(), false)
.map(KubernetesResourceMappingProvider::getMappings)
.map(Map::entrySet).flatMap(Set::stream)
.forEach(e -> {
if (e.getKey().contains("#")) {
final String[] apiKind = e.getKey().split("#");
KubernetesDeserializer.registerCustomKind(apiKind[0], apiKind[1], e.getValue());
} else {
KubernetesDeserializer.registerCustomKind(e.getKey(), e.getValue());
}
});
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<version.commons-compress>1.21</version.commons-compress>
<version.jansi>1.18</version.jansi>
<version.jackson>2.12.3</version.jackson>
<version.kubernetes-client>6.2.0</version.kubernetes-client>
<version.kubernetes-client>6.3.1</version.kubernetes-client>
<version.sundrio>0.92.1</version.sundrio>
<version.jayway.jsonpath>2.6.0</version.jayway.jsonpath>

Expand Down

0 comments on commit 5d505fe

Please sign in to comment.