Skip to content

Instantly share code, notes, and snippets.

@piotrekfilip
Created June 17, 2019 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save piotrekfilip/8974bf7a88de663f367d0cd089af02bf to your computer and use it in GitHub Desktop.
Save piotrekfilip/8974bf7a88de663f367d0cd089af02bf to your computer and use it in GitHub Desktop.
gravitee envoy steps to Reproduce
version: "3.7"
services:
envoy:
build:
context: .
dockerfile: Dockerfile-envoy
volumes:
- ./envoy.yaml:/etc/envoy.yaml
networks:
- envoymesh
expose:
- "80"
- "8001"
ports:
- "8080:80"
- "8001:8001"
swagger:
image: swaggerapi/swagger-ui
container_name: "swagger-ui"
expose:
- 8080
ports:
- "8081:8080"
volumes:
- ./petstore.json:/petstore.json
networks:
envoymesh:
aliases:
- swagger
environment:
BASE_URL: /swagger-ui
SWAGGER_JSON: /petstore.json
networks:
envoymesh: {}
FROM envoyproxy/envoy-dev:latest
CMD /usr/local/bin/envoy -c /etc/envoy.yaml
static_resources:
listeners:
- address:
socket_address:
address: 0.0.0.0
port_value: 80
filter_chains:
- filters:
- name: envoy.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
access_log:
- name: envoy.file_access_log
config:
path: "/dev/stdout"
codec_type: HTTP1
stat_prefix: ingress_http
route_config:
name: local_route
virtual_hosts:
- name: backend
domains:
- "*"
routes:
- match:
prefix: "/"
route:
cluster: swagger
http_filters:
- name: envoy.router
typed_config: {}
clusters:
- name: swagger
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
load_assignment:
cluster_name: swagger
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: swagger
port_value: 8080
admin:
access_log_path: "/dev/stdout"
address:
socket_address:
address: 0.0.0.0
port_value: 8001
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Swagger Petstore",
"license": {
"name": "MIT"
}
},
"host": "petstore.swagger.io",
"basePath": "/v1",
"schemes": [
"http"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/pets": {
"get": {
"summary": "List all pets",
"operationId": "listPets",
"tags": [
"pets"
],
"parameters": [
{
"name": "limit",
"in": "query",
"description": "How many items to return at one time (max 100)",
"required": false,
"type": "integer",
"format": "int32"
}
],
"responses": {
"200": {
"description": "An paged array of pets",
"headers": {
"x-next": {
"type": "string",
"description": "A link to the next page of responses"
}
},
"schema": {
"$ref": "#/definitions/Pets"
}
},
"default": {
"description": "unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"post": {
"summary": "Create a pet",
"operationId": "createPets",
"tags": [
"pets"
],
"responses": {
"201": {
"description": "Null response"
},
"default": {
"description": "unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/pets/{petId}": {
"get": {
"summary": "Info for a specific pet",
"operationId": "showPetById",
"tags": [
"pets"
],
"parameters": [
{
"name": "petId",
"in": "path",
"required": true,
"description": "The id of the pet to retrieve",
"type": "string"
}
],
"responses": {
"200": {
"description": "Expected response to a valid request",
"schema": {
"$ref": "#/definitions/Pets"
}
},
"default": {
"description": "unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
}
},
"definitions": {
"Pet": {
"required": [
"id",
"name"
],
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
},
"tag": {
"type": "string"
}
}
},
"Pets": {
"type": "array",
"items": {
"$ref": "#/definitions/Pet"
}
},
"Error": {
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment