Skip to content

Commit 2850db1

Browse files
authored
Upgrade Elasticsearch dependency to ECK 8.18.8 (#176)
## Upgrade Elasticsearch dependency to ECK 8.18.8 ### Chart changes - Replace deprecated `elasticsearch` subchart with ECK (`eck-operator` 3.3.1 + `eck-elasticsearch` 0.18.1, Elasticsearch 8.18.8) - Update `_helpers.tpl` with ECK-aware naming, `wait-for-storage` init container, and auth secret handling - Rewrite `values.yaml` to use ECK configuration (nodeSets, TLS, auth) instead of old master/data/client topology - Update `values-my-es.yaml` example for external ES with ECK disabled - Update `README.md` with new parameter tables and install examples ### E2E test improvements - Consolidate `env.swck` into a single `test/e2e/env` file - Migrate all SWCK e2e tests from fetching remote YAML to local template files with configurable image tags - Migrate SWCK tests to use BanyanDB helm chart instead of hardcoded images - Add local SWCK test resource files (`skywalking-components.yaml`, `skywalking-components-elasticsearch.yaml`, `skywalking-components-satellite.yaml`) - Fix oapserverconfig test timeout caused by shell variable lost across separate e2e steps - Fix trigger configuration (`times: 0`) for continuous metric generation - Fix ECK operator StatefulSet wait logic in ES e2e test
1 parent 0cc9491 commit 2850db1

22 files changed

Lines changed: 699 additions & 412 deletions

.github/workflows/e2e.ci.yaml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,6 @@ jobs:
5252
- name: Run SWCK oap-ui-agent-satellite Test
5353
config: test/e2e/swck/oap-ui-agent-satellite.yaml
5454
name: ${{ matrix.test.name }}
55-
env:
56-
OAP_TAG: e6bbebe107096bf50ed79e40a88f230bd1237c3d
57-
OAP_REPO: ghcr.io/apache/skywalking/oap
58-
UI_TAG: e6bbebe107096bf50ed79e40a88f230bd1237c3d
59-
UI_REPO: ghcr.io/apache/skywalking/ui
60-
SATELLITE_TAG: v35bfaff6352b4dc351a706772796a1f79b651c14
61-
SATELLITE_REPO: ghcr.io/apache/skywalking-satellite/skywalking-satellite
62-
BANYANDB_TAG: 27cfc5d0eed6891df69eacdf524611cb9fe241e3
63-
BANYANDB_REPO: ghcr.io/apache/skywalking-banyandb
6455
steps:
6556
- uses: actions/checkout@v2
6657
- name: Login to ghcr
@@ -74,7 +65,7 @@ jobs:
7465
with:
7566
go-version: '1.24'
7667
- name: ${{ matrix.test.name }}
77-
uses: apache/skywalking-infra-e2e@7e4b5b68716fdb7b79b21fa8908f9db497e1b115
68+
uses: apache/skywalking-infra-e2e@8c21e43e241a32a54bdf8eeceb9099eb27e5e9b4
7869
with:
7970
e2e-file: $GITHUB_WORKSPACE/${{ matrix.test.config }}
8071
- if: ${{ failure() }}

CLAUDE.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# CLAUDE.md
2+
3+
## Project Overview
4+
5+
Apache SkyWalking Helm Charts — Helm 3 charts for deploying SkyWalking and related components on Kubernetes.
6+
7+
## Repository Structure
8+
9+
```
10+
chart/
11+
skywalking/ # Main SkyWalking chart (OAP, UI, Satellite)
12+
Chart.yaml # Chart metadata and dependencies
13+
values.yaml # Default values
14+
values-my-es.yaml # Example values for external Elasticsearch
15+
templates/
16+
_helpers.tpl # Shared template helpers (naming, env vars, init containers)
17+
oap-*.yaml # OAP server templates
18+
ui-*.yaml # UI templates
19+
satellite-*.yaml # Satellite templates
20+
NOTES.txt # Post-install notes
21+
adapter/ # SWCK Adapter chart
22+
operator/ # SWCK Operator chart
23+
test/e2e/ # E2E test configs (skywalking-infra-e2e format)
24+
e2e-elasticsearch.yaml
25+
e2e-banyandb-*.yaml
26+
values.yaml # Test-specific value overrides
27+
swck/ # SWCK-specific e2e tests
28+
.github/workflows/
29+
e2e.ci.yaml # CI pipeline running all e2e tests
30+
```
31+
32+
## Chart Dependencies
33+
34+
Defined in `chart/skywalking/Chart.yaml`:
35+
- **eck-operator** (3.3.1) — ECK operator, condition: `eckOperator.enabled`
36+
- **eck-elasticsearch** (0.18.1, alias: `elasticsearch`) — ECK-managed ES, condition: `elasticsearch.enabled`
37+
- **postgresql** (12.1.2) — Bitnami PostgreSQL, condition: `postgresql.enabled`
38+
- **skywalking-banyandb-helm** (alias: `banyandb`) — BanyanDB, condition: `banyandb.enabled`
39+
40+
## Key Conventions
41+
42+
### Template Helpers (`_helpers.tpl`)
43+
- `skywalking.fullname` — base name for all resources
44+
- `skywalking.oap.fullname` / `skywalking.ui.fullname` / `skywalking.satellite.fullname` — component names
45+
- `skywalking.elasticsearch.fullname` — ECK Elasticsearch resource name (service is `{name}-es-http`)
46+
- `skywalking.containers.wait-for-storage` — init container that waits for the configured storage backend
47+
- `skywalking.oap.envs.storage` — storage-specific environment variables for OAP
48+
49+
### Storage Pattern
50+
Each storage backend (elasticsearch, postgresql, banyandb) follows the same pattern:
51+
- `*.enabled` — deploy the backend as a subchart
52+
- `*.config.*` — connection settings for external instances (when `enabled: false`)
53+
- `_helpers.tpl` handles both embedded and external modes in `wait-for-storage` and `oap.envs.storage`
54+
55+
### ECK Elasticsearch
56+
- ECK auto-generates an auth secret: `{fullname}-es-elastic-user` with key `elastic`
57+
- HTTP TLS is disabled by default (`http.tls.selfSignedCertificate.disabled: true`) for OAP connectivity
58+
- Node topology is configured via `elasticsearch.nodeSets[]` (count, config, podTemplate, volumeClaimTemplates)
59+
60+
## Common Commands
61+
62+
```shell
63+
# Update chart dependencies
64+
helm dep up chart/skywalking
65+
66+
# Template rendering (for validation)
67+
helm template test chart/skywalking \
68+
--set oap.image.tag=10.3.0 \
69+
--set oap.storageType=elasticsearch \
70+
--set ui.image.tag=10.3.0
71+
72+
# Template with external ES (no ECK)
73+
helm template test chart/skywalking \
74+
--set oap.image.tag=10.3.0 \
75+
--set oap.storageType=elasticsearch \
76+
--set ui.image.tag=10.3.0 \
77+
--set elasticsearch.enabled=false \
78+
--set eckOperator.enabled=false
79+
80+
# Package chart
81+
make package
82+
83+
# Clean build artifacts
84+
make clean
85+
```
86+
87+
## Required Values
88+
89+
These must be set explicitly for any deployment:
90+
- `oap.image.tag`
91+
- `oap.storageType` (`elasticsearch`, `postgresql`, or `banyandb`)
92+
- `ui.image.tag`
93+
94+
## E2E Tests
95+
96+
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`.
97+
98+
## Docs to Keep in Sync
99+
100+
When modifying chart configuration, update all of:
101+
1. `chart/skywalking/values.yaml` — default values
102+
2. `chart/skywalking/README.md` — parameter tables
103+
3. `README.md` — install examples and user-facing docs
104+
4. `chart/skywalking/values-my-es.yaml` — external ES example (if ES-related)
105+
5. `test/e2e/values.yaml` — test overrides (if defaults change)
106+
107+
## Git Workflow
108+
109+
- **Do not push directly to master.** Always create a feature branch and open a PR.
110+
- Branch naming example: `upgrade-elasticsearch-eck-8.18.8`
111+
- **Do not add Claude as co-author** in commit messages.
112+
113+
## License
114+
115+
All files must include the Apache 2.0 license header.

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ helm install "${SKYWALKING_RELEASE_NAME}" \
5757
--set oap.image.tag=10.3.0 \
5858
--set oap.storageType=banyandb \
5959
--set ui.image.tag=10.3.0 \
60+
--set eckOperator.enabled=false \
6061
--set elasticsearch.enabled=false \
6162
--set banyandb.enabled=true \
6263
--set banyandb.image.tag=0.9.0
@@ -138,19 +139,22 @@ helm install "${SKYWALKING_RELEASE_NAME}" ${REPO}/skywalking -n "${SKYWALKING_RE
138139
--set ui.image.tag=10.3.0
139140
```
140141

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

147148
```yaml
149+
eckOperator:
150+
enabled: false
151+
148152
elasticsearch:
149-
enabled: true
150-
config: # For users of an existing elasticsearch cluster,takes effect when `elasticsearch.enabled` is false
153+
enabled: false
154+
config:
155+
host: elasticsearch-es-http
151156
port:
152157
http: 9200
153-
host: elasticsearch # es service on kubernetes or host
154158
user: "xxx" # [optional]
155159
password: "xxx" # [optional]
156160
```
@@ -183,7 +187,7 @@ helm install "${SKYWALKING_RELEASE_NAME}" ${REPO}/skywalking -n "${SKYWALKING_RE
183187

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

186-
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).
190+
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).
187191

188192
```shell script
189193
helm install "${SKYWALKING_RELEASE_NAME}" ${REPO}/skywalking -n "${SKYWALKING_RELEASE_NAMESPACE}" \

chart/skywalking/Chart.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,13 @@ maintainers:
3030
email: kezhenxu94@163.com
3131

3232
dependencies:
33-
- name: elasticsearch
34-
version: ~7.17.1
33+
- name: eck-operator
34+
version: 3.3.1
35+
repository: https://helm.elastic.co/
36+
condition: eckOperator.enabled
37+
- name: eck-elasticsearch
38+
alias: elasticsearch
39+
version: 0.18.1
3540
repository: https://helm.elastic.co/
3641
condition: elasticsearch.enabled
3742
- name: postgresql

0 commit comments

Comments
 (0)