GithubHelp home page GithubHelp logo

krakend-documentation's Introduction

KrakenD Documentation

All the documentation uses Markdown syntax and the site is generated using Hugo. After your contribution this repository will be used to compile all the documentation.

If you want to use a server to browse this pages, although not necessary, you can copy the folder inside the content directory in any Hugo installation.

Contribute!

Feel free to fork this repository and contribute to a better KrakenD documentation.

If you'd like to add a new language please open an issue before doing the work as we will need to add the support before it is visible.

Thanks for improving the docs!

Helpers when writing

Besides from the regular Markdown to write content, there are a few shortcodes to help you style the documentation:

Add a yellow note:

For important notes, and things that need special, attention:

{{< note title="A note on JWT generation" >}}
Some big yellow block with a note
{{< /note >}}

Show terminal output:

The CSS will prepend a dollar sign $ in the first line.

{{< terminal title="Title of the box">}}
docker build -t mykrakend .
Sending build context to Docker daemon   5.12kB
Step 1/2 : FROM devopsfaith/krakend
---> c7e33ec819c0
Step 2/2 : COPY krakend.json /etc/krakend/krakend.json
---> 703818e9de3a
Successfully built 703818e9de3a
Successfully tagged mykrakend:latest
{{< /terminal >}}

Highlight some code:

Most of the code is just idented with a tab and Markdown renders it properly as a <pre> tag and we prefer not to colorize it much. Nevertheless this can be done with the following shortcode:

{{< highlight json >}}
{ "a": true }
{{< /highlight >}}

You can also highlight a line, specific lines 6 7, or a range 6-8:

{{< highlight go "hl_lines=6-7" >}}
package krakend

import (
    "github.com/devopsfaith/krakend/logging"
    client "github.com/devopsfaith/krakend/transport/http/client/plugin"
    server "github.com/devopsfaith/krakend/transport/http/server/plugin"
)
{{< /highlight >}}

The documentation of the attributes is autoloaded from its json schema definition. You will find lines like the following:

{{< schema data="folder/file.json" >}}

The data attribute loads the file from the krakend-schema repository, using the same path.

krakend-documentation's People

Contributors

adarah avatar alombarte avatar atultherajput avatar cbasener avatar civilizeddev avatar colddegree avatar cucumissativus avatar euthygenes avatar john5000 avatar karmops avatar klaude avatar kpacha avatar lengcheng111 avatar melody-pps avatar munsman avatar novalagung avatar obokaman-com avatar omacchioni avatar rabmam2000 avatar rgomezcasas avatar samstride avatar sdepablos avatar slangwald avatar suadev avatar taik0 avatar taqiabdulaziz avatar thiagoarrais avatar tommy-gilligan avatar trojanh avatar wadelma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

krakend-documentation's Issues

Logging, metrics and tracers

  • Types of metrics you can see (timers, gauges, histograms… of your requests)
  • Metrics (/__stats endpoint)
  • Using the metrics
    - Sending metrics to Influx
  • Logger (logrus, logstash)
    - Opencensus Exporters
    - Send traces to InfluxDB
    - Send traces to Zipkin
    - Send traces to Prometheus
    - Send traces to Jaeger
    - Send traces to Logger

Include append operation

