News KrakenD Enterprise v2.6 released with OpenTelemetry, FIPS-140, gRPC server and more

KrakenD 2.0 released!

by Albert Lombarte

Mar 7, 2022

8 min read

KrakenD 2.0 is here!

The KrakenD team is pleased to announce the major release KrakenD 2.0. You can get it packaged from the download page.

🚀 Summary of changes for CEv2.0

KrakenD 2.0 is the new major version of KrakenD bringing a lot of improvements to the API Gateway. GraphQL, specific request/modifier plugins, async agents, easier configuration, better logging, and a more flexible router to put a few examples.

  • REST to GraphQL conversion, or direct consumption of GraphQL through the gateway
  • Backend response logging
  • New plugin types (request/response)
  • Plenty of new configurable router flags
  • The krakend check adds verbosity level
  • A new command krakend check-plugin for quicker development of custom plugins
  • Shortened configuration namespaces.
  • Async agents
  • Better logging, with more context
  • Alpine-based Docker image
  • To upgrade the configuration from v0.x or v1.x see the legacy migration tool

Upgrading to the latest version is always advised.

Migration guide
If you are an existing KrakenD user read “Migrating from KrakenD 1.x and 0.x.

Details of what’s new

The most relevant additions and changes on KrakenD 2.0 are:

GraphQL

REST to GraphQL conversion, or direct consumption of GraphQL through the gateway. Use GraphQL to define new backend queries and expose them as regular REST endpoints to your clients, federate content. GraphQL documentation

New plugin types

The request/response plugin modifiers are two new types of Go plugins to directly modify requests and responses from and to backends, complementing the existing handler and client plugins. Users who are currently using custom logic in Lua scripts can boost its performance. Plugin modifier documentation

Configurable router flags

There are plenty of configurable router flags such as returning the gateway error to the client (e.g: a timeout), redirection options, automatic OPTIONS, better ways get the real IP (including through Trusted Proxies), or removing entries from the logs such as hiding the /__health endpoint. See all new router flags

More developer friendly

KrakenD has been always easy to configure, but we wanted to improve the logs and information available while developing:

  • The krakend check command adds now multiple levels of debug verbosity and colors for easier understanding of the configuration
  • A new command krakend check-plugin lets you check your custom plugins for compatibility
  • We have shortened and classified all extra_config namespaces, for better comprehension and usage of the components. When there was a URL-like component such as "github.com/devopsfaith/krakend-cors" now becomes a category/functionality such as "security/cors".
  • A new migration tool takes care of the transition from 0.x and 1.x to 2.x to make the process straightforward.
  • Better logs with more context. All log lines have been rewritten, adding a prefix grouping them with more information, like which endpoint or backend raised the line of a specific component.
  • Plugins with access to the logger: If you had custom plugins, now they can use the KrakenD logger to enrich your gateway output.
  • Alpine-based Docker image: Docker image extending from Alpine, making it a very lightweight image and without dragging all the security issues of larger containers like Debian.

Async agents

Prior to this version, any KrakenD activity was preceeded by a call to the API. Now, KrakenD is able to listen queues and act as a consumer or a producer on its own, without requiring an end-user request. For instance, when KrakenD detects that a new message has entered a queue (many technologies supported) it can trigger a call to a backend of your choice. Async agents documentation.

Migrate now to KrakenD 2.0!

KrakenD configuration syntax has changed a little bit from KrakenD 1.x. Execute the migration tool to apply those changes automatically.

Detailed changelog

The full list of commits in KrakenD and its components is:

Changes in KrakenD-CE

  • integration tests fixed
  • Merge branch ‘v2.0-dev’ into glibc_flags
  • Update KrakenD version in tests
  • update find_glibc script
  • Added script to find the GLIBC version
  • benchmark task fixed
  • benchmark task added
  • lura version updated
  • lura upgraded to v2.0.1
  • lura updated to v2.0.0
  • check and check-plugin commands updated
  • req-resp modifier alias fixed
  • lura deps updated
  • lura deps updated
  • Update Readme
  • Rename headers_to_pass and querystring_params to input_headers and input_query_strings
  • Fix GLIBC_VERSION assignation in the Dockerfile
  • instrumentation for the noroute and nomethod handlers added
  • support for using namespaced jwt claims at the backend url pattern added
  • Add new ldflags with the Go and Glibc version used to build KrakenD so plugins can easily match the required versions
  • Assign the “questions” label to new asking for help
  • normalize the config alias just at the run cmd
  • cobra deps updated
  • async agents added
  • Apply new namespaces to fixtures
  • Fix readme indent typo
  • Update configurations version
  • Update lura. NewEngine now accepts a gin Logformatter (can be nil)
  • Create SECURITY.md
  • logger passed to the mw factories
  • Declare krakend-integration input body as either string or object
  • Use alpine by default for the official docker image. The ‘build_on_docker’ instruction will still use debian buster and it’s used to compile krakend for the rpm/deb/tgz packages.
  • Add a default config file. Create the user with a fixed uid #196.
  • jose: support for debugging operations added
  • jose and lura deps updated
  • setup the list of namespace aliases
  • logger passed to the handler factory
  • botdetector, jose and lura deps updated
  • travis config removed
  • lua pkg updated
  • set the prefix for the default logger
  • lura and cobra deps updated
  • lua dep updated
  • deps updated
  • Improve logging
  • lua dep updated
  • deps updated
  • Upgrade runner to go 1.17
  • deps fixed
  • Upgrade to Lura 2.0
  • Update some paths and links in README.md
  • lura version passed to the reporter
  • Declare expected response as either string or json object

