Summary
My Ingress Controller is having a strange behaviour.
From time to time, the Proxy purges the cache:
2021/06/04 10:17:12 [notice] 22#0: *5917 [lua] init.lua:260: purge(): [DB cache] purging (local) cache, client: 127.0.0.1, server: kong_admin, request: "POST /config?check_hash=1 HTTP/1.1", host: "localhost:8444"
2021/06/04 10:17:12 [notice] 22#0: *5917 [lua] init.lua:260: purge(): [DB cache] purging (local) cache, client: 127.0.0.1, server: kong_admin, request: "POST /config?check_hash=1 HTTP/1.1", host: "localhost:8444"
127.0.0.1 - - [04/Jun/2021:10:17:12 +0000] "POST /config?check_hash=1 HTTP/1.1" 201 35612 "-" "Go-http-client/1.1"
2021/06/04 10:17:16 [notice] 22#0: *5986 [lua] init.lua:260: purge(): [DB cache] purging (local) cache, client: 127.0.0.1, server: kong_admin, request: "POST /config?check_hash=1 HTTP/1.1", host: "localhost:8444"
2021/06/04 10:17:16 [notice] 22#0: *5986 [lua] init.lua:260: purge(): [DB cache] purging (local) cache, client: 127.0.0.1, server: kong_admin, request: "POST /config?check_hash=1 HTTP/1.1", host: "localhost:8444"
127.0.0.1 - - [04/Jun/2021:10:17:16 +0000] "POST /config?check_hash=1 HTTP/1.1" 201 35677 "-" "Go-http-client/1.1"
2021/06/04 10:17:19 [notice] 22#0: *6020 [lua] init.lua:260: purge(): [DB cache] purging (local) cache, client: 127.0.0.1, server: kong_admin, request: "POST /config?check_hash=1 HTTP/1.1", host: "localhost:8444"
2021/06/04 10:17:19 [notice] 22#0: *6020 [lua] init.lua:260: purge(): [DB cache] purging (local) cache, client: 127.0.0.1, server: kong_admin, request: "POST /config?check_hash=1 HTTP/1.1", host: "localhost:8444"
127.0.0.1 - - [04/Jun/2021:10:17:19 +0000] "POST /config?check_hash=1 HTTP/1.1" 201 35603 "-" "Go-http-client/1.1"
This triggers some syncing in the Ingress Controller :
time="2021-06-04T10:17:12Z" level=info msg="syncing configuration" component=controller
time="2021-06-04T10:17:12Z" level=info msg="successfully synced configuration to kong" component=controller
time="2021-06-04T10:17:16Z" level=info msg="syncing configuration" component=controller
time="2021-06-04T10:17:16Z" level=info msg="successfully synced configuration to kong" component=controller
time="2021-06-04T10:17:19Z" level=info msg="syncing configuration" component=controller
time="2021-06-04T10:17:19Z" level=info msg="successfully synced configuration to kong" component=controller
The thing is I haven’t changed anything.
Sometimes the syncing completes without any errors (or it doesn’t sync at all, ie, level=info msg="no configuration change, skipping sync to kong" component=controller), so I can access my endpoint, sometimes the syncing is not correct, and I can’t access my endpoint so I get:
curl -H "Authorization: Bearer $TOKEN" https://foo.bar/baz
{
"message":"You cannot consume this service"
}
Why could this be happening? What info can I provide to help debug this problem?
Thank you in advance!
Kong Ingress controller version: 1.2
Kong OSS: 2.4
Kubernetes version
Client Version: version.Info{Major:“1”, Minor:“18”, GitVersion:“v1.18.16”, GitCommit:“7a98bb2b7c9112935387825f2fce1b7d40b76236”, GitTreeState:“clean”, BuildDate:“2021-02-17T12:01:24Z”, GoVersion:“go1.13.15”, Compiler:“gc”, Platform:“linux/amd64”}
Server Version: version.Info{Major:“1”, Minor:“18”, GitVersion:“v1.18.16”, GitCommit:“7a98bb2b7c9112935387825f2fce1b7d40b76236”, GitTreeState:“clean”, BuildDate:“2021-02-17T11:52:32Z”, GoVersion:“go1.13.15”, Compiler:“gc”, Platform:“linux/amd64”}