Description of problem:
Trying to use a group to collect ingresses.networking.k8s.io by namespace inspect in [1] is not working. As it has been discussed in GitHub PR [2], the following should collect the `ingresses.networking.k8s.io`:
{Group: "networking.k8s.io", Resource: "ingresses"},
But it fails with the following error even if the resource exists and can be fetched with `oc get ingresses.networking.k8s.io` in the same namespace the `oc adm inspect` is launched:
util.go:118] the server doesn't have a resource type ingresses.networking.k8s.io, skipping the inspection
Version-Release number of selected component (if applicable):
All versions including 4.22
How reproducible:
Always
Steps to Reproduce:
1. Add the following in the code [1] to try to collect the `ingresses.networking.k8s.io`: '{Group: "networking.k8s.io", Resource: "ingresses"},' (the "," needs to be there).
2. Build the `oc`.
3. Create a basic `ingresses.networking.k8s.io`.
4. Check that the above created resource can be fetched by `oc get ingresses.networking.k8s.io`.
5. Collect an inspect with the `oc` build.
Actual results:
The resource is not collected by the inspect, and the following message is shown: util.go:118] the server doesn't have a resource type ingresses.networking.k8s.io, skipping the inspection
Expected results:
The resource should be collected by the inspect
Additional info:
Bug created as discussed in the PR [2]. Using '{Resource: "ingresses"},' works, but it should work also '{Group: "networking.k8s.io", Resource: "ingresses"},'
[1] https://github.com/openshift/oc/blob/main/pkg/cli/admin/inspect/namespace.go#L19-L34
[2] https://github.com/openshift/oc/pull/2004#issuecomment-3909603356
- is caused by
-
RFE-7406 Include the K8s ingress in the namespace inspect collection
-
- Backlog
-
- links to