This is an automated email from the ASF dual-hosted git repository. innerpeacez pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/skywalking-kubernetes.git
commit 08b2d4f82726ca4f4b46b29e6ec3918da90cec5f Author: Gao Hongtao <hanahm...@gmail.com> AuthorDate: Wed Jun 26 08:35:09 2019 +0800 Add 6.1.0 chart --- .../6.0.0-GA/skywalking/.helmignore | 0 .../6.0.0-GA/skywalking/Chart.yaml | 0 .../6 => helm-chart}/6.0.0-GA/skywalking/README.md | 0 .../6.0.0-GA/skywalking/templates/NOTES.txt | 0 .../6.0.0-GA/skywalking/templates/_helpers.tpl | 0 .../elasticsearch/elasticsearch-service.yaml | 0 .../elasticsearch/elasticsearch-statefulset.yaml | 0 .../skywalking/templates/oap/oap-config.yaml | 0 .../skywalking/templates/oap/oap-deployment.yaml | 0 .../skywalking/templates/oap/oap-role.yaml | 0 .../skywalking/templates/oap/oap-rolebinding.yaml | 0 .../skywalking/templates/oap/oap-service.yaml | 0 .../templates/oap/oap-serviceaccount.yaml | 0 .../skywalking/templates/ui/ui-deployment.yaml | 0 .../skywalking/templates/ui/ui-ingress.yaml | 0 .../skywalking/templates/ui/ui-service.yaml | 0 .../6.0.0-GA/skywalking/values.yaml | 0 .../skywalking => helm-chart/6.1.0}/.helmignore | 1 + helm-chart/6.1.0/Chart.yaml | 12 ++ helm-chart/6.1.0/OWNERS | 6 + helm-chart/6.1.0/README.md | 129 +++++++++++++++++++++ helm-chart/6.1.0/requirements.lock | 6 + helm-chart/6.1.0/requirements.yaml | 5 + .../6.1.0}/templates/NOTES.txt | 14 +-- helm-chart/6.1.0/templates/_helpers.tpl | 61 ++++++++++ helm-chart/6.1.0/templates/es-init.job.yaml | 38 ++++++ helm-chart/6.1.0/templates/oap-deployment.yaml | 99 ++++++++++++++++ helm-chart/6.1.0/templates/oap-role.yaml | 13 +++ helm-chart/6.1.0/templates/oap-rolebinding.yaml | 17 +++ helm-chart/6.1.0/templates/oap-serviceaccount.yaml | 10 ++ helm-chart/6.1.0/templates/oap-svc.yaml | 21 ++++ helm-chart/6.1.0/templates/ui-deployment.yaml | 42 +++++++ helm-chart/6.1.0/templates/ui-ingress.yaml | 34 ++++++ helm-chart/6.1.0/templates/ui-svc.yaml | 48 ++++++++ helm-chart/6.1.0/values.yaml | 82 +++++++++++++ 35 files changed, 631 insertions(+), 7 deletions(-) diff --git a/helm/charts/6/6.0.0-GA/skywalking/.helmignore b/helm-chart/6.0.0-GA/skywalking/.helmignore similarity index 100% copy from helm/charts/6/6.0.0-GA/skywalking/.helmignore copy to helm-chart/6.0.0-GA/skywalking/.helmignore diff --git a/helm/charts/6/6.0.0-GA/skywalking/Chart.yaml b/helm-chart/6.0.0-GA/skywalking/Chart.yaml similarity index 100% rename from helm/charts/6/6.0.0-GA/skywalking/Chart.yaml rename to helm-chart/6.0.0-GA/skywalking/Chart.yaml diff --git a/helm/charts/6/6.0.0-GA/skywalking/README.md b/helm-chart/6.0.0-GA/skywalking/README.md similarity index 100% rename from helm/charts/6/6.0.0-GA/skywalking/README.md rename to helm-chart/6.0.0-GA/skywalking/README.md diff --git a/helm/charts/6/6.0.0-GA/skywalking/templates/NOTES.txt b/helm-chart/6.0.0-GA/skywalking/templates/NOTES.txt similarity index 100% copy from helm/charts/6/6.0.0-GA/skywalking/templates/NOTES.txt copy to helm-chart/6.0.0-GA/skywalking/templates/NOTES.txt diff --git a/helm/charts/6/6.0.0-GA/skywalking/templates/_helpers.tpl b/helm-chart/6.0.0-GA/skywalking/templates/_helpers.tpl similarity index 100% rename from helm/charts/6/6.0.0-GA/skywalking/templates/_helpers.tpl rename to helm-chart/6.0.0-GA/skywalking/templates/_helpers.tpl diff --git a/helm/charts/6/6.0.0-GA/skywalking/templates/elasticsearch/elasticsearch-service.yaml b/helm-chart/6.0.0-GA/skywalking/templates/elasticsearch/elasticsearch-service.yaml similarity index 100% rename from helm/charts/6/6.0.0-GA/skywalking/templates/elasticsearch/elasticsearch-service.yaml rename to helm-chart/6.0.0-GA/skywalking/templates/elasticsearch/elasticsearch-service.yaml diff --git a/helm/charts/6/6.0.0-GA/skywalking/templates/elasticsearch/elasticsearch-statefulset.yaml b/helm-chart/6.0.0-GA/skywalking/templates/elasticsearch/elasticsearch-statefulset.yaml similarity index 100% rename from helm/charts/6/6.0.0-GA/skywalking/templates/elasticsearch/elasticsearch-statefulset.yaml rename to helm-chart/6.0.0-GA/skywalking/templates/elasticsearch/elasticsearch-statefulset.yaml diff --git a/helm/charts/6/6.0.0-GA/skywalking/templates/oap/oap-config.yaml b/helm-chart/6.0.0-GA/skywalking/templates/oap/oap-config.yaml similarity index 100% rename from helm/charts/6/6.0.0-GA/skywalking/templates/oap/oap-config.yaml rename to helm-chart/6.0.0-GA/skywalking/templates/oap/oap-config.yaml diff --git a/helm/charts/6/6.0.0-GA/skywalking/templates/oap/oap-deployment.yaml b/helm-chart/6.0.0-GA/skywalking/templates/oap/oap-deployment.yaml similarity index 100% rename from helm/charts/6/6.0.0-GA/skywalking/templates/oap/oap-deployment.yaml rename to helm-chart/6.0.0-GA/skywalking/templates/oap/oap-deployment.yaml diff --git a/helm/charts/6/6.0.0-GA/skywalking/templates/oap/oap-role.yaml b/helm-chart/6.0.0-GA/skywalking/templates/oap/oap-role.yaml similarity index 100% rename from helm/charts/6/6.0.0-GA/skywalking/templates/oap/oap-role.yaml rename to helm-chart/6.0.0-GA/skywalking/templates/oap/oap-role.yaml diff --git a/helm/charts/6/6.0.0-GA/skywalking/templates/oap/oap-rolebinding.yaml b/helm-chart/6.0.0-GA/skywalking/templates/oap/oap-rolebinding.yaml similarity index 100% rename from helm/charts/6/6.0.0-GA/skywalking/templates/oap/oap-rolebinding.yaml rename to helm-chart/6.0.0-GA/skywalking/templates/oap/oap-rolebinding.yaml diff --git a/helm/charts/6/6.0.0-GA/skywalking/templates/oap/oap-service.yaml b/helm-chart/6.0.0-GA/skywalking/templates/oap/oap-service.yaml similarity index 100% rename from helm/charts/6/6.0.0-GA/skywalking/templates/oap/oap-service.yaml rename to helm-chart/6.0.0-GA/skywalking/templates/oap/oap-service.yaml diff --git a/helm/charts/6/6.0.0-GA/skywalking/templates/oap/oap-serviceaccount.yaml b/helm-chart/6.0.0-GA/skywalking/templates/oap/oap-serviceaccount.yaml similarity index 100% rename from helm/charts/6/6.0.0-GA/skywalking/templates/oap/oap-serviceaccount.yaml rename to helm-chart/6.0.0-GA/skywalking/templates/oap/oap-serviceaccount.yaml diff --git a/helm/charts/6/6.0.0-GA/skywalking/templates/ui/ui-deployment.yaml b/helm-chart/6.0.0-GA/skywalking/templates/ui/ui-deployment.yaml similarity index 100% rename from helm/charts/6/6.0.0-GA/skywalking/templates/ui/ui-deployment.yaml rename to helm-chart/6.0.0-GA/skywalking/templates/ui/ui-deployment.yaml diff --git a/helm/charts/6/6.0.0-GA/skywalking/templates/ui/ui-ingress.yaml b/helm-chart/6.0.0-GA/skywalking/templates/ui/ui-ingress.yaml similarity index 100% rename from helm/charts/6/6.0.0-GA/skywalking/templates/ui/ui-ingress.yaml rename to helm-chart/6.0.0-GA/skywalking/templates/ui/ui-ingress.yaml diff --git a/helm/charts/6/6.0.0-GA/skywalking/templates/ui/ui-service.yaml b/helm-chart/6.0.0-GA/skywalking/templates/ui/ui-service.yaml similarity index 100% rename from helm/charts/6/6.0.0-GA/skywalking/templates/ui/ui-service.yaml rename to helm-chart/6.0.0-GA/skywalking/templates/ui/ui-service.yaml diff --git a/helm/charts/6/6.0.0-GA/skywalking/values.yaml b/helm-chart/6.0.0-GA/skywalking/values.yaml similarity index 100% rename from helm/charts/6/6.0.0-GA/skywalking/values.yaml rename to helm-chart/6.0.0-GA/skywalking/values.yaml diff --git a/helm/charts/6/6.0.0-GA/skywalking/.helmignore b/helm-chart/6.1.0/.helmignore similarity index 97% rename from helm/charts/6/6.0.0-GA/skywalking/.helmignore rename to helm-chart/6.1.0/.helmignore index f0c1319..7c04072 100644 --- a/helm/charts/6/6.0.0-GA/skywalking/.helmignore +++ b/helm-chart/6.1.0/.helmignore @@ -19,3 +19,4 @@ .project .idea/ *.tmproj +OWNERS diff --git a/helm-chart/6.1.0/Chart.yaml b/helm-chart/6.1.0/Chart.yaml new file mode 100644 index 0000000..df60971 --- /dev/null +++ b/helm-chart/6.1.0/Chart.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +name: skywalking +home: https://www.elastic.co/products/elasticsearch +version: 0.1.0 +appVersion: 6.1.0 +description: Apache SkyWalking APM System +icon: https://github.com/apache/skywalking-website/blob/master/docs/.vuepress/public/assets/logo.svg +sources: +- https://github.com/apache/skywalking-kubernetes +maintainers: +- name: hanahmily + email: hanahm...@gmail.com diff --git a/helm-chart/6.1.0/OWNERS b/helm-chart/6.1.0/OWNERS new file mode 100644 index 0000000..5d00621 --- /dev/null +++ b/helm-chart/6.1.0/OWNERS @@ -0,0 +1,6 @@ +approvers: +- hanahmily +- wu-sheng +reviewers: +- hanahmily +- wu-sheng diff --git a/helm-chart/6.1.0/README.md b/helm-chart/6.1.0/README.md new file mode 100644 index 0000000..a78e124 --- /dev/null +++ b/helm-chart/6.1.0/README.md @@ -0,0 +1,129 @@ +# 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 + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```console +$ helm install --name my-release skywalking +``` + +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: + +```console +$ helm delete my-release +``` + +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.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` | + + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, + +```console +$ helm install skywalking --name=myrelease --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 skywalking --name my-release -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 +``` diff --git a/helm-chart/6.1.0/requirements.lock b/helm-chart/6.1.0/requirements.lock new file mode 100644 index 0000000..ded1e89 --- /dev/null +++ b/helm-chart/6.1.0/requirements.lock @@ -0,0 +1,6 @@ +dependencies: +- name: elasticsearch + repository: https://kubernetes-charts.storage.googleapis.com/ + version: 1.28.2 +digest: sha256:67d9994c349045029be4c1a5fb3865bb765a80bff936b9bf347232f25ca8578e +generated: 2019-06-12T17:35:54.545428+08:00 diff --git a/helm-chart/6.1.0/requirements.yaml b/helm-chart/6.1.0/requirements.yaml new file mode 100644 index 0000000..1f7ab67 --- /dev/null +++ b/helm-chart/6.1.0/requirements.yaml @@ -0,0 +1,5 @@ +dependencies: +- name: elasticsearch + version: ~1.28.2 + repository: https://kubernetes-charts.storage.googleapis.com/ + condition: elasticsearch.enabled diff --git a/helm/charts/6/6.0.0-GA/skywalking/templates/NOTES.txt b/helm-chart/6.1.0/templates/NOTES.txt similarity index 64% rename from helm/charts/6/6.0.0-GA/skywalking/templates/NOTES.txt rename to helm-chart/6.1.0/templates/NOTES.txt index e49295c..c7b38cf 100644 --- a/helm/charts/6/6.0.0-GA/skywalking/templates/NOTES.txt +++ b/helm-chart/6.1.0/templates/NOTES.txt @@ -1,19 +1,19 @@ -1. Get the application URL by running these commands: +Get the UI URL by running these commands: {{- if .Values.ui.ingress.enabled }} {{- range .Values.ui.ingress.hosts }} http{{ if $.Values.ui.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ui.ingress.path }} {{- end }} {{- else if contains "NodePort" .Values.ui.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "skywalking.fullname" . }}) + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "skywalking.ui.fullname" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") echo http://$NODE_IP:$NODE_PORT {{- else if contains "LoadBalancer" .Values.ui.service.type }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get svc -w {{ include "skywalking.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "skywalking.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo http://$SERVICE_IP:{{ .Values.service.port }} + You can watch the status of by running 'kubectl get svc -w {{ include "skywalking.ui.fullname" . }} -n {{ .Release.Namespace }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "skywalking.ui.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.ui.service.externalPort }} {{- else if contains "ClusterIP" .Values.ui.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ include "skywalking.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "skywalking.name" . }},release={{ .Release.Name }},component={{ .Values.ui.name }}" -o jsonpath="{.items[0].metadata.name}") echo "Visit http://127.0.0.1:8080 to use your application" - kubectl port-forward $POD_NAME 8080:80 + kubectl port-forward $POD_NAME 8080:{{ .Values.ui.service.internalPort }} {{- end }} diff --git a/helm-chart/6.1.0/templates/_helpers.tpl b/helm-chart/6.1.0/templates/_helpers.tpl new file mode 100644 index 0000000..49657be --- /dev/null +++ b/helm-chart/6.1.0/templates/_helpers.tpl @@ -0,0 +1,61 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "skywalking.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "skywalking.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create a default fully qualified oap name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "skywalking.oap.fullname" -}} +{{ template "skywalking.fullname" . }}-{{ .Values.oap.name }} +{{- end -}} + +{{/* +Create a default fully qualified ui name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "skywalking.ui.fullname" -}} +{{ template "skywalking.fullname" . }}-{{ .Values.ui.name }} +{{- end -}} + +{{/* +Create the name of the service account to use for the oap cluster +*/}} +{{- define "skywalking.serviceAccountName.oap" -}} +{{ default (include "skywalking.oap.fullname" .) .Values.serviceAccounts.oap }} +{{- end -}} + +{{- define "call-nested" }} +{{- $dot := index . 0 }} +{{- $subchart := index . 1 }} +{{- $template := index . 2 }} +{{- include $template (dict "Chart" (dict "Name" $subchart) "Values" (index $dot.Values $subchart) "Release" $dot.Release "Capabilities" $dot.Capabilities) }} +{{- end }} + +{{- define "skywalking.containers.wait-for-es" -}} +- name: wait-for-elasticsearch + image: busybox:1.30 + imagePullPolicy: IfNotPresent + command: ['sh', '-c', 'for i in $(seq 1 60); do nc -z -w3 {{ include "call-nested" (list . "elasticsearch" "elasticsearch.client.fullname") }} 9200 && exit 0 || sleep 5; done; exit 1'] +{{- end -}} diff --git a/helm-chart/6.1.0/templates/es-init.job.yaml b/helm-chart/6.1.0/templates/es-init.job.yaml new file mode 100644 index 0000000..983a002 --- /dev/null +++ b/helm-chart/6.1.0/templates/es-init.job.yaml @@ -0,0 +1,38 @@ +# https://docs.sentry.io/server/installation/docker/#running-migrations +apiVersion: batch/v1 +kind: Job +metadata: + name: "{{ .Release.Name }}-es-init" + labels: + app: {{ template "skywalking.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + component: "{{ template "skywalking.fullname" . }}-job" + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} +spec: + template: + metadata: + name: "{{ .Release.Name }}-es-init" + labels: + app: {{ template "skywalking.name" . }} + component: "{{ template "skywalking.fullname" . }}-job" + release: {{ .Release.Name }} + spec: + restartPolicy: Never + initContainers: + {{- include "skywalking.containers.wait-for-es" . | nindent 6 }} + containers: + - name: {{ .Values.oap.name }} + image: "{{ .Values.oap.image.repository }}:{{ .Values.oap.image.tag }}" + imagePullPolicy: {{ .Values.oap.image.pullPolicy }} +{{- if .Values.oap.resources }} + resources: +{{ toYaml .Values.oap.resources | indent 10 }} +{{- end }} + env: + - name: JAVA_OPTS + value: "{{ .Values.oap.javaOpts }} -Dmode=init" + - name: SW_STORAGE + value: elasticsearch + - name: SW_STORAGE_ES_CLUSTER_NODES + value: "{{ include "call-nested" (list . "elasticsearch" "elasticsearch.client.fullname") }}:9200" diff --git a/helm-chart/6.1.0/templates/oap-deployment.yaml b/helm-chart/6.1.0/templates/oap-deployment.yaml new file mode 100644 index 0000000..ecc7436 --- /dev/null +++ b/helm-chart/6.1.0/templates/oap-deployment.yaml @@ -0,0 +1,99 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: {{ template "skywalking.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + component: "{{ .Values.oap.name }}" + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "skywalking.oap.fullname" . }} +spec: + replicas: {{ .Values.oap.replicas }} + selector: + matchLabels: + app: {{ template "skywalking.name" . }} + component: "{{ .Values.oap.name }}" + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "skywalking.name" . }} + component: "{{ .Values.oap.name }}" + release: {{ .Release.Name }} + {{- if .Values.oap.podAnnotations }} + annotations: +{{ toYaml .Values.oap.podAnnotations | indent 8 }} + {{- end }} + spec: + serviceAccountName: {{ template "skywalking.serviceAccountName.oap" . }} + affinity: + {{- if eq .Values.oap.antiAffinity "hard" }} + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" + labelSelector: + matchLabels: + app: "{{ template "skywalking.name" . }}" + release: "{{ .Release.Name }}" + component: "{{ .Values.oap.name }}" + {{- else if eq .Values.oap.antiAffinity "soft" }} + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + podAffinityTerm: + topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + app: "{{ template "skywalking.name" . }}" + release: "{{ .Release.Name }}" + component: "{{ .Values.oap.name }}" + {{- end }} + {{- with .Values.oap.nodeAffinity }} + nodeAffinity: +{{ toYaml . | indent 10 }} + {{- end }} +{{- if .Values.oap.nodeSelector }} + nodeSelector: +{{ toYaml .Values.oap.nodeSelector | indent 8 }} +{{- end }} +{{- if .Values.oap.tolerations }} + tolerations: +{{ toYaml .Values.oap.tolerations | indent 8 }} +{{- end }} + initContainers: + {{- include "skywalking.containers.wait-for-es" . | nindent 6 }} + containers: + - name: {{ .Values.oap.name }} + image: "{{ .Values.oap.image.repository }}:{{ .Values.oap.image.tag }}" + imagePullPolicy: {{ .Values.oap.image.pullPolicy }} + ports: + - containerPort: 11800 + name: grpc + - containerPort: 12800 + name: rest +{{- if .Values.oap.resources }} + resources: +{{ toYaml .Values.oap.resources | indent 10 }} +{{- end }} + env: + - name: JAVA_OPTS + value: "{{ .Values.oap.javaOpts }} -Dmode=no-init" + - name: SW_CLUSTER + value: kubernetes + - name: SW_CLUSTER_K8S_NAMESPACE + value: "{{ .Release.Namespace }}" + - name: SW_CLUSTER_K8S_LABEL + value: "app={{ template "skywalking.name" . }},release={{ .Release.Name }},component={{ .Values.oap.name }}" + - name: SKYWALKING_COLLECTOR_UID + valueFrom: + fieldRef: + fieldPath: metadata.uid + - name: SW_STORAGE + value: elasticsearch + - name: SW_STORAGE_ES_CLUSTER_NODES + value: "{{ include "call-nested" (list . "elasticsearch" "elasticsearch.client.fullname") }}:9200" + {{- range $key, $value := .Values.oap.env }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} diff --git a/helm-chart/6.1.0/templates/oap-role.yaml b/helm-chart/6.1.0/templates/oap-role.yaml new file mode 100644 index 0000000..a867072 --- /dev/null +++ b/helm-chart/6.1.0/templates/oap-role.yaml @@ -0,0 +1,13 @@ +kind: Role +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ template "skywalking.fullname" . }} + labels: + app: {{ template "skywalking.name" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +rules: +- apiGroups: [""] + resources: ["pods"] + verbs: ["get", "watch", "list"] diff --git a/helm-chart/6.1.0/templates/oap-rolebinding.yaml b/helm-chart/6.1.0/templates/oap-rolebinding.yaml new file mode 100644 index 0000000..e3894fe --- /dev/null +++ b/helm-chart/6.1.0/templates/oap-rolebinding.yaml @@ -0,0 +1,17 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ template "skywalking.fullname" . }} + labels: + app: {{ template "skywalking.name" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "skywalking.fullname" . }} +subjects: +- kind: ServiceAccount + name: {{ template "skywalking.serviceAccountName.oap" . }} + namespace: {{ .Release.Namespace }} diff --git a/helm-chart/6.1.0/templates/oap-serviceaccount.yaml b/helm-chart/6.1.0/templates/oap-serviceaccount.yaml new file mode 100644 index 0000000..702a50f --- /dev/null +++ b/helm-chart/6.1.0/templates/oap-serviceaccount.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app: {{ template "skywalking.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + component: "{{ .Values.oap.name }}" + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "skywalking.serviceAccountName.oap" . }} diff --git a/helm-chart/6.1.0/templates/oap-svc.yaml b/helm-chart/6.1.0/templates/oap-svc.yaml new file mode 100644 index 0000000..f7a7d6e --- /dev/null +++ b/helm-chart/6.1.0/templates/oap-svc.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "skywalking.oap.fullname" . }} + labels: + app: {{ template "skywalking.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + component: "{{ .Values.oap.name }}" + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} +spec: + type: {{ .Values.oap.service.type }} + ports: + - port: {{ .Values.oap.ports.rest }} + name: rest + - port: {{ .Values.oap.ports.grpc }} + name: grpc + selector: + app: {{ template "skywalking.name" . }} + component: "{{ .Values.oap.name }}" + release: {{ .Release.Name }} diff --git a/helm-chart/6.1.0/templates/ui-deployment.yaml b/helm-chart/6.1.0/templates/ui-deployment.yaml new file mode 100644 index 0000000..a8a6ee8 --- /dev/null +++ b/helm-chart/6.1.0/templates/ui-deployment.yaml @@ -0,0 +1,42 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "skywalking.ui.fullname" . }} + labels: + app: {{ template "skywalking.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + component: "{{ .Values.ui.name }}" + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} +spec: + replicas: {{ .Values.ui.replicas }} + selector: + matchLabels: + app: {{ template "skywalking.name" . }} + component: "{{ .Values.ui.name }}" + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "skywalking.name" . }} + component: "{{ .Values.ui.name }}" + release: {{ .Release.Name }} + {{- if .Values.ui.podAnnotations }} + annotations: +{{ toYaml .Values.ui.podAnnotations | indent 8 }} + {{- end }} + spec: + containers: + - name: {{ .Values.ui.name }} + image: {{ .Values.ui.image.repository }}:{{ .Values.ui.image.tag }} + imagePullPolicy: {{ .Values.ui.image.pullPolicy }} + ports: + - containerPort: {{ .Values.ui.service.internalPort }} + name: page +{{- if .Values.ui.resources }} + resources: +{{ toYaml .Values.ui.resources | indent 10 }} +{{- end }} + env: + - name: SW_OAP_ADDRESS + value: {{ template "skywalking.oap.fullname" . }}:{{ .Values.oap.ports.rest }} diff --git a/helm-chart/6.1.0/templates/ui-ingress.yaml b/helm-chart/6.1.0/templates/ui-ingress.yaml new file mode 100644 index 0000000..406a48b --- /dev/null +++ b/helm-chart/6.1.0/templates/ui-ingress.yaml @@ -0,0 +1,34 @@ +{{- if .Values.ui.ingress.enabled -}} +{{- $serviceName := include "skywalking.ui.fullname" . -}} +{{- $servicePort := .Values.ui.service.externalPort -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + labels: + app: {{ template "skywalking.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + component: "{{ .Values.ui.name }}" + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "skywalking.ui.fullname" . }} + annotations: + {{- range $key, $value := .Values.ui.ingress.annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} +spec: + rules: + {{- range .Values.ui.ingress.hosts }} + {{- $url := splitList "/" . }} + - host: {{ first $url }} + http: + paths: + - path: /{{ rest $url | join "/" }} + backend: + serviceName: {{ $serviceName }} + servicePort: {{ $servicePort }} + {{- end -}} + {{- if .Values.ui.ingress.tls }} + tls: +{{ toYaml .Values.ui.ingress.tls | indent 4 }} + {{- end -}} +{{- end -}} diff --git a/helm-chart/6.1.0/templates/ui-svc.yaml b/helm-chart/6.1.0/templates/ui-svc.yaml new file mode 100644 index 0000000..fb727aa --- /dev/null +++ b/helm-chart/6.1.0/templates/ui-svc.yaml @@ -0,0 +1,48 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: {{ template "skywalking.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version }} + component: "{{ .Values.ui.name }}" + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "skywalking.ui.fullname" . }} + {{- with .Values.ui.service.annotations }} + annotations: + {{- range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} +spec: + {{- if .Values.ui.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: + {{- range $cidr := .Values.ui.service.loadBalancerSourceRanges }} + - {{ $cidr }} + {{- end }} + {{- end }} + type: {{ .Values.ui.service.type }} + {{- if and (eq .Values.ui.service.type "ClusterIP") .Values.ui.service.clusterIP }} + clusterIP: {{ .Values.ui.service.clusterIP }} + {{- end }} + ports: + - port: {{ .Values.ui.service.externalPort }} + targetPort: {{ .Values.ui.service.internalPort }} + protocol: TCP +{{ if (and (eq .Values.ui.service.type "NodePort") (not (empty .Values.ui.service.nodePort))) }} + nodePort: {{ .Values.ui.service.nodePort }} +{{ end }} +{{- if .Values.ui.service.portName }} + name: {{ .Values.ui.service.portName }} +{{- end }} +{{- if .Values.ui.service.externalIPs }} + externalIPs: +{{ toYaml .Values.ui.service.externalIPs | indent 4 }} +{{- end }} + selector: + app: {{ template "skywalking.name" . }} + component: "{{ .Values.ui.name }}" + release: {{ .Release.Name }} +{{- if .Values.ui.service.loadBalancerIP }} + loadBalancerIP: {{ .Values.ui.service.loadBalancerIP }} +{{- end }} diff --git a/helm-chart/6.1.0/values.yaml b/helm-chart/6.1.0/values.yaml new file mode 100644 index 0000000..0864e69 --- /dev/null +++ b/helm-chart/6.1.0/values.yaml @@ -0,0 +1,82 @@ +# Default values for skywalking. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +serviceAccounts: + oap: + +oap: + name: skywalking-oap + image: + repository: apache/skywalking-oap-server + tag: 6.1.0 + pullPolicy: IfNotPresent + ports: + grpc: 11800 + rest: 12800 + replicas: 2 + service: + type: ClusterIP + javaOpts: -Xmx2g -Xms2g + antiAffinity: "soft" + nodeAffinity: {} + nodeSelector: {} + tolerations: [] + resources: {} + # limits: + # cpu: 8 + # memory: 8Gi + # requests: + # cpu: 8 + # memory: 4Gi + # podAnnotations: + # example: oap-foo + env: + # more env, please refer to https://hub.docker.com/r/apache/skywalking-oap-server + +ui: + name: skywalking-ui + replicas: 1 + image: + repository: apache/skywalking-ui + tag: 6.1.0 + pullPolicy: IfNotPresent + # podAnnotations: + # example: oap-foo + ingress: + enabled: false + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + path: / + hosts: [] + # - skywalking.local + tls: [] + # - secretName: skywalking-tls + # hosts: + # - skywalking.local + service: + type: ClusterIP + # clusterIP: None + externalPort: 80 + internalPort: 8080 + ## External IP addresses of service + ## Default: nil + ## + # externalIPs: + # - 192.168.0.1 + # + ## LoadBalancer IP if service.type is LoadBalancer + ## Default: nil + ## + # loadBalancerIP: 10.2.2.2 + # Annotation example: setup ssl with aws cert when service.type is LoadBalancer + # service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-east-1:EXAMPLE_CERT + annotations: {} + ## Limit load balancer source ips to list of CIDRs (where available) + # loadBalancerSourceRanges: [] + +elasticsearch: + enabled: true + +nameOverride: ""