Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions .github/workflows/e2e.ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,6 @@ jobs:
- name: Run SWCK oap-ui-agent-satellite Test
config: test/e2e/swck/oap-ui-agent-satellite.yaml
name: ${{ matrix.test.name }}
env:
OAP_TAG: e6bbebe107096bf50ed79e40a88f230bd1237c3d
OAP_REPO: ghcr.io/apache/skywalking/oap
UI_TAG: e6bbebe107096bf50ed79e40a88f230bd1237c3d
UI_REPO: ghcr.io/apache/skywalking/ui
SATELLITE_TAG: v35bfaff6352b4dc351a706772796a1f79b651c14
SATELLITE_REPO: ghcr.io/apache/skywalking-satellite/skywalking-satellite
BANYANDB_TAG: 27cfc5d0eed6891df69eacdf524611cb9fe241e3
BANYANDB_REPO: ghcr.io/apache/skywalking-banyandb
steps:
- uses: actions/checkout@v2
- name: Login to ghcr
Expand All @@ -74,7 +65,7 @@ jobs:
with:
go-version: '1.24'
- name: ${{ matrix.test.name }}
uses: apache/skywalking-infra-e2e@7e4b5b68716fdb7b79b21fa8908f9db497e1b115
uses: apache/skywalking-infra-e2e@8c21e43e241a32a54bdf8eeceb9099eb27e5e9b4
with:
e2e-file: $GITHUB_WORKSPACE/${{ matrix.test.config }}
- if: ${{ failure() }}
Expand Down
115 changes: 115 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# CLAUDE.md

## Project Overview

Apache SkyWalking Helm Charts — Helm 3 charts for deploying SkyWalking and related components on Kubernetes.

## Repository Structure

```
chart/
skywalking/ # Main SkyWalking chart (OAP, UI, Satellite)
Chart.yaml # Chart metadata and dependencies
values.yaml # Default values
values-my-es.yaml # Example values for external Elasticsearch
templates/
_helpers.tpl # Shared template helpers (naming, env vars, init containers)
oap-*.yaml # OAP server templates
ui-*.yaml # UI templates
satellite-*.yaml # Satellite templates
NOTES.txt # Post-install notes
adapter/ # SWCK Adapter chart
operator/ # SWCK Operator chart
test/e2e/ # E2E test configs (skywalking-infra-e2e format)
e2e-elasticsearch.yaml
e2e-banyandb-*.yaml
values.yaml # Test-specific value overrides
swck/ # SWCK-specific e2e tests
.github/workflows/
e2e.ci.yaml # CI pipeline running all e2e tests
```

## Chart Dependencies

Defined in `chart/skywalking/Chart.yaml`:
- **eck-operator** (3.3.1) — ECK operator, condition: `eckOperator.enabled`
- **eck-elasticsearch** (0.18.1, alias: `elasticsearch`) — ECK-managed ES, condition: `elasticsearch.enabled`
- **postgresql** (12.1.2) — Bitnami PostgreSQL, condition: `postgresql.enabled`
- **skywalking-banyandb-helm** (alias: `banyandb`) — BanyanDB, condition: `banyandb.enabled`

## Key Conventions

### Template Helpers (`_helpers.tpl`)
- `skywalking.fullname` — base name for all resources
- `skywalking.oap.fullname` / `skywalking.ui.fullname` / `skywalking.satellite.fullname` — component names
- `skywalking.elasticsearch.fullname` — ECK Elasticsearch resource name (service is `{name}-es-http`)
- `skywalking.containers.wait-for-storage` — init container that waits for the configured storage backend
- `skywalking.oap.envs.storage` — storage-specific environment variables for OAP

### Storage Pattern
Each storage backend (elasticsearch, postgresql, banyandb) follows the same pattern:
- `*.enabled` — deploy the backend as a subchart
- `*.config.*` — connection settings for external instances (when `enabled: false`)
- `_helpers.tpl` handles both embedded and external modes in `wait-for-storage` and `oap.envs.storage`

### ECK Elasticsearch
- ECK auto-generates an auth secret: `{fullname}-es-elastic-user` with key `elastic`
- HTTP TLS is disabled by default (`http.tls.selfSignedCertificate.disabled: true`) for OAP connectivity
- Node topology is configured via `elasticsearch.nodeSets[]` (count, config, podTemplate, volumeClaimTemplates)

## Common Commands

