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
This commit is contained in:
parent
cfc9ae0eae
commit
bde6c137b7
|
|
@ -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).
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,26 +0,0 @@
|
|||
# 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
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
# 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: 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,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
|
||||
Loading…
Reference in New Issue