README.md 16.2 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 32 33 34 35 36 37 38 39 40 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 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 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
# 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
$ helm uninstall my-release -n <namespace>
```

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.

| 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`                                                     | Client component name                                        |
| `elasticsearch.client.replicas`                    | `2`                                                          | Client node replicas (deployment)                            |
| `elasticsearch.client.resources`                   | `{} - cpu limit must be an integer`                          | Client node resources requests & limits                      |
| `elasticsearch.client.priorityClassName`           | `nil`                                                        | Client priorityClass                                         |
| `elasticsearch.client.heapSize`                    | `512m`                                                       | Client node heap size                                        |
| `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`                 | `ClusterIP`                                                  | Client service type                                          |
| `elasticsearch.client.httpNodePort`                | `nil`                                                        | Client service HTTP NodePort port number. Has no effect if client.serviceType is not `NodePort`. |
| `elasticsearch.client.loadBalancerIP`              | `{}`                                                         | Client loadBalancerIP                                        |
| `elasticsearch.client.loadBalancerSourceRanges`    | `{}`                                                         | Client loadBalancerSourceRanges                              |
| `elasticsearch.client.antiAffinity` | `soft` | Client anti-affinity policy |
| `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` | `false` | Enable Client Ingress |
| `elasticsearch.client.ingress.user` | `nil` | If this & password are set, enable basic-auth on ingress |
| `elasticsearch.client.ingress.password` | `nil` | If this & user are set, enable basic-auth on ingress |
| `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` | `false` | Expose transport port 9300 on client service (ClusterIP) |
| `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` | `false` | Expose http port 9200 on master Pods for monitoring, etc |
| `elasticsearch.master.name` | `master` | Master component name |
| `elasticsearch.master.replicas` | `2` | Master node replicas (deployment) |
| `elasticsearch.master.resources` | `{} - cpu limit must be an integer` | Master node resources requests & limits |
| `elasticsearch.master.priorityClassName` | `nil` | Master priorityClass |
| `elasticsearch.master.podAnnotations` | `{}` | Master Deployment annotations |
| `elasticsearch.master.nodeSelector` | `{}` | Node labels for master pod assignment |
| `elasticsearch.master.tolerations` | `[]` | Master tolerations |
| `elasticsearch.master.heapSize` | `512m` | Master node heap size |
| `elasticsearch.master.name` | `master` | Master component name |
| `elasticsearch.master.persistence.enabled` | `false` | Master persistent enabled/disabled |
| `elasticsearch.master.persistence.name` | `data` | Master statefulset PVC template name |
| `elasticsearch.master.persistence.size` | `4Gi` | Master persistent volume size |
| `elasticsearch.master.persistence.storageClass` | `nil` | Master persistent volume Class |
| `elasticsearch.master.persistence.accessMode` | `ReadWriteOnce` | Master persistent Access Mode |
| `elasticsearch.master.readinessProbe` | see `values.yaml` for defaults | Master container readiness probes |
| `elasticsearch.master.antiAffinity` | `soft` | Master anti-affinity policy |
| `elasticsearch.master.nodeAffinity` | `{}` | Master node affinity policy |
| `elasticsearch.master.podManagementPolicy` | `OrderedReady` | Master pod creation strategy |
| `elasticsearch.master.updateStrategy` | `{type: "onDelete"}` | Master node update strategy policy |
| `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` | `false` | Expose http port 9200 on data Pods for monitoring, etc |
| `elasticsearch.data.replicas` | `2` | Data node replicas (statefulset) |
| `elasticsearch.data.resources` | `{} - cpu limit must be an integer` | Data node resources requests & limits |
| `elasticsearch.data.priorityClassName` | `nil` | Data priorityClass |
| `elasticsearch.data.heapSize` | `1536m` | Data node heap size |
| `elasticsearch.data.hooks.drain.enabled` | `true` | Data nodes: Enable drain pre-stop and post-start hook |
| `elasticsearch.data.persistence.enabled` | `false` | Data persistent enabled/disabled |
| `elasticsearch.data.persistence.name` | `data` | Data statefulset PVC template name |
| `elasticsearch.data.persistence.size` | `30Gi` | Data persistent volume size |
| `elasticsearch.data.persistence.storageClass` | `nil` | Data persistent volume Class |
| `elasticsearch.data.persistence.accessMode` | `ReadWriteOnce` | Data persistent Access Mode |
| `elasticsearch.data.readinessProbe` | see `values.yaml` for defaults | Readiness probes for data-containers |
| `elasticsearch.data.podAnnotations` | `{}` | Data StatefulSet annotations |
| `elasticsearch.data.nodeSelector` | `{}` | Node labels for data pod assignment |
| `elasticsearch.data.tolerations` | `[]` | Data tolerations |
| `elasticsearch.data.terminationGracePeriodSeconds` | `3600` | Data termination grace period (seconds) |
| `elasticsearch.data.antiAffinity` | `soft` | Data anti-affinity policy |
| `elasticsearch.data.nodeAffinity` | `{}` | Data node affinity policy |
| `elasticsearch.data.podManagementPolicy` | `OrderedReady` | Data pod creation strategy |
| `elasticsearch.data.updateStrategy` | `{type: "onDelete"}` | Data node update strategy policy |


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
```
### Envoy ALS

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

If you want to open envoy ALS, you can do this by modifying values.yaml. 

```yaml
oap:
  envoy:
    als:
      enabled: true
```

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