```shell
# Update chart dependencies
helm dep up chart/skywalking

# Template rendering (for validation)
helm template test chart/skywalking \
--set oap.image.tag=10.3.0 \
--set oap.storageType=elasticsearch \
--set ui.image.tag=10.3.0

# Template with external ES (no ECK)
helm template test chart/skywalking \
--set oap.image.tag=10.3.0 \
--set oap.storageType=elasticsearch \
--set ui.image.tag=10.3.0 \
--set elasticsearch.enabled=false \
--set eckOperator.enabled=false

# Package chart
make package

# Clean build artifacts
make clean
```

## Required Values

These must be set explicitly for any deployment:
- `oap.image.tag`
- `oap.storageType` (`elasticsearch`, `postgresql`, or `banyandb`)
- `ui.image.tag`

## E2E Tests

Tests use [skywalking-infra-e2e](https://github.com/apache/skywalking-infra-e2e). Each `.yaml` file under `test/e2e/` defines setup steps, triggers, and verification queries. The CI workflow is in `.github/workflows/e2e.ci.yaml`.

## Docs to Keep in Sync

When modifying chart configuration, update all of:
1. `chart/skywalking/values.yaml` — default values
2. `chart/skywalking/README.md` — parameter tables
3. `README.md` — install examples and user-facing docs
4. `chart/skywalking/values-my-es.yaml` — external ES example (if ES-related)
5. `test/e2e/values.yaml` — test overrides (if defaults change)

## Git Workflow

- **Do not push directly to master.** Always create a feature branch and open a PR.
- Branch naming example: `upgrade-elasticsearch-eck-8.18.8`
- **Do not add Claude as co-author** in commit messages.

## License

All files must include the Apache 2.0 license header.
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ helm install "${SKYWALKING_RELEASE_NAME}" \
--set oap.image.tag=10.3.0 \
--set oap.storageType=banyandb \
--set ui.image.tag=10.3.0 \
--set eckOperator.enabled=false \
--set elasticsearch.enabled=false \
--set banyandb.enabled=true \
--set banyandb.image.tag=0.9.0
Expand Down Expand Up @@ -138,19 +139,22 @@ helm install "${SKYWALKING_RELEASE_NAME}" ${REPO}/skywalking -n "${SKYWALKING_RE
--set ui.image.tag=10.3.0
```

Because ElasticSearch recommends to use the corresponding Helm Chart version of the ElasticSearch version,
if you want to use a specific version of ElasticSearch, you have to change the ElasticSearch Helm Chart version in
`dependencies` section in `Chart.yaml` file, which requires you to install from the source codes.
Or you should deploy the desired ElasticSearch version first by yourself, and then deploy SkyWalking to use the
existing ElasticSearch by setting the following section:
Elasticsearch is now deployed via [ECK (Elastic Cloud on Kubernetes)](https://github.com/elastic/cloud-on-k8s).
By default, the chart deploys the ECK operator and an Elasticsearch 8.18.8 cluster.
If you already have the ECK operator installed, set `eckOperator.enabled=false`.

To use an existing external Elasticsearch instead, disable the embedded deployment:

```yaml
eckOperator:
enabled: false

elasticsearch:
enabled: true
config: # For users of an existing elasticsearch cluster,takes effect when `elasticsearch.enabled` is false
enabled: false
config:
host: elasticsearch-es-http
port:
http: 9200
host: elasticsearch # es service on kubernetes or host
user: "xxx" # [optional]
password: "xxx" # [optional]
```
Expand Down Expand Up @@ -183,7 +187,7 @@ helm install "${SKYWALKING_RELEASE_NAME}" ${REPO}/skywalking -n "${SKYWALKING_RE

## Install a specific version of SkyWalking with an existing database

If you want to use a specific version of ElasticSearch as storage solution, for instance, modify the connection information to the existing ElasticSearch cluster in file [`values-my-es.yaml`](chart/skywalking/values-my-es.yaml).
If you want to use an existing Elasticsearch cluster as storage solution, modify the connection information in file [`values-my-es.yaml`](chart/skywalking/values-my-es.yaml).

```shell script
helm install "${SKYWALKING_RELEASE_NAME}" ${REPO}/skywalking -n "${SKYWALKING_RELEASE_NAMESPACE}" \
Expand Down
9 changes: 7 additions & 2 deletions chart/skywalking/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,13 @@ maintainers:
email: kezhenxu94@163.com

dependencies:
- name: elasticsearch
version: ~7.17.1
- name: eck-operator
version: 3.3.1
repository: https://helm.elastic.co/
condition: eckOperator.enabled
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we used elasticsearch.enabled to control whether elasticsearch is deployed in this chart, maybe we can just reuse it to reduce downstream changes, nit

- name: eck-elasticsearch
alias: elasticsearch
version: 0.18.1
repository: https://helm.elastic.co/
condition: elasticsearch.enabled
- name: postgresql
Expand Down
Loading
Loading