README.md 24.5 KB
Newer Older
I
innerpeacez 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
# Apache Skywalking Helm Chart

[Apache SkyWalking](https://skywalking.apache.org/) is application performance monitor tool for distributed systems, especially designed for microservices, cloud native and container-based (Docker, K8s, Mesos) architectures.

## Introduction

This chart bootstraps a [Apache SkyWalking](https://skywalking.apache.org/) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.

## Prerequisites

 - Kubernetes 1.9.6+ 
 - PV dynamic provisioning support on the underlying infrastructure (StorageClass)
 - Helm 3

## Installing the Chart

To install the chart with the release name `my-release`:

```shell
$ helm install my-release skywalking -n <namespace>
```

The command deploys Apache Skywalking on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.

> **Tip**: List all releases using `helm list`

## Uninstalling the Chart

To uninstall/delete the `my-release` deployment:

```shell
32
$ helm uninstall my-release -n <namespace>
I
innerpeacez 已提交
33 34 35 36 37 38 39 40
```

The command removes all the Kubernetes components associated with the chart and deletes the release.

## Configuration

The following table lists the configurable parameters of the Skywalking chart and their default values.

I
innerpeacez 已提交
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
| Parameter                                                    | Description                                                                                      | Default                              |
|--------------------------------------------------------------|--------------------------------------------------------------------------------------------------|--------------------------------------|
| `nameOverride`                                               | Override name                                                                                    | `nil`                                |
| `serviceAccounts.oap`                                        | Name of the OAP service account to use or create                                                 | `nil`                                |
| `oap.name`                                                   | OAP deployment name                                                                              | `oap`                                |
| `oap.image.repository`                                       | OAP container image name                                                                         | `apache/skywalking-oap-server`       |
| `oap.image.tag`                                              | OAP container image tag                                                                          | `6.1.0`                              |
| `oap.image.pullPolicy`                                       | OAP container image pull policy                                                                  | `IfNotPresent`                       |
| `oap.ports.grpc`                                             | OAP grpc port for tracing or metric                                                              | `11800`                              |
| `oap.ports.rest`                                             | OAP http port for Web UI                                                                         | `12800`                              |
| `oap.replicas`                                               | OAP k8s deployment replicas                                                                      | `2`                                  |
| `oap.service.type`                                           | OAP svc type                                                                                     | `ClusterIP`                          |
| `oap.javaOpts`                                               | Parameters to be added to `JAVA_OPTS`environment variable for OAP                                | `-Xms2g -Xmx2g`                      |
| `oap.antiAffinity`                                           | OAP anti-affinity policy                                                                         | `soft`                               |
| `oap.nodeAffinity`                                           | OAP node affinity policy                                                                         | `{}`                                 |
| `oap.nodeSelector`                                           | OAP labels for master pod assignment                                                             | `{}`                                 |
| `oap.tolerations`                                            | OAP tolerations                                                                                  | `[]`                                 |
| `oap.resources`                                              | OAP node resources requests & limits                                                             | `{} - cpu limit must be an integer`  |
| `oap.envoy.als.enabled`                                      | Open envoy als                                                                                   | `false`                              |
| `oap.env`                                                    | OAP environment variables                                                                        | `[]`                                 |
| `ui.name`                                                    | Web UI deployment name                                                                           | `ui`                                 |
| `ui.replicas`                                                | Web UI k8s deployment replicas                                                                   | `1`                                  |
| `ui.image.repository`                                        | Web UI container image name                                                                      | `apache/skywalking-ui`               |
| `ui.image.tag`                                               | Web UI container image tag                                                                       | `6.1.0`                              |
| `ui.image.pullPolicy`                                        | Web UI container image pull policy                                                               | `IfNotPresent`                       |
| `ui.ingress.enabled`                                         | Create Ingress for Web UI                                                                        | `false`                              |
| `ui.ingress.annotations`                                     | Associate annotations to the Ingress                                                             | `{}`                                 |
| `ui.ingress.path`                                            | Associate path with the Ingress                                                                  | `/`                                  |
| `ui.ingress.hosts`                                           | Associate hosts with the Ingress                                                                 | `[]`                                 |
| `ui.ingress.tls`                                             | Associate TLS with the Ingress                                                                   | `[]`                                 |
| `ui.service.type`                                            | Web UI svc type                                                                                  | `ClusterIP`                          |
| `ui.service.externalPort`                                    | external port for the service                                                                    | `80`                                 |
| `ui.service.internalPort`                                    | internal port for the service                                                                    | `8080`                               |
| `ui.service.externalIPs`                                     | external IP addresses                                                                            | `nil`                                |
| `ui.service.loadBalancerIP`                                  | Load Balancer IP address                                                                         | `nil`                                |
| `ui.service.annotations`                                     | Kubernetes service annotations                                                                   | `{}`                                 |
| `ui.service.loadBalancerSourceRanges`                        | Limit load balancer source IPs to list of CIDRs (where available))                               | `[]`                                 |
| `elasticsearch.enabled`                                      | Spin up a new elasticsearch cluster for SkyWalking                                               | `true`                               |
| `elasticsearch.client.name`                                  |  Client component name                                                                           |  `client`                            |
| `elasticsearch.client.replicas`                              |  Client node replicas (deployment)                                                               |  `2`                                 |
| `elasticsearch.client.resources`                             |  Client node resources requests & limits                                                         |  `{} - cpu limit must be an integer` |
| `elasticsearch.client.priorityClassName`                     |  Client priorityClass                                                                            |  `nil`                               |
| `elasticsearch.client.heapSize`                              |  Client node heap size                                                                           |  `512m`                              |
| `elasticsearch.client.podAnnotations`                        |  Client Deployment annotations                                                                   |  `{}`                                |
| `elasticsearch.client.nodeSelector`                          |  Node labels for client pod assignment                                                           |  `{}`                                |
| `elasticsearch.client.tolerations`                           |  Client tolerations                                                                              |  `[]`                                |
| `elasticsearch.client.serviceAnnotations`                    |  Client Service annotations                                                                      |  `{}`                                |
| `elasticsearch.client.serviceType`                           |  Client service type                                                                             |  `ClusterIP`                         |
| `elasticsearch.client.httpNodePort`                          |  Client service HTTP NodePort port number. Has no effect if client.serviceType is not `NodePort`.|  `nil`                               |
| `elasticsearch.client.loadBalancerIP`                        |  Client loadBalancerIP                                                                           |  `{}`                                |
| `elasticsearch.client.loadBalancerSourceRanges`              |  Client loadBalancerSourceRanges                                                                 |  `{}`                                |
| `elasticsearch.client.antiAffinity`                          |  Client anti-affinity policy                                                                     |  `soft`                              |
| `elasticsearch.client.nodeAffinity`                          |  Client node affinity policy                                                                     |  `{}`                                |
| `elasticsearch.client.initResources`                         |  Client initContainer resources requests & limits                                                |  `{}`                                |
| `elasticsearch.client.additionalJavaOpts`                    |  Parameters to be added to `ES_JAVA_OPTS` environment variable for client                        |  `""`                                |
| `elasticsearch.client.ingress.enabled`                       |  Enable Client Ingress                                                                           |  `false`                             |
| `elasticsearch.client.ingress.user`                          |  If this & password are set, enable basic-auth on ingress                                        |  `nil`                               |
| `elasticsearch.client.ingress.password`                      |  If this & user are set, enable basic-auth on ingress                                            |  `nil`                               |
| `elasticsearch.client.ingress.annotations`                   |  Client Ingress annotations                                                                      |  `{}`                                |
| `elasticsearch.client.ingress.hosts`                         |  Client Ingress Hostnames                                                                        |  `[]`                                |
| `elasticsearch.client.ingress.tls`                           |  Client Ingress TLS configuration                                                                |  `[]`                                |
| `elasticsearch.client.exposeTransportPort`                   |  Expose transport port 9300 on client service (ClusterIP)                                        |  `false`                             |
| `elasticsearch.master.initResources`                         |  Master initContainer resources requests & limits                                                |  `{}`                                |
| `elasticsearch.master.additionalJavaOpts`                    |  Parameters to be added to `ES_JAVA_OPTS` environment variable for master                        |  `""`                                |
| `elasticsearch.master.exposeHttp`                            |  Expose http port 9200 on master Pods for monitoring, etc                                        |  `false`                             |
| `elasticsearch.master.name`                                  |  Master component name                                                                           |  `master`                            |
| `elasticsearch.master.replicas`                              |  Master node replicas (deployment)                                                               |  `2`                                 |
| `elasticsearch.master.resources`                             |  Master node resources requests & limits                                                         |  `{} - cpu limit must be an integer` |
| `elasticsearch.master.priorityClassName`                     |  Master priorityClass                                                                            |  `nil`                               |
| `elasticsearch.master.podAnnotations`                        |  Master Deployment annotations                                                                   |  `{}`                                |
| `elasticsearch.master.nodeSelector`                          |  Node labels for master pod assignment                                                           |  `{}`                                |
| `elasticsearch.master.tolerations`                           |  Master tolerations                                                                              |  `[]`                                |
| `elasticsearch.master.heapSize`                              |  Master node heap size                                                                           |  `512m`                              |
| `elasticsearch.master.name`                                  |  Master component name                                                                           |  `master`                            |
| `elasticsearch.master.persistence.enabled`                   |  Master persistent enabled/disabled                                                              |  `false`                             |
| `elasticsearch.master.persistence.name`                      |  Master statefulset PVC template name                                                            |  `data`                              |
| `elasticsearch.master.persistence.size`                      |  Master persistent volume size                                                                   |  `4Gi`                               |
| `elasticsearch.master.persistence.storageClass`              |  Master persistent volume Class                                                                  |  `nil`                               |
| `elasticsearch.master.persistence.accessMode`                |  Master persistent Access Mode                                                                   |  `ReadWriteOnce`                     |
| `elasticsearch.master.readinessProbe`                        |  Master container readiness probes                                                               |  see `values.yaml` for defaults      |
| `elasticsearch.master.antiAffinity`                          |  Master anti-affinity policy                                                                     |  `soft`                              |
| `elasticsearch.master.nodeAffinity`                          |  Master node affinity policy                                                                     |  `{}`                                |
| `elasticsearch.master.podManagementPolicy`                   |  Master pod creation strategy                                                                    |  `OrderedReady`                      |
| `elasticsearch.master.updateStrategy`                        |  Master node update strategy policy                                                              |  `{type: "onDelete"}`                |
| `elasticsearch.data.initResources`                           |  Data initContainer resources requests & limits                                                  |  `{}`                                |
| `elasticsearch.data.additionalJavaOpts`                      |  Parameters to be added to `ES_JAVA_OPTS` environment variable for data                          |  `""`                                |
| `elasticsearch.data.exposeHttp`                              |  Expose http port 9200 on data Pods for monitoring, etc                                          |  `false`                             |
| `elasticsearch.data.replicas`                                |  Data node replicas (statefulset)                                                                |  `2`                                 |
| `elasticsearch.data.resources`                               |  Data node resources requests & limits                                                           |  `{} - cpu limit must be an integer` |
| `elasticsearch.data.priorityClassName`                       |  Data priorityClass                                                                              |  `nil`                               |
| `elasticsearch.data.heapSize`                                |  Data node heap size                                                                             |  `1536m`                             |
| `elasticsearch.data.hooks.drain.enabled`                     |  Data nodes: Enable drain pre-stop and post-start hook                                           |  `true`                              |
| `elasticsearch.data.persistence.enabled`                     |  Data persistent enabled/disabled                                                                |  `false`                             |
| `elasticsearch.data.persistence.name`                        |  Data statefulset PVC template name                                                              |  `data`                              |
| `elasticsearch.data.persistence.size`                        |  Data persistent volume size                                                                     |  `30Gi`                              |
| `elasticsearch.data.persistence.storageClass`                |  Data persistent volume Class                                                                    |  `nil`                               |
| `elasticsearch.data.persistence.accessMode`                  |  Data persistent Access Mode                                                                     |  `ReadWriteOnce`                     |
| `elasticsearch.data.readinessProbe`                          |  Readiness probes for data-containers                                                            |  see `values.yaml` for defaults      |
| `elasticsearch.data.podAnnotations`                          |  Data StatefulSet annotations                                                                    |  `{}`                                |
| `elasticsearch.data.nodeSelector`                            |  Node labels for data pod assignment                                                             |  `{}`                                |
| `elasticsearch.data.tolerations`                             |  Data tolerations                                                                                |  `[]`                                |
| `elasticsearch.data.terminationGracePeriodSeconds`           |  Data termination grace period (seconds)                                                         |  `3600`                              |
| `elasticsearch.data.antiAffinity`                            |  Data anti-affinity policy                                                                       |  `soft`                              |
| `elasticsearch.data.nodeAffinity`                            |  Data node affinity policy                                                                       |  `{}`                                |
| `elasticsearch.data.podManagementPolicy`                     |  Data pod creation strategy                                                                      |  `OrderedReady`                      |
| `elasticsearch.data.updateStrategy`                          |  Data node update strategy policy                                                                |  `{type: "onDelete"}`                |
I
innerpeacez 已提交
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199


Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,

```console
$ helm install myrelease skywalking --set nameOverride=newSkywalking
```

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,

```console
$ helm install my-release skywalking -f values.yaml
```

> **Tip**: You can use the default [values.yaml](values.yaml)

### RBAC Configuration
Roles and RoleBindings resources will be created automatically for `OAP` .

> **Tip**: You can refer to the default `oap-role.yaml` file in [templates](templates/) to customize your own.

### Ingress TLS
If your cluster allows automatic create/retrieve of TLS certificates (e.g. [kube-lego](https://github.com/jetstack/kube-lego)), please refer to the documentation for that mechanism.

To manually configure TLS, first create/retrieve a key & certificate pair for the address(skywalking ui) you wish to protect. Then create a TLS secret in the namespace:

```console
kubectl create secret tls skywalking-tls --cert=path/to/tls.cert --key=path/to/tls.key
```

Include the secret's name, along with the desired hostnames, in the skywalking-ui Ingress TLS section of your custom `values.yaml` file:

```yaml
ui:
  ingress:
    ## If true, Skywalking ui server Ingress will be created
    ##
    enabled: true

    ## Skywalking ui server Ingress hostnames
    ## Must be provided if Ingress is enabled
    ##
    hosts:
      - skywalking.domain.com

    ## Skywalking ui server Ingress TLS configuration
    ## Secrets must be manually created in the namespace
    ##
    tls:
      - secretName: skywalking-tls
        hosts:
          - skywalking.domain.com
```
200 201 202 203
### Envoy ALS

Envoy ALS(access log service) provides fully logs about RPC routed, including HTTP and TCP.

I
innerpeacez 已提交
204
If you want to open envoy ALS, you can do this by modifying values.yaml. 
205 206 207 208

```yaml
oap:
  envoy:
I
innerpeacez 已提交
209
    als:
210 211 212
      enabled: true
```

I
innerpeacez 已提交
213 214
When envoy als ,will give ServiceAccount clusterrole permission.
More envoy als ,please refer to https://github.com/apache/skywalking/blob/master/docs/en/setup/envoy/als_setting.md#observe-service-mesh-through-als