MCPcopy
hub / github.com/zalando/skipper

github.com/zalando/skipper @v0.27.21 sqlite

repository ↗ · DeepWiki ↗ · release v0.27.21 ↗
6,816 symbols 34,040 edges 759 files 1,389 documented · 20%
README

Build Status Doc Go Reference License Go Report Card Coverage Status GitHub release OpenSSF Best Practices OpenSSF Scorecard Slack CodeQL

Skipper

Skipper

Skipper is an HTTP router and reverse proxy for service composition. It's designed to handle >300k HTTP route definitions with detailed lookup conditions, and flexible augmentation of the request flow with filters. It can be used out of the box or extended with custom lookup, filter logic and configuration sources.

Main features:

An overview of deployments and data-clients shows some use cases to run skipper.

Skipper

  • identifies routes based on the requests' properties, such as path, method, host and headers
  • allows modification of the requests and responses with filters that are independently configured for each route
  • simultaneously streams incoming requests and backend responses
  • optionally acts as a final endpoint (shunt), e.g. as a static file server or a mock backend for diagnostics
  • updates routing rules without downtime, while supporting multiple types of data sources — including etcd, Kubernetes Ingress, static files, route string and custom configuration sources
  • can serve as a Kubernetes Ingress controller without reloads. You can use it in combination with a controller that will route public traffic to your skipper fleet; see AWS example
  • shipped with
  • eskip: a descriptive configuration language designed for routing rules
  • routesrv: proxy to omit kube-apiserver overload leveraging Etag header to reduce amount of CPU used in your skipper data plane
  • webhook: Kubernetes validation webhook to make sure your manifests are deployed safely

Skipper provides a default executable command with a few built-in filters. However, its primary use case is to be extended with custom filters, predicates or data sources. Go here for additional documentation.

A few examples for extending Skipper:

  • Example proxy with custom filter https://github.com/szuecs/skipper-example-proxy
  • Image server https://github.com/zalando-stups/skrop
  • Plugins repository https://github.com/skipper-plugins/, plugin docs

Getting Started

Prerequisites/Requirements

In order to build and run Skipper, only the latest version of Go needs to be installed. Skipper can use Innkeeper or Etcd as data sources for routes, or for the simplest cases, a local configuration file. See more details in the documentation: https://pkg.go.dev/github.com/zalando/skipper

Installation

From Binary

Download binary tgz from https://github.com/zalando/skipper/releases/latest

Example, assumes that you have $GOBIN set to a directory that exists and is in your $PATH:

