Kong / kubernetes-ingress-controller

:gorilla: Kong for Kubernetes: The official Ingress Controller for Kubernetes.
https://docs.konghq.com/kubernetes-ingress-controller/
Apache License 2.0
2.21k stars 591 forks source link

KongConsumer cannot be programmed. Error: Entity tags missing fields {"name": "", "error": "no name"} #6530

Open konsti opened 1 month ago

konsti commented 1 month ago

Is there an existing issue for this?

Current Behavior

I deploy the KIC with the Kubernetes Gateway Operator. Using the example configuration from the documentation with

When I try to create a KongConsumer resource, e.g.:

apiVersion: configuration.konghq.com/v1
kind: KongConsumer
metadata:
  name: example-consumer
  namespace: example
  annotations:
    kubernetes.io/ingress.class: "kong"
username: example-consumer
credentials:
- example-basic-auth

The controller fails to sync the config to the data plane with the following error:

2024-09-26 11:46:46.570 
2024-09-26T09:46:46Z    error   Entity tags missing fields  {"name": "", "error": "no name"}

The data plane reports an 400 error:

"POST /config?check_hash=1&flatten_errors=1 HTTP/1.1" 400 1133 "-" "Go-http-client/1.1"

Switching to versions:

solves the issue and the KongConsumer is synced.

Expected Behavior

The KongConsumer can be synced without an error.

Steps To Reproduce

1. Install the newest versions of the ingress-controller and kong.
2. Try to create a new `KongConsumer` resource.

Kong Ingress Controller version

3.3.1

Kubernetes version

Server Version: v1.30.4+k3s1

Anything else?

No response

randmonkey commented 3 weeks ago

I could not reproduce the issue without the credentials part. The error seems to be triggered by the credentials. Could you please provide the details of your secret example-basic-auth?

m-okm commented 2 weeks ago

I have the same issue and was able to reproduce it with the basic-auth plugin sample data.

Secret config is:

apiVersion: v1
kind: Secret
metadata:
  name: alex-basic-auth
  labels:
    konghq.com/credential: basic-auth
stringData:
  username: alex
  password: secret123
fredericve commented 1 week ago

Seeing the same problem here. Using similar config to the sample data. Works fine with older versions.