We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
deck validate
#
We use deck validate to check our configurations before deploying instances of kong for testing in CI/CD.
I recently ran into an issue where a container would not start because the # was missing from the end of a regex route capture.
The service in our declarative file:
services: - name: myService host: my-alb-upstreamService.com protocol: https port: 443 connect_timeout: 15000 write_timeout: 30000 read_timeout: 30000 retries: 3 routes: - name: my_route priority: 150 expression: lower(http.path) ~ r#"^/api/v[0-9]+/accounts/[0-9]+/someResource/[a-z0-9-]+/someSubResource(?:/.*)?$" preserve_host: true strip_path: false
The error output when we started the container:
Error: 2024/10/17 13:33:39 [error] 1#0: init_by_lua error: /usr/local/share/lua/5.1/kong/init.lua:730: error parsing declarative config file /kong/declarative/kong.yml: in 'services': - in entry 10 of 'services': in 'routes': - in entry 1 of 'routes': in '@entity': - in entry 1 of '@entity': Router Expression failed validation: --> 1:1[18](https://github.com/Bandwidth/api-dev-config/actions/runs/11386053265/job/31677339752#step:9:19) | 1 | lower(http.path) ~ r#"^/api/v[0-9]+/accounts/[0-9]+/someResource/[a-z0-9-]+/someSubResource(?:/.*)?$" | ^--- | = expected rawstr_char
Adding the missing # allowed my container to start - but I would expect this to have been caught when running deck validate
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We use deck validate to check our configurations before deploying instances of kong for testing in CI/CD.
I recently ran into an issue where a container would not start because the
#
was missing from the end of a regex route capture.The service in our declarative file:
The error output when we started the container:
Adding the missing
#
allowed my container to start - but I would expect this to have been caught when runningdeck validate
The text was updated successfully, but these errors were encountered: