Skip to content

Commit

Permalink
Add helm chart for swck v0.7.0
Browse files Browse the repository at this point in the history
Signed-off-by: dashanji <dashanjic@gmail.com>
  • Loading branch information
dashanji committed Sep 25, 2022
1 parent 476afd5 commit cd8472a
Show file tree
Hide file tree
Showing 24 changed files with 3,327 additions and 9 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/e2e.ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ name: Test
on:
pull_request:
push:
paths:
- '!**.md'
paths-ignore:
- '**.md'
branches:
- master

Expand Down Expand Up @@ -66,10 +66,14 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: '1.16'
- name: Run E2E Test
- name: Run Skywalking E2E Test
uses: apache/skywalking-infra-e2e@45584853d6f660102c523b1e9cb5815d12ae55d3
with:
e2e-file: $GITHUB_WORKSPACE/test/e2e/e2e.yaml
- name: Run Skywalking-SWCK E2E Test
uses: apache/skywalking-infra-e2e@afdf1cca0519d65bc480d8680b7a27f9b41fc421
with:
e2e-file: $GITHUB_WORKSPACE/test/e2e/swck/e2e.yaml
- uses: actions/upload-artifact@v2
if: ${{ failure() }}
name: Upload Logs
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/e2e.compatibility.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ name: Test Compatibility

on:
pull_request:
paths:
- '!**.md'
paths-ignore:
- '**.md'

env:
ISTIO_VERSION: 1.7.1
Expand Down Expand Up @@ -50,10 +50,14 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: '1.16'
- name: Run E2E Test
- name: Run Skywalking E2E Test
uses: apache/skywalking-infra-e2e@45584853d6f660102c523b1e9cb5815d12ae55d3
with:
e2e-file: $GITHUB_WORKSPACE/test/e2e/e2e.yaml
- name: Run Skywalking-SWCK E2E Test
uses: apache/skywalking-infra-e2e@afdf1cca0519d65bc480d8680b7a27f9b41fc421
with:
e2e-file: $GITHUB_WORKSPACE/test/e2e/swck/e2e.yaml
- uses: actions/upload-artifact@v2
if: ${{ failure() }}
name: Upload Logs
Expand Down
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ Changes by Version
==================
Release Notes.

4.4.0
------------------

- Add helm chart for swck v0.7.0.

4.3.0
------------------

