openclarity / apiclarity

An API security tool to capture and analyze API traffic, test API endpoints, reconstruct Open API specification, and identify API security risks. 
https://apiclarity.io
Apache License 2.0
501 stars 64 forks source link

Cannot unmarshal object into Go struct field IngressSpec.spec.rules of type []v1.IngressRule #304

Open nileshbhope-indusface opened 1 year ago

nileshbhope-indusface commented 1 year ago

What happened:

While configuring kong gateway with apiclarity using steps given at https://github.com/openclarity/apiclarity/tree/master/plugins/gateway/kong.

I have started sock shop demo on ubuntu 22 machine. And able to see traffic from sock shock getting reflected in Api clarity. So this setup is done properly. After executing kubectl apply -f https://bit.ly/kong-ingress-dbless successfully.

While Configure Ingress: I am getting below error, Cannot unmarshal object into Go struct field IngressSpec.spec.rules of type []v1.IngressRule

What you expected to happen:

It should have applied as per steps given.

How to reproduce it (as minimally and precisely as possible):

Follow steps given at https://github.com/openclarity/apiclarity/tree/master/plugins/gateway/kong

Below yaml setting I used to configure ingress as per compatible apiVersion: networking.k8s.io/v1

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: catalogue
  namespace: sock-shop
spec:
  ingressClassName: kong
  rules:
    http:
      paths:
        - path: /
      pathType: Prefix
      backend:
        service:
          name: catalogue
          port:
            number: 80

Are there any error messages in API Clarity logs?

(e.g. kubectl logs -n apiclarity --selector=app=apiclarity)

Anything else we need to know?:

Environment: