Skip to content

Instantly share code, notes, and snippets.

@johnytiago
johnytiago / index.html
Created May 20, 2017 15:12
LETS BUILD A CHAT
<!-- message html -->
<li>
<div class="d-sm-flex flex-row align-content-stretch">
<div class="p-2 alert-success">
<span>{{user}}</span>
</div>
<div class="p-2">
<p class='msg'>{{text}}</p>
</div>
</div>
### Keybase proof
I hereby claim:
* I am johnytiago on github.
* I am johnytiago (https://keybase.io/johnytiago) on keybase.
* I have a public key ASAaCkWPM2ouUQMF5mIephN9JbW6Y-SmzUqFr2cnag7N5Qo
To claim this, I am signing this object:
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: reviews
spec:
hosts:
- reviews
http:
- match:
- headers:
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: ratings
spec:
hosts:
- ratings
http:
- match:
- headers:
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: reviews
spec:
hosts:
- reviews
http:
- route:
- destination:
if (process.env.SERVICE_VERSION === 'v-faulty') {
if (Math.random() <= 0.5) // Break in half the calls
return getLocalReviewsServiceUnavailable(res)
return getLocalReviewsSuccessful(res, productId)
}
...
spec:
containers:
- name: ratings
image: istio/examples-bookinfo-ratings-v1:1.14.0
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9080
env:
- name: SERVICE_VERSION
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: reviews
spec:
hosts:
- reviews
http:
- route:
- destination:
retries:
attempts: 3
perTryTimeout: 2s
retryOn: gateway-error,connect-failure,refused-stream
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: reviews-destination
spec:
host: reviews
subsets:
- name: v1
labels:
version: v1