the flatmap feature is being extended with the append operation (as per krakend/flatmap#4).

Given this configuration

{
    "type": "append",
    "args": ["collection2", "collection"]
}

and this response from the backend

{
	"collection": [1,2,3]
	"collection2": [10,20,30]
}

the gateway will generate this response

{
	"collection": [1,2,3,10,20,30]
}

Improve SD documentation

neither the etcd nor the dns sections mention the required "disable_host_sanitize": true option

Document the JWT claims extraction

Since 1.2.0 it is possible to use first level claims from the JWT in the url pattern definition:

"url_pattern": "/foo/{JWT.sub}"

Notice that accepting such notation at the configuration is independent from the extractor (that's on the JOSE validator). If the JOSE validator is not defined and a JWT claim is used at the url pattern, the final url will contain the placeholder (the backend will get a request to /foo/{JWT.sub})

JWT needs more explanation ¯\_(ツ)_/¯

Given the number of requests we have around JWT usage, although this is not linked to the gateway we should at least:

  • Explain that JWK keys need to be in base64 urlencoded
  • JWT needs the kid in the header

Plain HTTP download

On https://www.krakend.io/download/ the download (Download tgz) is served with plain http. Additionally:

  • manually changing the url to https doesn't work
  • the GitHub releases doesn't contain binaries
  • the SHA is served with plain HTTP

There are other options but it is nice that with go I can download binaries, but without https this option seems unwieldy.

Add documentation for static proxy

The static proxy is not documented.

  • It injects static data into the response before returning it to the router.
  • It supports different strategies for deciding if the static data should be added or not

Here, an example from the integration tests: https://github.com/devopsfaith/krakend/blob/master/test/krakend.json#L9-L30

supported strategies:

  • always
  • success
  • errored
  • complete
  • incomplete

what do they mean? https://github.com/devopsfaith/krakend/blob/master/proxy/static.go#L100-L104

Add Proxy and Route Plugin Examples

  • An explanation of the basic structure of plugins would be helpful to get started
  • A few very basic examples of plugins would be helpful as well

Document the proxy flatmap module

this PR (luraproject/lura#395) introduces a new flatmap proxy at the proxy pipe, allowing users to manipulate the result of the merge operation.

the configuration has the same struct and the same namespace, but ir should be placed at the endpoint's extra config

Complete flexibleconfig documentation

the sub templates feature is not covered by the current documentation.

  • env var FC_TEMPLATES for custom folder where sub templates should be loaded from
  • sub templates are included with the function template (from the golang stdlib)
{{template "name" pipeline}}
	The template with the specified name is executed with dot set
	to the value of the pipeline.

Add no-op encoding

there is no reference to the no-op encoders (neither output_encoder nor encoder)

BloomFilter Guide

Hello i've been wanting to configure the bloomfilter plugin
therefore ive been looking for documentation and could not find much information about how to set it up within krakenD, it would be great if you can make a how to guide on how to setup the bloomfilter

something like how to configure the the bloomfilter in the config, as well as to have an example of sending a token which then gets declined by the gateway.

Outdated benchmarks

Hi there!

I'm your colleague from Tyk.io :)

I noticed that benchmarks you have on the website are 4-5 years old (if we talking about https://github.com/varnish/api-gateway-benchmarks). And on your comparison page, you also say that it was last run "August 2015".

Since you mention this numbers also on your landing page, it would be at least fair to re-run benchmarks with a new Kong and Tyk versions. At the moment such old tests work against you.

I'm happy to help with the benchmarking suite if you will be interested!

Cheers!

Document flatmap filtering

Supported operations:

  • Delete by matching pattern
  • Move from src pattern to dst pattern

Pattern rules:

  • Keys are separated by .
  • * is a wildcard and matches any kind of key (property name or collection element)

Sample backend definition with flatmap filter:

 {
    "host": [ "http://127.0.0.1:8081" ],
    "url_pattern": "/collection/{id}",
    "is_collection": true,
    "extra_config": {
        "github.com/devopsfaith/krakend/proxy": {
            "flatmap_filter": [
                {
                    "type": "move",
                    "args": ["collection", "paths"]
                },
                {
                    "type": "del",
                    "args": ["paths.*.i"]
                },
                {
                    "type": "move",
                    "args": ["paths.*.path", "paths.*.url"]
                }
            ]
        }
    }
}

notice: when the flatmap filter is enabled, the withelist, blacklist and mapping attributes are ignored (group and target are still in use).

Move patterns (src => dst):

src dst allowed
"a.*.b.*.c" "a.*.b.*.d" 👍
"a.*.b.*.c" "a.*.c" 👎
"a.b.c" "c" 👍
"a.*.b.c" "c" 👎
"a.*.b.c" "a.*.b.*.d.*.e" 👎
"a.*.b.*.c" "a.*.b.*.c.d.e.f.g" 👍
"a.*.b.*.c" "a.*.x.*.c.d.e.f.g" 👎
"a.*.b.*.c" "a.*.x.*.c" 👎

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.