- Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Describe the bug
In #1139, we had implemented a getURL() method to fetch Service URL from different sources like OpenShift Routes, Ingresses, Service NodePort etc.
However, at that time Ingress was only available in extensions/v1beta1 apiGroup. As Kubernetes moved forward Ingress was moved to networking.k8s.io apigroups (first in v1beta1 and then in v1).
URLFromIngressImpl doesn't seem to account for new apiGroups for Ingress
Lines 36 to 40 in a1111ad
| IngressList ingresses = client.extensions().ingresses().inNamespace(namespace).list(); | |
| if (ingresses != null && !ingresses.getItems().isEmpty()) { | |
| return URLFromServiceUtil.getURLFromIngressList(ingresses.getItems(), namespace, serviceName, port); | |
| } | |
| return null; |
Fabric8 Kubernetes Client version
SNAPSHOT
Steps to reproduce
Run ServiceExample on a latest Kubernetes Cluster, you'll get error regarding extensions/v1beta1 apigroup not foundthe
Expected behavior
KubernetesClient should resolve networking.k8s.io Ingress as well in URLFromIngressImpl
Runtime
Kubernetes (vanilla)
Kubernetes API Server version
1.25.3@latest
Environment
Linux
Fabric8 Kubernetes Client Logs
Here are logs from running ServiceExample:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Exception in thread "main" io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: GET at: https://api.crc.testing:6443/apis/extensions/v1beta1/namespaces/default/ingresses. Message: Not Found. at io.fabric8.kubernetes.client.KubernetesClientException.copyAsCause(KubernetesClientException.java:238) at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.waitForResult(OperationSupport.java:537) at io.fabric8.kubernetes.client.dsl.internal.BaseOperation.list(BaseOperation.java:427) at io.fabric8.kubernetes.client.dsl.internal.BaseOperation.list(BaseOperation.java:392) at io.fabric8.kubernetes.client.dsl.internal.BaseOperation.list(BaseOperation.java:93) Additional context
No response