-
Notifications
You must be signed in to change notification settings - Fork 590
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
Bug when creating Consumer #70
Comments
i can confirm this bug with |
Thank you for opening this issue. |
Hi @AtzeDeVries |
Hi @hbagdi we could probably add and maintain KONG supported versions on Readme so less people end up having this same error. |
Hi @heitorganzeli Thank you for your patience on this. Let us know if you encounter any other issue. |
I am also seeing this in |
@jaygorrell What is your k8s version? Could you post some logs that you're seeing? |
Sure, I'm on k8s
The |
Ah, this seems to be isolated to specifying only the This will fail to create in Kong:
Another noteworthy trait: it seems to block other Kong changes from applying. My ingress changes weren't going through to test #56 so I tried deleting the consumer resource and that cleared it right up. |
@jaygorrell Thanks for the logs and narrowing it down to
The ingress controller breaks out of the synchronization loop as soon as any operation has an error, hence the behavior. |
I do wish I had time to learn enough Go to contribute but I'll have to let someone else have the fun here :) |
@jaygorrell The following should work fine:
|
Hah, of course. Thanks for pointing that out, and opened a tiny PR to address the docs. |
Guys, when are you going to support Kong 0.14? |
Support for 0.14 has landed in the |
@hbagdi: You did fix that in later versions, I hope? I mean, why would single configuration issue for one object prevent the whole ingress controller from working? |
Is this a request for help?: yes
Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT
Kong Ingress controller version: 0.0.5
Kong version: 0.14.0
Kubernetes version (use
kubectl version
):Environment:
uname -a
): 4.1.12-112.16.7.el7uek.x86_64What happened:
I'm trying to create simple Kong configuration based on custom types tutorial
But whenever i try to create a new consumer, the controller mess up resource creation/synchronization between Kubernetes and Kong.
I'm using the following configuration for the consumer creation:
both entities get created:
kubectl describe kongconsumer consumer-team-x
curl http://<host>:<port>/consumers
although, both entities are there,
ingress-controller
keeps trying to recreate consumer object in kong using kubernetes UUID:cb2a35d1-8c46-11e8-a4ba-90b11c1dd55e
, and do complete other configuration objects setup. Controller log:and looking at admin-api logs, we can see that the controller is trying to recreate the consumer with the wrong id:
::1 - - [20/Jul/2018:18:49:32 +0000] "POST /consumers HTTP/1.1" 409 144 "-" "Go-http-client/1.1" ::1 - - [20/Jul/2018:18:49:36 +0000] "GET /consumers/cb2a35d1-8c46-11e8-a4ba-90b11c1dd55e HTTP/1.1" 404 24 "-" "Go-http-client/1.1" 2018/07/20 18:49:36 [notice] 88#0: *245958 [lua] init.lua:391: insert(): ERROR: duplicate key value violates unique constraint "consumers_username_key" Key (username)=(team-X) already exists., client: ::1, server: kong_admin, request: "POST /consumers HTTP/1.1", host: "localhost:8001" ::1 - - [20/Jul/2018:18:49:36 +0000] "POST /consumers HTTP/1.1" 409 144 "-" "Go-http-client/1.1"
note: Kong consumer uuid is:
8f81bc04-df4e-4afe-b165-3be99e67dcf6
I've tried to recreate all pods and configurations a couple a of times and with some modifications, but things always end up like that.
What you expected to happen:
I'd expect Kong object to be created with Kubernetes object UUID so controller can work properly
How to reproduce it (as minimally and precisely as possible):
i'm using a namespace similar to the one described by the controller tutorial:
https://raw.githubusercontent.com/Kong/kubernetes-ingress-controller/master/deploy/single/all-in-one-postgres.yaml
thx in advance
The text was updated successfully, but these errors were encountered: