Add istio bypass adaptor setup document back (#3376)

* Update document.

* Enable ALS document
This commit is contained in:
吴晟 Wu Sheng 2019-09-01 09:19:58 +08:00 committed by GitHub
parent 70b825ce43
commit 63b033dfc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 139 additions and 5 deletions

View File

@ -3,9 +3,29 @@ Envoy [ALS(access log service)](https://www.envoyproxy.io/docs/envoy/latest/api-
fully logs about RPC routed, including HTTP and TCP.
You need three steps to open ALS.
1. Right now, Istio pilot hasn't supported to open ALS, so you have to change pilot codes.
1. Open SkyWalking [envoy receiver](../backend/backend-receivers.md).
1. Active ALS k8s-mesh analysis
1. Open envoyAccessLogService at istio. See [more](https://github.com/istio/istio/blob/22198bd29b224139b9614fe506e5c07716928031/install/kubernetes/helm/istio/values.yaml#L179)
on istio helm chart.
```yaml
# Configure envoy gRPC access log service.
envoyAccessLogService:
enabled: false
host: # example: accesslog-service.istio-system
port: # example: 15000
tlsSettings:
mode: DISABLE # DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL
clientCertificate: # example: /etc/istio/als/cert-chain.pem
privateKey: # example: /etc/istio/als/key.pem
caCertificates: # example: /etc/istio/als/root-cert.pem
sni: # example: als.somedomain
subjectAltNames: []
# - als.somedomain
tcpKeepalive:
probes: 3
time: 10s
interval: 10s
```
2. Open SkyWalking [envoy receiver](../backend/backend-receivers.md).
3. Active ALS k8s-mesh analysis
```yaml
envoy-metric:
default:

View File

@ -13,6 +13,5 @@ Follow the [deploying backend in kubernetes](../backend/backend-k8s.md) to insta
## Setup Istio to send metrics to oap
Follow instructions in the [setup Istio to send metrics to oap](https://github.com/apache/skywalking-kubernetes#setup-istio-to-send-metrics-to-oap)
to setup Istio with oap.
The SkyWalking uses Istio bypass adapter collects metrics. Use `kubectl apply -f` with the `yaml`(s) in [the yaml folder](yaml) to setup.

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,26 @@
# 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

View File

@ -0,0 +1,65 @@
# 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