Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URLFromIngressImpl doesn't consider Ingress in networking.k8s.io apiGroup #4906

Closed
rohanKanojia opened this issue Feb 23, 2023 · 0 comments · Fixed by #4918
Closed

URLFromIngressImpl doesn't consider Ingress in networking.k8s.io apiGroup #4906

rohanKanojia opened this issue Feb 23, 2023 · 0 comments · Fixed by #4918
Assignees
Labels
Milestone

Comments

@rohanKanojia
Copy link
Member

rohanKanojia commented Feb 23, 2023

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

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

@rohanKanojia rohanKanojia self-assigned this Feb 27, 2023
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Feb 27, 2023
… in `networking.k8s.io` apiGroup (fabric8io#4906)

URLFromIngressImpl should handle `networking.k8s.io/v1` Ingress well.

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Feb 27, 2023
… in `networking.k8s.io` apiGroup (fabric8io#4906)

URLFromIngressImpl should handle `networking.k8s.io/v1` Ingress well.

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Feb 28, 2023
… in `networking.k8s.io` apiGroup (fabric8io#4906)

URLFromIngressImpl should handle `networking.k8s.io/v1` Ingress well.

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Feb 28, 2023
… in `networking.k8s.io` apiGroup (fabric8io#4906)

URLFromIngressImpl should handle `networking.k8s.io/v1` Ingress well.

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Feb 28, 2023
… in `networking.k8s.io` apiGroup (fabric8io#4906)

URLFromIngressImpl should handle `networking.k8s.io/v1` Ingress well.

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Feb 28, 2023
… in `networking.k8s.io` apiGroup (fabric8io#4906)

URLFromIngressImpl should handle `networking.k8s.io/v1` Ingress well.

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Feb 28, 2023
… in `networking.k8s.io` apiGroup (fabric8io#4906)

URLFromIngressImpl should handle `networking.k8s.io/v1` Ingress well.

Signed-off-by: Rohan Kumar <[email protected]>
manusa pushed a commit to rohanKanojia/kubernetes-client that referenced this issue Mar 2, 2023
… in `networking.k8s.io` apiGroup (fabric8io#4906)

URLFromIngressImpl should handle `networking.k8s.io/v1` Ingress well.

Signed-off-by: Rohan Kumar <[email protected]>
@manusa manusa added this to the 6.5.0 milestone Mar 2, 2023
@manusa manusa added the bug label Mar 2, 2023
@manusa manusa moved this to Review in Eclipse JKube Mar 2, 2023
@github-project-automation github-project-automation bot moved this from Review to Done in Eclipse JKube Mar 3, 2023
manusa pushed a commit that referenced this issue Mar 3, 2023
… in `networking.k8s.io` apiGroup (#4906)

URLFromIngressImpl should handle `networking.k8s.io/v1` Ingress well.

Signed-off-by: Rohan Kumar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants