Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bianpengyuan/e8a8af2fee0dac5abb7a91de63a08dec to your computer and use it in GitHub Desktop.
Save bianpengyuan/e8a8af2fee0dac5abb7a91de63a08dec to your computer and use it in GitHub Desktop.
static_resources:
listeners:
- name: main
address:
socket_address:
address: 0.0.0.0
port_value: 80
filter_chains:
- filters:
- name: envoy.http_connection_manager
config:
stat_prefix: ingress_http
codec_type: auto
route_config:
name: local_route
virtual_hosts:
- name: local_service
domains:
- "*"
routes:
- match:
prefix: "/"
route:
cluster: web_service
http_filters:
- name: envoy.wasm
config:
configuration: >-
{
"enableLogging": true,
"enableMonitoring": false,
"monitoredResourceType": "k8s_container",
"projectId": "bpy-istio",
"monitoredResourceLabels": {
"project_id": "bpy-istio",
"cluster_name": "test-cluster",
"location": "us-central1-a",
"namespace_name": "test-namespace",
"pod_name": "test-pod",
"container_name": "test-container",
},
}
vm_config:
vm: "envoy.wasm.vm.null"
code:
inline_string: "stackdriver_plugin"
- name: envoy.router
config: {}
- name: staticreply
address:
socket_address:
address: 127.0.0.1
port_value: 8099
filter_chains:
- filters:
- name: envoy.http_connection_manager
config:
stat_prefix: ingress_http
codec_type: auto
route_config:
name: local_route
virtual_hosts:
- name: local_service
domains:
- "*"
routes:
- match:
prefix: "/"
direct_response:
status: 200
body:
inline_string: "example body\n"
http_filters:
- name: envoy.router
config: {}
clusters:
- name: web_service
connect_timeout: 0.25s
type: static
lb_policy: round_robin
hosts:
- socket_address:
address: 127.0.0.1
port_value: 8099
admin:
access_log_path: "/dev/null"
address:
socket_address:
address: 0.0.0.0
port_value: 8001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment