Skip to content

Instantly share code, notes, and snippets.

@FuzzOli87
Last active September 7, 2018 23:10
Show Gist options
  • Save FuzzOli87/27519f99dbfeea8e6c327ec87a97143d to your computer and use it in GitHub Desktop.
Save FuzzOli87/27519f99dbfeea8e6c327ec87a97143d to your computer and use it in GitHub Desktop.
envoy config file
apiVersion: v1
kind: Service
metadata:
name: pulse-core
labels:
app: pulse-core
namespace: core-applications
spec:
ports:
- port: 50051
name: grpc
selector:
app: pulse-core
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: pulse-core
namespace: core-applications
labels:
app: pulse-core
spec:
replicas: 1
template:
metadata:
labels:
app: pulse-core
spec:
containers:
- name: pulse-core
imagePullPolicy: Always
image: quay.io/parkhubprime/pulse-core:0.1.0
ports:
- containerPort: 50051
name: grpc
env:
- name: EVENT_STORE_CONNS
value: "kafka-0.kafka-headless-svc.core-applications:9092,kafka-1.kafka-headless-svc.core-applications:9092,kafka-2.kafka-headless-svc.core-applications:9092"
- name: NODE_ENV
value: "production"
{
"listeners": [
{
"address": "tcp://0.0.0.0:3000",
"filters": [
{
"type": "read",
"name": "http_connection_manager",
"config": {
"codec_type": "auto",
"stat_prefix": "http",
"generate_request_id": true,
"tracing": {
"operation_name": "ingress"
},
"rds": {
"cluster": "rds",
"route_config_name": "3000",
"refresh_delay_ms": 1000
},
"filters": [
{
"type": "decoder",
"name": "mixer",
"config": {
"mixer_server": "istio-mixer:9091",
"mixer_attributes": {
"target.ip": "100.96.2.19",
"target.service": "pulse-core.core-applications.svc.cluster.local",
"target.uid": "kubernetes://pulse-core-1662808704-dvlq0.core-applications"
},
"forward_attributes": {
"source.ip": "100.96.2.19",
"source.uid": "kubernetes://pulse-core-1662808704-dvlq0.core-applications"
},
"quota_name": "RequestCount"
}
},
{
"type": "decoder",
"name": "router",
"config": {}
}
],
"access_log": [
{
"path": "/dev/stdout"
}
]
}
}
],
"bind_to_port": false
},
{
"address": "tcp://0.0.0.0:50051",
"filters": [
{
"type": "read",
"name": "http_connection_manager",
"config": {
"codec_type": "auto",
"stat_prefix": "http",
"generate_request_id": true,
"tracing": {
"operation_name": "ingress"
},
"rds": {
"cluster": "rds",
"route_config_name": "50051",
"refresh_delay_ms": 1000
},
"filters": [
{
"type": "decoder",
"name": "mixer",
"config": {
"mixer_server": "istio-mixer:9091",
"mixer_attributes": {
"target.ip": "100.96.2.19",
"target.service": "pulse-core.core-applications.svc.cluster.local",
"target.uid": "kubernetes://pulse-core-1662808704-dvlq0.core-applications"
},
"forward_attributes": {
"source.ip": "100.96.2.19",
"source.uid": "kubernetes://pulse-core-1662808704-dvlq0.core-applications"
},
"quota_name": "RequestCount"
}
},
{
"type": "decoder",
"name": "router",
"config": {}
}
],
"access_log": [
{
"path": "/dev/stdout"
}
]
}
}
],
"bind_to_port": false
},
{
"address": "tcp://0.0.0.0:80",
"filters": [
{
"type": "read",
"name": "http_connection_manager",
"config": {
"codec_type": "auto",
"stat_prefix": "http",
"generate_request_id": true,
"tracing": {
"operation_name": "ingress"
},
"rds": {
"cluster": "rds",
"route_config_name": "80",
"refresh_delay_ms": 1000
},
"filters": [
{
"type": "decoder",
"name": "mixer",
"config": {
"mixer_server": "istio-mixer:9091",
"mixer_attributes": {
"target.ip": "100.96.2.19",
"target.service": "pulse-core.core-applications.svc.cluster.local",
"target.uid": "kubernetes://pulse-core-1662808704-dvlq0.core-applications"
},
"forward_attributes": {
"source.ip": "100.96.2.19",
"source.uid": "kubernetes://pulse-core-1662808704-dvlq0.core-applications"
},
"quota_name": "RequestCount"
}
},
{
"type": "decoder",
"name": "router",
"config": {}
}
],
"access_log": [
{
"path": "/dev/stdout"
}
]
}
}
],
"bind_to_port": false
},
{
"address": "tcp://0.0.0.0:8080",
"filters": [
{
"type": "read",
"name": "http_connection_manager",
"config": {
"codec_type": "auto",
"stat_prefix": "http",
"generate_request_id": true,
"tracing": {
"operation_name": "ingress"
},
"rds": {
"cluster": "rds",
"route_config_name": "8080",
"refresh_delay_ms": 1000
},
"filters": [
{
"type": "decoder",
"name": "mixer",
"config": {
"mixer_server": "istio-mixer:9091",
"mixer_attributes": {
"target.ip": "100.96.2.19",
"target.service": "pulse-core.core-applications.svc.cluster.local",
"target.uid": "kubernetes://pulse-core-1662808704-dvlq0.core-applications"
},
"forward_attributes": {
"source.ip": "100.96.2.19",
"source.uid": "kubernetes://pulse-core-1662808704-dvlq0.core-applications"
},
"quota_name": "RequestCount"
}
},
{
"type": "decoder",
"name": "router",
"config": {}
}
],
"access_log": [
{
"path": "/dev/stdout"
}
]
}
}
],
"bind_to_port": false
},
{
"address": "tcp://0.0.0.0:8081",
"filters": [
{
"type": "read",
"name": "http_connection_manager",
"config": {
"codec_type": "auto",
"stat_prefix": "http",
"generate_request_id": true,
"tracing": {
"operation_name": "ingress"
},
"rds": {
"cluster": "rds",
"route_config_name": "8081",
"refresh_delay_ms": 1000
},
"filters": [
{
"type": "decoder",
"name": "mixer",
"config": {
"mixer_server": "istio-mixer:9091",
"mixer_attributes": {
"target.ip": "100.96.2.19",
"target.service": "pulse-core.core-applications.svc.cluster.local",
"target.uid": "kubernetes://pulse-core-1662808704-dvlq0.core-applications"
},
"forward_attributes": {
"source.ip": "100.96.2.19",
"source.uid": "kubernetes://pulse-core-1662808704-dvlq0.core-applications"
},
"quota_name": "RequestCount"
}
},
{
"type": "decoder",
"name": "router",
"config": {}
}
],
"access_log": [
{
"path": "/dev/stdout"
}
]
}
}
],
"bind_to_port": false
},
{
"address": "tcp://100.65.32.138:2181",
"filters": [
{
"type": "read",
"name": "tcp_proxy",
"config": {
"stat_prefix": "tcp",
"route_config": {
"routes": [
{
"cluster": "out.93908426df7f79235eafbc08739057ba61b721d7",
"destination_ip_list": [
"100.65.32.138/32"
]
}
]
}
}
}
],
"bind_to_port": false
},
{
"address": "tcp://100.66.231.153:42422",
"filters": [
{
"type": "read",
"name": "tcp_proxy",
"config": {
"stat_prefix": "tcp",
"route_config": {
"routes": [
{
"cluster": "out.43516ec5f8eeeb609f7360bf7b2927f140fc70d4",
"destination_ip_list": [
"100.66.231.153/32"
]
}
]
}
}
}
],
"bind_to_port": false
},
{
"address": "tcp://100.66.231.153:9091",
"filters": [
{
"type": "read",
"name": "tcp_proxy",
"config": {
"stat_prefix": "tcp",
"route_config": {
"routes": [
{
"cluster": "out.dd271ac9659985af3cfe1a368ac7db57cfd3ed34",
"destination_ip_list": [
"100.66.231.153/32"
]
}
]
}
}
}
],
"bind_to_port": false
},
{
"address": "tcp://100.66.231.153:9094",
"filters": [
{
"type": "read",
"name": "tcp_proxy",
"config": {
"stat_prefix": "tcp",
"route_config": {
"routes": [
{
"cluster": "out.245cb71f2f59caef97e0ca64477469d894a01b3e",
"destination_ip_list": [
"100.66.231.153/32"
]
}
]
}
}
}
],
"bind_to_port": false
},
{
"address": "tcp://100.70.216.19:443",
"filters": [
{
"type": "read",
"name": "tcp_proxy",
"config": {
"stat_prefix": "tcp",
"route_config": {
"routes": [
{
"cluster": "out.abdde029d4d5f70b5142cd09fa46d91969c34e8f",
"destination_ip_list": [
"100.70.216.19/32"
]
}
]
}
}
}
],
"bind_to_port": false
},
{
"address": "tcp://100.71.1.99:80",
"filters": [
{
"type": "read",
"name": "tcp_proxy",
"config": {
"stat_prefix": "tcp",
"route_config": {
"routes": [
{
"cluster": "out.979ee151593361f0ea8af35fb0a7f1cd68277438",
"destination_ip_list": [
"100.71.1.99/32"
]
}
]
}
}
}
],
"bind_to_port": false
},
{
"address": "tcp://100.96.2.19:50051",
"filters": [
{
"type": "read",
"name": "http_connection_manager",
"config": {
"codec_type": "auto",
"stat_prefix": "http",
"generate_request_id": true,
"tracing": {
"operation_name": "ingress"
},
"route_config": {
"virtual_hosts": [
{
"name": "inbound|50051",
"domains": [
"*"
],
"routes": [
{
"prefix": "/",
"cluster": "in.50051",
"opaque_config": {
"mixer_control": "on",
"mixer_forward": "off"
}
}
]
}
]
},
"filters": [
{
"type": "decoder",
"name": "mixer",
"config": {
"mixer_server": "istio-mixer:9091",
"mixer_attributes": {
"target.ip": "100.96.2.19",
"target.service": "pulse-core.core-applications.svc.cluster.local",
"target.uid": "kubernetes://pulse-core-1662808704-dvlq0.core-applications"
},
"forward_attributes": {
"source.ip": "100.96.2.19",
"source.uid": "kubernetes://pulse-core-1662808704-dvlq0.core-applications"
},
"quota_name": "RequestCount"
}
},
{
"type": "decoder",
"name": "router",
"config": {}
}
],
"access_log": [
{
"path": "/dev/stdout"
}
]
}
}
],
"ssl_context": {
"cert_chain_file": "/etc/certs/cert-chain.pem",
"private_key_file": "/etc/certs/key.pem",
"ca_cert_file": "/etc/certs/root-cert.pem"
},
"bind_to_port": false
},
{
"address": "tcp://0.0.0.0:15001",
"filters": [],
"bind_to_port": true,
"use_original_dst": true
}
],
"admin": {
"access_log_path": "/dev/stdout",
"address": "tcp://0.0.0.0:15000"
},
"cluster_manager": {
"clusters": [
{
"name": "in.50051",
"connect_timeout_ms": 1000,
"type": "static",
"lb_type": "round_robin",
"hosts": [
{
"url": "tcp://127.0.0.1:50051"
}
],
"features": "http2"
},
{
"name": "out.245cb71f2f59caef97e0ca64477469d894a01b3e",
"service_name": "istio-mixer.core-applications.svc.cluster.local|configapi",
"connect_timeout_ms": 1000,
"type": "sds",
"lb_type": "round_robin"
},
{
"name": "out.43516ec5f8eeeb609f7360bf7b2927f140fc70d4",
"service_name": "istio-mixer.core-applications.svc.cluster.local|prometheus",
"connect_timeout_ms": 1000,
"type": "sds",
"lb_type": "round_robin"
},
{
"name": "out.93908426df7f79235eafbc08739057ba61b721d7",
"service_name": "zk-client-svc.core-applications.svc.cluster.local|tcp",
"connect_timeout_ms": 1000,
"type": "sds",
"lb_type": "round_robin"
},
{
"name": "out.979ee151593361f0ea8af35fb0a7f1cd68277438",
"service_name": "istio-egress.core-applications.svc.cluster.local",
"connect_timeout_ms": 1000,
"type": "sds",
"lb_type": "round_robin"
},
{
"name": "out.abdde029d4d5f70b5142cd09fa46d91969c34e8f",
"service_name": "istio-ingress.core-applications.svc.cluster.local|https",
"connect_timeout_ms": 1000,
"type": "sds",
"lb_type": "round_robin"
},
{
"name": "out.dd271ac9659985af3cfe1a368ac7db57cfd3ed34",
"service_name": "istio-mixer.core-applications.svc.cluster.local|tcp",
"connect_timeout_ms": 1000,
"type": "sds",
"lb_type": "round_robin"
},
{
"name": "zipkin",
"connect_timeout_ms": 1000,
"type": "strict_dns",
"lb_type": "round_robin",
"hosts": [
{
"url": "tcp://zipkin:9411"
}
]
},
{
"name": "rds",
"connect_timeout_ms": 1000,
"type": "strict_dns",
"lb_type": "round_robin",
"hosts": [
{
"url": "tcp://istio-pilot:8080"
}
]
}
],
"sds": {
"cluster": {
"name": "sds",
"connect_timeout_ms": 1000,
"type": "strict_dns",
"lb_type": "round_robin",
"hosts": [
{
"url": "tcp://istio-pilot:8080"
}
]
},
"refresh_delay_ms": 1000
},
"cds": {
"cluster": {
"name": "cds",
"connect_timeout_ms": 1000,
"type": "strict_dns",
"lb_type": "round_robin",
"hosts": [
{
"url": "tcp://istio-pilot:8080"
}
]
},
"refresh_delay_ms": 1000
}
},
"tracing": {
"http": {
"driver": {
"type": "zipkin",
"config": {
"collector_cluster": "zipkin",
"collector_endpoint": "/api/v1/spans"
}
}
}
}
}
apiVersion: apps/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: pulse-core
name: pulse-core
namespace: core-applications
spec:
replicas: 1
strategy: {}
template:
metadata:
annotations:
alpha.istio.io/sidecar: injected
alpha.istio.io/version: jenkins@ubuntu-16-04-build-12ac793f80be71-0.1.6-dab2033
pod.beta.kubernetes.io/init-containers: '[{"args":["-p","15001","-u","1337"],"image":"docker.io/istio/init:0.1","imagePullPolicy":"Always","name":"init","securityContext":{"capabilities":{"add":["NET_ADMIN"]}}},{"args":["-c","sysctl
-w kernel.core_pattern=/tmp/core.%e.%p.%t \u0026\u0026 ulimit -c unlimited"],"command":["/bin/sh"],"image":"alpine","imagePullPolicy":"Always","name":"enable-core-dump","securityContext":{"privileged":true}}]'
creationTimestamp: null
labels:
app: pulse-core
spec:
containers:
- env:
- name: EVENT_STORE_CONNS
value: kafka-0.kafka-headless-svc.core-applications:9092,kafka-1.kafka-headless-svc.core-applications:9092,kafka-2.kafka-headless-svc.core-applications:9092
- name: NODE_ENV
value: production
image: quay.io/parkhubprime/pulse-core:0.1.0
imagePullPolicy: Always
name: pulse-core
ports:
- containerPort: 50051
name: grpc
resources: {}
- args:
- proxy
- sidecar
- -v
- "2"
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
image: docker.io/istio/proxy_debug:0.1
imagePullPolicy: Always
name: proxy
resources: {}
securityContext:
runAsUser: 1337
volumeMounts:
- mountPath: /etc/certs
name: istio-certs
readOnly: true
volumes:
- name: istio-certs
secret:
secretName: istio.default
status: {}
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment