提交 bde6c137 编写于 作者: G Gao Hongtao 提交者: wu-sheng

Update istio docs according latest istio release (#3646)

* 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
上级 cfc9ae0e
......@@ -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.
\ No newline at end of file
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).
# 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
......@@ -14,52 +14,64 @@
# 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
name: sw
namespace: istio-system
spec:
adapter: swadapter
connection:
address: "oap.skywalking.svc.cluster.local:11800"
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
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 | ""
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
name: swmetric-rule
namespace: istio-system
spec:
actions:
- handler: sw.istio-system
instances:
- swmetric
actions:
- handler: sw.istio-system
instances:
- swmetric
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册