% curl -LO https://github.com/zalando/skipper/releases/download/v0.14.8/skipper-v0.14.8-linux-amd64.tar.gz
% tar xzf skipper-v0.14.8-linux-amd64.tar.gz
% mv skipper-v0.14.8-linux-amd64/* $GOBIN/
% skipper -version
Skipper version v0.14.8 (commit: 95057948, runtime: go1.19.1)
From Source
% git clone https://github.com/zalando/skipper.git
% make
% ./bin/skipper -version
Skipper version v0.14.8 (commit: 95057948, runtime: go1.19.3)

Running

Create a file with a route:

echo 'hello: Path("/hello") -> "https://www.example.org"' > example.eskip

Optionally, verify the file's syntax:

eskip check example.eskip

If no errors are detected nothing is logged, else a descriptive error is logged.

Start Skipper and make an HTTP request:

skipper -routes-file example.eskip &
curl localhost:9090/hello
Docker

To run the latest Docker container:

docker run registry.opensource.zalan.do/teapot/skipper:latest

To run eskip you first mount the .eskip file, into the container, and run the command

docker run \
  -v $(PWD)/doc-docker-intro.eskip:/doc-docker-intro.eskip \
  registry.opensource.zalan.do/teapot/skipper:latest eskip print doc-docker-intro.eskip

To run skipper you first mount the .eskip file, into the container, expose the ports and run the command

docker run -it \
    -v $(PWD)/doc-docker-intro.eskip:/doc-docker-intro.eskip \
    -p 9090:9090 \
    -p 9911:9911 \
    registry.opensource.zalan.do/teapot/skipper:latest skipper -routes-file doc-docker-intro.eskip

Skipper will then be available on http://localhost:9090

Authentication Proxy

Skipper can be used as an authentication proxy, to check incoming requests with Basic auth or an OAuth2 provider or an OpenID Connect provider including audit logging. See the documentation at: https://pkg.go.dev/github.com/zalando/skipper/filters/auth.

Working with the code

Getting the code with the test dependencies (-t switch):

git clone https://github.com/zalando/skipper.git
cd skipper

Build and test all packages:

make deps
make install
make lint
make shortcheck

On Mac the tests may fail because of low max open file limit. Please make sure you have correct limits setup by following these instructions.

Working from IntelliJ / GoLand

To run or debug skipper from IntelliJ IDEA or GoLand, you need to create this configuration:

Parameter Value
Template Go Build
Run kind Directory
Directory skipper source dir + /cmd/skipper
Working directory skipper source dir (usually the default)

Kubernetes Ingress

Skipper can be used to run as an Kubernetes Ingress controller. Details with examples of Skipper's capabilities and an overview you will can be found in our ingress-controller deployment docs.

For AWS integration, we provide an ingress controller https://github.com/zalando-incubator/kube-ingress-aws-controller, that manage ALBs or NLBs in front of your skipper deployment. A production example for skipper and a production example for kube-ingress-aws-controller, can be found in our Kubernetes configuration https://github.com/zalando-incubator/kubernetes-on-aws.

Documentation

Skipper's Documentation and Godoc developer documentation, includes information about deployment use cases and detailed information on these topics:

1 Minute Skipper introduction

The following example shows a skipper routes file in eskip format, that has 3 named routes: baidu, google and yandex.

% cat doc-1min-intro.eskip
baidu:
        Path("/baidu")
        -> setRequestHeader("Host", "www.baidu.com")
        -> setPath("/s")
        -> setQuery("wd", "godoc skipper")
        -> "http://www.baidu.com";
google:
        *
        -> setPath("/search")
        -> setQuery("q", "godoc skipper")
        -> "https://www.google.com";
yandex:
        * && Cookie("yandex", "true")
        -> setPath("/search/")
        -> setQuery("text", "godoc skipper")
        -> tee("http://127.0.0.1:12345/")
        -> "https://yandex.ru";

Matching the route:

  • baidu is using Path() matching to differentiate the HTTP requests to select the route.
  • google is the default matching with wildcard *
  • yandex is the default matching with wildcard * if you have a cookie yandex=true

Request Filters:

  • If baidu is selected, skipper sets the Host header, changes the path and sets a query string to the http request to the backend "http://www.baidu.com".
  • If google is selected, skipper changes the path and sets a query string to the http request to the backend "https://www.google.com".
  • If yandex is selected, skipper changes the path and sets a query string to the http request to the backend "https://yandex.ru". The modified request will be copied to "http://127.0.0.1:12345/"

Run skipper with the routes file doc-1min-intro.eskip shown above

% skipper -routes-file doc-1min-intro.eskip

To test each route you can use curl:

% curl -v localhost:9090/baidu
% curl -v localhost:9090/
% curl -v --cookie "yandex=true" localhost:9090/

To see the shadow traffic request that is made by the tee() filter you can use nc:

[terminal1]% nc -l 12345
[terminal2]% curl -v --cookie "yandex=true" localhost:9090/

3 Minutes Skipper in Kubernetes introduction

This introduction was moved to ingress controller documentation.

For More details, please check out our [Kubernetes ingress controller docs](https://opensource.zalando.com/ski

Extension points exported contracts — how you extend this code

PriorityRoute (Interface)
PriorityRoute are custom route implementations that are matched against each request before the routes in the general lo [31 …
proxy/proxy.go
Filter (Interface)
Filter is created by the Spec components, optionally using filter specific settings. When implementing filters, it needs [118 …
filters/filters.go
RatelimitProvider (Interface)
RatelimitProvider returns a limit instance for provided Settings [7 implementers]
filters/ratelimit/ratelimit.go
Lookuper (Interface)
Lookuper makes it possible to be more flexible for ratelimiting. [6 implementers]
ratelimit/ratelimit.go
Matcher (Interface)
Matcher objects, when using the LookupMatcher function, can be used for additional checks and to override the default re [31 …
pathmux/tree.go
DataClient (Interface)
DataClient instances provide data sources for route definitions. [9 implementers]
routing/routing.go
SecretsReader (Interface)
SecretsReader is able to get a secret [5 implementers]
secrets/readers.go
SecretSource (Interface)
(no doc) [8 implementers]
secrets/encrypter.go

Core symbols most depended-on inside this repo

Error
called by 1368
logging/logger.go
Errorf
called by 1100
logging/logger.go
Close
called by 688
metrics/metrics.go
Get
called by 597
filters/cache/storage.go
Close
called by 552
filters/auth/authclient.go
Request
called by 540
filters/filters.go
Errorf
called by 416
filters/filters.go
Set
called by 414
filters/cache/storage.go

Shape

Function 3,441
Method 2,353
Struct 838
TypeAlias 91
Interface 74
FuncType 19

Languages

Go100%

Modules by API surface

filters/openpolicyagent/openpolicyagent.go112 symbols
proxy/proxy_test.go104 symbols
filters/cache/filter_test.go89 symbols
routing/matcher_test.go77 symbols
proxy/proxy.go73 symbols
routesrv/routesrv_test.go63 symbols
dataclients/kubernetes/kube_test.go62 symbols
ratelimit/ratelimit.go59 symbols
filters/diag/diag.go56 symbols
proxy/context.go53 symbols
filters/auth/oidc.go51 symbols
scheduler/scheduler.go48 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

cel.dev/exprv0.25.1 · 1×
cloud.google.com/gov0.123.0 · 1×
cloud.google.com/go/auth/oauth2adaptv0.2.8 · 1×
cloud.google.com/go/compute/metadatav0.9.0 · 1×
cloud.google.com/go/monitoringv1.24.2 · 1×
cloud.google.com/go/storagev1.58.0 · 1×
cuelang.org/gov0.15.1 · 1×
dario.cat/mergov1.0.2 · 1×
github.com/AlexanderYastrebov/noleakv0.0.0-2023071117573 · 1×
github.com/Azure/go-ansitermv0.0.0-2025010203350 · 1×

For agents

$ claude mcp add skipper \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact