Skip to content

Commit

Permalink
update for istio 1.7.2; wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
salrashid123 committed Sep 22, 2020
1 parent ef740e7 commit 3a6745e
Show file tree
Hide file tree
Showing 20 changed files with 436 additions and 277 deletions.
512 changes: 289 additions & 223 deletions README.md

Large diffs are not rendered by default.

24 changes: 20 additions & 4 deletions all-gke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,15 @@ type: Opaque
data:
google-key: "QUl6YVN5RGdSWTNEejRCenFwekxXRG1JU1JhSm80ejlDLXBvNXpnCg=="
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp-v1
spec:
selector:
matchLabels:
app: myapp
version: v1
replicas: 1
template:
metadata:
Expand Down Expand Up @@ -91,11 +95,15 @@ spec:
name: api-keys
key: google-key
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp-v2
spec:
selector:
matchLabels:
app: myapp
version: v2
replicas: 1
template:
metadata:
Expand Down Expand Up @@ -145,14 +153,18 @@ spec:
selector:
app: be
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: be-v1
labels:
type: be
version: v1
spec:
selector:
matchLabels:
app: be
version: v1
replicas: 1
template:
metadata:
Expand All @@ -176,14 +188,18 @@ spec:
fieldRef:
fieldPath: metadata.name
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: be-v2
labels:
type: be
version: v2
spec:
selector:
matchLabels:
app: be
version: v2
replicas: 1
template:
metadata:
Expand Down
24 changes: 20 additions & 4 deletions all-istio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@ kind: ServiceAccount
metadata:
name: myapp-sa
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp-v1
spec:
selector:
matchLabels:
app: myapp
version: v1
replicas: 1
template:
metadata:
Expand Down Expand Up @@ -67,11 +71,15 @@ spec:
name: api-keys
key: google-key
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp-v2
spec:
selector:
matchLabels:
app: myapp
version: v2
replicas: 1
template:
metadata:
Expand Down Expand Up @@ -126,14 +134,18 @@ kind: ServiceAccount
metadata:
name: be-sa
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: be-v1
labels:
type: be
version: v1
spec:
selector:
matchLabels:
app: be
version: v1
replicas: 1
template:
metadata:
Expand All @@ -158,14 +170,18 @@ spec:
fieldRef:
fieldPath: metadata.name
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: be-v2
labels:
type: be
version: v2
spec:
selector:
matchLabels:
app: be
version: v2
replicas: 1
template:
metadata:
Expand Down
10 changes: 8 additions & 2 deletions auth_rbac_policy/auth-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ kind: ServiceAccount
metadata:
name: svc2-sa
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: svc1
spec:
selector:
matchLabels:
app: svc1
replicas: 1
template:
metadata:
Expand All @@ -53,11 +56,14 @@ spec:
ports:
- containerPort: 8080
---
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: svc2
spec:
selector:
matchLabels:
app: svc2
replicas: 1
template:
metadata:
Expand Down
39 changes: 39 additions & 0 deletions fe-v1-wasm-inject.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: ui-examplefilter
namespace: default
spec:
configPatches:
- applyTo: HTTP_FILTER
match:
context: SIDECAR_INBOUND
proxy:
proxyVersion: '1\.7.*'
listener:
filterChain:
filter:
name: envoy.http_connection_manager
subFilter:
name: envoy.router
patch:
operation: INSERT_BEFORE
value:
name: envoy.filters.http.wasm
typed_config:
'@type': type.googleapis.com/udpa.type.v1.TypedStruct
type_url: type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm
value:
config:
root_id: my_root_id
vm_config:
code:
local:
filename: /var/local/lib/wasm-filters/envoy_filter_http_wasm_example.wasm
runtime: envoy.wasm.runtime.v8
allow_precompiled: true
vm_id: my-example
workloadSelector:
labels:
app: myapp
version: v1
26 changes: 26 additions & 0 deletions fe-v1-wasm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp-v1
spec:
selector:
matchLabels:
app: myapp
version: v1
replicas: 1
template:
metadata:
labels:
app: myapp
version: v1
annotations:
sidecar.istio.io/userVolume: '[{"name":"wasmfilters-dir","configMap": {"name": "example-filter"}}]'
sidecar.istio.io/userVolumeMount: '[{"mountPath":"/var/local/lib/wasm-filters","name":"wasmfilters-dir"}]'
spec:
serviceAccountName: myapp-sa
containers:
- name: myapp-container
image: salrashid123/istioinit:1
imagePullPolicy: Always
ports:
- containerPort: 8080
Binary file modified images/grafana_fev1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/grafana_fev1_bev1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/grafana_fev1_bev2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/grafana_fev1v2_bev1v2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/ilb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/ilb_traffic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/kiali_fev1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/kiali_fev1_bev1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/kiali_route_fev1_bev2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/kiali_route_fev1v2_bev1v2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 2 additions & 11 deletions istio-egress-gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,6 @@ spec:
host: istio-egressgateway.istio-system.svc.cluster.local
subsets:
- name: yahoo
trafficPolicy:
loadBalancer:
simple: ROUND_ROBIN
portLevelSettings:
- port:
number: 443
tls:
mode: ISTIO_MUTUAL
sni: www.yahoo.com
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
Expand All @@ -61,7 +52,7 @@ spec:
- gateways:
- mesh
port: 443
sni_hosts:
sniHosts:
- www.yahoo.com
route:
- destination:
Expand All @@ -74,7 +65,7 @@ spec:
- gateways:
- istio-egressgateway
port: 443
sni_hosts:
sniHosts:
- www.yahoo.com
route:
- destination:
Expand Down
2 changes: 1 addition & 1 deletion istio-egress-rule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
tls:
- match:
- port: 443
sni_hosts:
sniHosts:
- www.google.com
route:
- destination:
Expand Down
49 changes: 31 additions & 18 deletions istio-fev1-httpfilter-lua.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: http-lua
name: ui-examplefilter
namespace: default
spec:
workloadLabels:
app: myapp
version: v1
filters:
- listenerMatch:
portNumber: 8080
listenerType: SIDECAR_INBOUND
filterName: envoy.lua
filterType: HTTP
filterConfig:
inlineCode: |
function envoy_on_request(request_handle)
request_handle:headers():add("foo", "bar")
end
function envoy_on_response(response_handle)
response_handle:headers():add("foo2", "bar2")
end
configPatches:
- applyTo: HTTP_FILTER
match:
context: SIDECAR_INBOUND
proxy:
proxyVersion: '1\.7.*'
listener:
filterChain:
filter:
name: envoy.http_connection_manager
subFilter:
name: envoy.router
patch:
operation: INSERT_BEFORE
value:
name: envoy.filters.http.lua
typed_config:
'@type': type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua
inlineCode: |
function envoy_on_request(request_handle)
request_handle:headers():add("foo", "bar")
end
function envoy_on_response(response_handle)
response_handle:headers():add("foo2", "bar2")
end
workloadSelector:
labels:
app: myapp
version: v1
14 changes: 0 additions & 14 deletions istio-fev1-wasm.yaml

This file was deleted.

0 comments on commit 3a6745e

Please sign in to comment.