Changes in bloomfilter

  • lura updated to v2.0.0
  • json tags added
  • Improve logging
  • Upgrade to Lura 2.0

Changes in krakend-amqp

  • lura updated to v2.0.0
  • lura updated to v2.0.0-rc
  • async pkg added
  • fix the ack/nack strategy
  • deps updated to v2
  • Upgrade to Lura 2.0
  • Add log prefix with context
  • Add log prefix with context

Changes in krakend-botdetector

  • mux tests fixed
  • lura updated to v2.0.0
  • log errBotRejected
  • rename Register for NewMiddleware
  • fix duplicated imports
  • add mux support
  • logs normalized
  • Fix tests
  • Improve logging
  • Upgrade to Lura 2.0
  • Normalize attribute names
  • Include prefix in errors

Changes in krakend-cel

  • lura updated to v2.0.0
  • minor fix
  • logs improved
  • Improve logging
  • Upgrade to Lura 2.0
  • Simpler error management
  • Include prefix in errors

Changes in krakend-circuitbreaker

  • lura updated to v2.0.0
  • Upgrade to 2.0
  • Upgrade to Lura 2.0
  • Upgrade to Lura 2.0
  • Improve logging, normalize parameter names

Changes in krakend-cobra

  • lura updated to v2.0.0-rc
  • minor format type fixed
  • do not read the file twice if no linting is required
  • libc check added to the check-plugin command
  • check command is able to validate the config against the json schema
  • async agents added
  • minor refactor
  • plugin checker cmd added
  • minor fixes
  • Fix dumper format
  • Fix dumper format
  • minor refactor
  • cfgDumper added for easier cmd management
  • extra verbosity levels added
  • timeout added to the endpoint level
  • minor refactor
  • Upgrade to Lura 2.0

Changes in krakend-cors

  • lura updated to v2.0.0
  • avoid using nil loggers
  • Upgrade to Lura 2.0
  • Improve logging

Changes in krakend-flexibleconfig

  • Upgrade to Lura 2.0
  • Improve logging

Changes in krakend-gelf

  • Upgrade to Lura 2.0

Changes in krakend-gologging

  • lura updated to v2.0.0
  • remove size limitation for the level tag
  • default log format shows the full level name
  • Upgrade to Lura 2.0

Changes in krakend-httpcache

  • lura updated to v2.0.0
  • shared cache option added
  • Upgrade to Lura 2.0

Changes in krakend-httpsecure

  • lura updated to v2.0.0
  • Remove Gopkg
  • Upgrade to go 1.17
  • Upgrade to Lura 2.0
  • Improve logging

Changes in krakend-influx

  • lura updated to v2.0.0
  • Expose no config error
  • Upgrade to Lura 2.0
  • Improve logging
  • early return if pts is empty
  • preventing unnecessary influx call for non-exist failed points.

Changes in krakend-jose

  • lura updated to v2.0.0
  • typo fixed
  • support for debugging operations added
  • return an error when the key ID is not present in the cached key set
  • logging improved
  • validator disabled log improved
  • Upgrade to Lura 2.0
  • Add log prefix with context
  • Add log prefix with context

Changes in krakend-jsonschema

  • lura updated to v2.0.0
  • logger added to the factory
  • Upgrade to Lura 2.0

Changes in krakend-lambda

  • lura updated to v2.0.0
  • logger added to the factory
  • Upgrade to Lura 2.0

Changes in krakend-logstash

  • Upgrade to Lura 2.0

Changes in krakend-lua

  • lura updated to v2.0.0
  • close method added to the response for better resource management
  • typo fixed
  • logging of file loader errors improved
  • namespaces fixed
  • Improve logging
  • Upgrade to Lura 2.0
  • Add log prefix with context

Changes in krakend-martian

  • Upgrade to Lura 2.0

Changes in krakend-metrics

  • Improve logging
  • Upgrade to Lura 2.0

Changes in krakend-oauth2-clientcredentials

  • Upgrade to Lura 2.0

Changes in krakend-opencensus

  • Add an ExtraConfig to the exporters so it’s easier to add additional configuration
  • Expose no config error
  • Upgrade to Lura 2.0
  • README.md updated - fix typos and broken links
  • Improve logging
  • change buffermaxcount to buffer_max_count
  • make BufferMaxCount configurable
  • Auto-detect resource in stackdriver exporter

Changes in krakend-pubsub

  • Upgrade to Lura 2.0
  • Improve logging

Changes in krakend-ratelimit

  • log the initializations
  • Upgrade to Lura 2.0
  • Improve logging

Changes in krakend-rss

  • Upgrade to Lura 2.0

Changes in krakend-viper

  • Upgrade to Lura 2.0

Changes in krakend-xml

  • Upgrade to Lura 2.0

Categories: Product Updates

Scarf
 Stay up to date with KrakenD releases and important updates