Skip to content

Commit

Permalink
Update istio docs according latest istio release (#3646)
Browse files Browse the repository at this point in the history
* Update istio docs according latest istio release

* Rename skywalingadapter.yml to skywalkingadapter.yml

Rename typo file name.

* Update README.md

Add a link to doc.

* Update README.md
  • Loading branch information
hanahmily authored and wu-sheng committed Oct 17, 2019
1 parent cfc9ae0 commit bde6c13
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 117 deletions.
11 changes: 9 additions & 2 deletions docs/en/setup/istio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,12 @@ Follow the [deploying backend in kubernetes](../backend/backend-k8s.md) to insta

## Setup Istio to send metrics to oap

The SkyWalking uses Istio bypass adapter collects metrics. Use `kubectl apply -f` with the `yaml`(s) in [the yaml folder](yaml) to setup.

1. Install Istio metric template

`kubectl apply -f https://raw.githubusercontent.com/istio/istio/1.3.3/mixer/template/metric/template.yaml`

2. Install SkyWalking adapter

`kubectl apply -f skywalkingadapter.yml`

Find the `skywalkingadapter.yml` at [here](yaml/skywalkingadapter.yml).
24 changes: 0 additions & 24 deletions docs/en/setup/istio/yaml/01-metrictemplate.yml

This file was deleted.

26 changes: 0 additions & 26 deletions docs/en/setup/istio/yaml/02-skywalingadapter.yml

This file was deleted.

65 changes: 0 additions & 65 deletions docs/en/setup/istio/yaml/03-operator_cfg.yml

This file was deleted.

77 changes: 77 additions & 0 deletions docs/en/setup/istio/yaml/skywalkingadapter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: "config.istio.io/v1alpha2"
kind: adapter
metadata:
name: swadapter
namespace: istio-system
spec:
description:
session_based: false
templates:
- metric
---

apiVersion: "config.istio.io/v1alpha2"
kind: handler
metadata:
name: sw
namespace: istio-system
spec:
adapter: swadapter
connection:
address: "oap.skywalking.svc.cluster.local:11800"
---

# instance for template metric
apiVersion: "config.istio.io/v1alpha2"
kind: instance
metadata:
name: swmetric
namespace: istio-system
spec:
template: metric
params:
value: request.size | 0
dimensions:
sourceService: source.workload.name | ""
sourceNamespace: source.workload.namespace | ""
sourceUID: source.uid | ""
destinationService: destination.workload.name | ""
destinationNamespace: destination.workload.namespace | ""
destinationUID: destination.uid | ""
requestMethod: request.method | ""
requestPath: request.path | ""
requestScheme: request.scheme | ""
requestTime: request.time
responseTime: response.time
responseCode: response.code | 200
reporter: conditional((context.reporter.kind | "inbound") == "outbound", "source", "destination")
apiProtocol: api.protocol | ""
---

# rule to dispatch to handler sw
apiVersion: "config.istio.io/v1alpha2"
kind: rule
metadata:
name: swmetric-rule
namespace: istio-system
spec:
actions:
- handler: sw.istio-system
instances:
- swmetric

0 comments on commit bde6c13

Please sign in to comment.