fffonion on tls-passthrough
tests(router) add test for TLS … (compare)
fffonion on tls-passthrough
test tests(router) add test for TLS … (compare)
bungle on next
chore(deps) bump lua-resty-open… (compare)
bungle on resty-openssl-0-6-11
KONG_NGINX_MAIN_ENV
. This works for a single variable, but I need to expose multiple. Any idea how I can do that? Thanks in advance.
Good day all I may log an issue but I'd like to check here first, I have a simple go plugin setup and I would like to run db_import command but I always get the following error message whenever the custom plugin is enabled in the plugins env var:
2020/10/06 17:04:24 [verbose] Kong: 2.1.4
Error:
/usr/local/share/lua/5.1/kong/db/dao/plugins/go.lua:42: attempt to index upvalue 'kong' (a nil value)
stack traceback:
/usr/local/share/lua/5.1/kong/db/dao/plugins/go.lua:42: in function 'is_on'
/usr/local/share/lua/5.1/kong/db/schema/plugin_loader.lua:184: in function 'load_subschema'
...are/lua/5.1/kong/db/schema/others/declarative_config.lua:222: in function 'load_plugin_subschemas'
...are/lua/5.1/kong/db/schema/others/declarative_config.lua:234: in function 'load_plugin_subschemas'
...are/lua/5.1/kong/db/schema/others/declarative_config.lua:730: in function 'load'
/usr/local/share/lua/5.1/kong/db/declarative/init.lua:37: in function 'new_config'
/usr/local/share/lua/5.1/kong/cmd/config.lua:82: in function 'cmd_exec'
/usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:88>
[C]: in function 'xpcall'
/usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:45>
/usr/local/bin/kong:9: in function 'file_gen'
init_worker_by_lua:49: in function <init_worker_by_lua:47>
[C]: in function 'xpcall'
init_worker_by_lua:56: in function <init_worker_by_lua:54>
2020/10/06 17:04:24 [verbose] prefix in use: /usr/local/kong
Has any 1 seen this before?
Hi there,
I am new to kong, I'm trying enable go_plugins, but I get this error. Any hint?
This is my kong.conf
plugins = bundled,go-hello
go_pluginserver_exe = /usr/local/bin/go-pluginserver
go_plugins_dir = /usr/local/kong/go_plugins/
I'm using this docker-compose https://github.com/baxiang/docker_compose/blob/master/kong/docker-compose.yml
Thanks in advance.
kong | sh: /usr/local/bin/go-pluginserver: not found
kong | 2020/11/23 11:08:22 [error] 1#0: init_by_lua error: /usr/local/share/lua/5.1/MessagePack.lua:813: missing bytes
kong | stack traceback:
kong | [C]: in function 'error'
kong | /usr/local/share/lua/5.1/MessagePack.lua:813: in function 'underflow'
kong | /usr/local/share/lua/5.1/MessagePack.lua:529: in function 'unpack_cursor'
kong | /usr/local/share/lua/5.1/MessagePack.lua:843: in function 'unpack'
kong | /usr/local/share/lua/5.1/kong/db/dao/plugins/go.lua:463: in function 'get_plugin_info'
kong | /usr/local/share/lua/5.1/kong/db/dao/plugins/go.lua:472: in function 'get_plugin'
kong | /usr/local/share/lua/5.1/kong/db/dao/plugins/go.lua:519: in function 'load_plugin'
kong | /usr/local/share/lua/5.1/kong/db/dao/plugins.lua:159: in function 'load_plugin_handler'
kong | /usr/local/share/lua/5.1/kong/db/dao/plugins.lua:243: in function 'load_plugin'
kong | /usr/local/share/lua/5.1/kong/db/dao/plugins.lua:295: in function 'load_plugin_schemas'
kong | /usr/local/share/lua/5.1/kong/init.lua:467: in function 'init'
kong | init_by_lua:3: in main chunk
kong | nginx: [error] init_by_lua error: /usr/local/share/lua/5.1/MessagePack.lua:813: missing bytes
kong | stack traceback:
kong | [C]: in function 'error'
kong | /usr/local/share/lua/5.1/MessagePack.lua:813: in function 'underflow'
kong | /usr/local/share/lua/5.1/MessagePack.lua:529: in function 'unpack_cursor'
kong | /usr/local/share/lua/5.1/MessagePack.lua:843: in function 'unpack'
kong | /usr/local/share/lua/5.1/kong/db/dao/plugins/go.lua:463: in function 'get_plugin_info'
kong | /usr/local/share/lua/5.1/kong/db/dao/plugins/go.lua:472: in function 'get_plugin'
kong | /usr/local/share/lua/5.1/kong/db/dao/plugins/go.lua:519: in function 'load_plugin'
kong | /usr/local/share/lua/5.1/kong/db/dao/plugins.lua:159: in function 'load_plugin_handler'
kong | /usr/local/share/lua/5.1/kong/db/dao/plugins.lua:243: in function 'load_plugin'
kong | /usr/local/share/lua/5.1/kong/db/dao/plugins.lua:295: in function 'load_plugin_schemas'
kong | /usr/local/share/lua/5.1/kong/init.lua:467: in function 'init'
kong | init_by_lua:3: in main chunk
bash-5.0# ls -la /usr/local/bin/
total 8012
drwxr-xr-x 1 1000 1000 4096 Nov 23 14:51 .
drwxr-xr-x 1 root root 4096 Sep 22 18:32 ..
drwxr-xr-x 1 root root 4096 Nov 23 14:51 go-plugins
-rwxr-xr-x 1 root root 8151112 Nov 23 14:51 go-pluginserver
-rwxr-xr-x 1 1000 1000 451 Sep 18 18:51 json2lua
-rwxr-xr-x 1 kong root 238 Sep 18 18:51 kong
-rwxr-xr-x 1 1000 1000 450 Sep 18 18:51 lapis
-rwxr-xr-x 1 1000 1000 451 Sep 18 18:51 lua2json
-rwxr-xr-x 1 1000 1000 1482 Sep 18 18:51 luarocks
-rwxr-xr-x 1 1000 1000 964 Sep 18 18:51 luarocks-admin
Hi, my microservices receive https traffic on a non-443 port.
While accessing my website api - I get the following error in the network tab in Chrome(failed)net::ERR_HTTP2_PROTOCOL_ERROR
and the logs of the kong proxy pod show that its using http to access the pods of the application
I have the following questions
How do I make sure it uses https to communicate with my microservices? In the official K8s ingress, I just an annotation : nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
How do I enforce HTTP 1.1 instead of HTTP2?
_format_version: "2.1"
.rbac_config: &rbac_config
roles: [ ]
roles_claim_name: roles
token_in_header: X-Identity
services:
- name: dummy-service
url: http://localhost:8080
routes:
- name: getData
paths:
- /data
methods:
- GET
plugins:
- name: jwt-auth-rbac
config:
<<: *rbac_config
roles:
- admin
- designer
- operator
- name: postData
paths:
- /data
methods:
- POST
plugins:
- name: jwt-auth-rbac
config:
<<: *rbac_config
roles:
- admin
deck validate --verbose 2
Error: reading file: validating file content: 1 errors occurred:
(root): Additional property .rbac_config is not allowed
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: analytics-app1
namespace: app1-stage-namespace
annotations:
konghq.com/strip-path: "true"
konghq.com/plugins: analytics-app1-key-auth, analytics-ip-whitelisting
configuration.konghq.com: force-https
spec:
rules:
- host: api.example.me
http:
paths:
- path: /app1
backend:
serviceName: app1-stage-service
servicePort: 3000
Hi guys! I hope you are having a good day, today I have a problem when Im trying to install kong ingress with helm and postgresql (for practice purposes)
Im using helm chart to install that, using this values.yaml file:
env:
database: 'postgres'
pg_host: '172.21.3.90'
pg_port: 5432
pg_user: 'kongtest'
pg_password: 'kongtest'
pg_database: 'kongtest'
ingressController:
installCRDs: false
ingressClass: kong-test
admin:
enabled: true
http:
enabled: true
tls:
enabled: false
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: kong-test
konghq.com/strip-path: "true"
path: /kong
helm install kong-test kong/kong values.yaml
but the deployment stucks with this states:
kong-test-kong-58c6d94bd9-t7vds 0/2 Init:0/1 0 133m
kong-test-kong-init-migrations-kndjn 0/1 Completed 0 133m
and the pod logs show me this:
F1203 14:31:13.859375 25215 helpers.go:115] error: a container name must be specified for pod kong-test-kong-58c6d94bd9-t7vds, choose one of: [ingress-controller proxy] or one of the init containers: [wait-for-db]
anyone have any idea how i could solve this? thanks!
Finally I found the solution adding this env var in my values.yaml
KONG_LUA_PACKAGE_PATH: './?.lua;./?/init.lua;'
according to this post:
Kong/kong#6022
Im not implementing any new plugin, only a new fresh kong ingress instance inside k8s, but its works for me.
i want to use kong to proxy kube-apiserver request,
some request use http upgade to websocket
likes with nginx config:
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
it works well on nginx;
Hey Guys, I am writing a plugin in Go language because I needed to do some grpc requests inside plugin logic, and I didn't found any good grpc library in Lua...
My question is: is there a way to add some metrics to the kong Prometheus from the go plugin ? If no, what should be the solution to add some monitoring/metrics from go plugin ?