Expand Down
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export SKYWALKING_RELEASE_NAME=skywalking # change the release name according t
export SKYWALKING_RELEASE_NAMESPACE=default # change the namespace to where you want to install SkyWalking
```

## Install released version using Helm repository
## Install released version of Skywalking using Helm repository

```shell
export REPO=skywalking
Expand All @@ -47,9 +47,9 @@ helm install "${SKYWALKING_RELEASE_NAME}" ${REPO}/skywalking -n "${SKYWALKING_RE
--set elasticsearch.imageTag=6.8.6
```

## Install development version using master branch
## Install development version of Skywalking using master branch

This is needed **only** when you want to install from master branch.
This is needed **only** when you want to install Skywalking from master branch.

```shell script
export REPO=chart
Expand All @@ -59,6 +59,26 @@ helm repo add elastic https://helm.elastic.co
helm dep up ${REPO}/skywalking
```

## Install development version of Skywalking-SWCK using master branch

This is needed **only** when you want to install Skywalking-SWCK from master branch.

Before installing Skywalking-SWCK, you have to install [cert-manager](https://cert-manager.io/) at first.

```shell script
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.9.1/cert-manager.yaml
```

Then install the Skywalking-SWCK as follows.

```shell script
export REPO=chart
git clone https://github.com/apache/skywalking-kubernetes
cd skywalking-kubernetes
helm -n skywalking-swck-system install skywalking-swck ${REPO}/skywalking-swck \
--create-namespace
```

## Install a specific version of SkyWalking & Elasticsearch

In theory, you can deploy all versions of SkyWalking that are >= 6.0.0-GA, by specifying the desired `oap.image.tag`/`ui.image.tag`.
Expand Down
37 changes: 37 additions & 0 deletions chart/skywalking-swck/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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.

# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
OWNERS
28 changes: 28 additions & 0 deletions chart/skywalking-swck/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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: v2
name: skywalking-swck
home: https://github.com/apache/skywalking-swck
version: 0.7.0
description: Apache SkyWalking Cloud on Kubernetes
icon: https://raw.githubusercontent.com/apache/skywalking-kubernetes/master/logo/sw-logo-for-chart.jpg
sources:
- https://github.com/apache/skywalking-kubernetes
maintainers:
- name: hanahmily
email: hanahmily@gmail.com
- name: dashanji
email: dashanjic@gmail.com
85 changes: 85 additions & 0 deletions chart/skywalking-swck/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
Apache Skywalking-SWCK Helm Chart

[Apache Skywalking-SWCK](https://github.com/apache/skywalking-swck) is a platform for the SkyWalking user that provisions, upgrades, maintains SkyWalking relevant components, and makes them work natively on Kubernetes.

## Introduction

This chart bootstraps a [SWCK Operator](https://github.com/apache/skywalking-swck/blob/master/docs/operator.md) deployment and a [SWCK Adapter](https://github.com/apache/skywalking-swck/blob/master/docs/custom-metrics-adapter.md) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.

## Prerequisites

- Kubernetes 1.24.0+
- Helm 3

## Installing the Chart

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

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

The command deploys Apache SkyWalking-SWCK 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 SkyWalking-SWCK components associated with the chart and deletes the release.

## Configuration

There are two major components in swck, namely operator and custom metrics adapter. The following table lists the configurable parameters of the two components and their default values.

| Parameter | Description | Default |
|--------------------------------------------------------------|--------------------------------------------------------------------------------------------------|--------------------------------------|
| `fullnameOverride` | Override fullname | `nil` |
| `adapter.enabled` | Enable the custom metrics adapter. | `false` |
| `adapter.namespace` | Namespace of adapter deployment | `skywalking-custom-metrics-system` |
| `adapter.replicaCount` | The replicas of adapter | `1` |
| `adapter.serviceAccountName` | The service account name of adapter | `skywalking-custom-metrics-apiserver` |
| `adapter.image.repository` | Adapter container image name | `docker.io/apache/skywalking-swck` |
| `adapter.image.pullPolicy` | Adapter container image pull policy | `IfNotPresent` |
| `adapter.image.tag` | Adapter container image tag | `v0.7.0` |
| `adapter.service.port` | The port for the adapter service | `6.1.0` |
| `adapter.oap.service.name` | The service name of OAP | `skywalking-system-oap` |
| `adapter.oap.service.namespace` | The service namespace of OAP | `skywalking-system` |
| `adapter.oap.service.port` | The service port of OAP | `12800` |
| `adapter.resources.limits.cpu` | The limits of cpu in the adapter | `100m` |
| `adapter.resources.limits.memory` | The limits of memory in the adapter | `200Mi` |
| `adapter.resources.requests.cpu` | The requests of cpu in the adapter | `100m` |
| `adapter.resources.requests.memory` | The requests of memory in the adapter | `200Mi` |
| `adapter.affinity` | The affinity policy of adapter | `{}` |
| `operator.replicaCount` | The replicas of operator | `1` |
| `operator.serviceAccountName` | The service account name of operator | `skywalking-swck-controller-manager` |
| `operator.image.repository` | Operator container image name | `docker.io/apache/skywalking-swck` |
| `operator.image.pullPolicy` | Operator container image pull policy | `IfNotPresent` |
| `operator.image.tag` | Operator container image tag | `v0.7.0` |
| `operator.metrics.service.port` | The port for the operator metrics service | `8443` |
| `operator.webhook.service.port` | The port for the operator web hook service | `9443` |
| `operator.resources.limits.cpu` | The limits of cpu in the operator | `200m` |
| `operator.resources.limits.memory` | The limits of memory in the operator | `300Mi` |
| `operator.resources.requests.cpu` | The requests of cpu in the operator | `200m` |
| `operator.resources.requests.memory` | The requests of memory in the operator | `300Mi` |
| `operator.affinity` | The affinity policy of operator | `{}` |


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

```console
$ helm install myrelease skywalking-swck --set fullnameOverride=newskywalking-swck --set adapter.enabled=true
```

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-swck -f values.yaml
```

> **Tip**: You can use the default [values.yaml](values.yaml)
28 changes: 28 additions & 0 deletions chart/skywalking-swck/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{{/*
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.
*/}}

************************************************************************
* *
* SkyWalking-SWCK Helm Chart by SkyWalking Team *
* *
************************************************************************

Thank you for installing {{ .Chart.Name }}.

Your release is named {{ .Release.Name }}.

Learn more, please visit https://github.com/apache/skywalking-swck/tree/master/docs
69 changes: 69 additions & 0 deletions chart/skywalking-swck/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{{/*
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.
*/}}

{{/*
Expand the name of the chart.
*/}}
{{- define "skywalking-swck.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).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "skywalking-swck.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 chart name and version as used by the chart label.
*/}}
{{- define "skywalking-swck.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "skywalking-swck.labels" -}}
helm.sh/chart: {{ include "skywalking-swck.chart" . }}
{{ include "skywalking-swck.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "skywalking-swck.selectorLabels" -}}
app.kubernetes.io/name: {{ include "skywalking-swck.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

Loading

0 comments on commit cd8472a

Please sign in to comment.