Skip to content

Commit 6c2d6e1

Browse files
authored
Merge branch 'master' into headers_encryption
2 parents 38186b6 + 411a697 commit 6c2d6e1

File tree

9 files changed

+981
-16
lines changed

9 files changed

+981
-16
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: setup-helm-tools
19+
description: Install pinned Helm and optionally kind for Helm chart CI jobs
20+
inputs:
21+
install-kind:
22+
description: "Whether to install kind in addition to Helm"
23+
required: false
24+
default: "false"
25+
helm-version:
26+
description: "Helm release version"
27+
required: false
28+
default: "v4.1.3"
29+
helm-checksum:
30+
description: "SHA256 checksum for the Helm tarball"
31+
required: false
32+
default: "02ce9722d541238f81459938b84cf47df2fdf1187493b4bfb2346754d82a4700"
33+
kind-version:
34+
description: "kind release version"
35+
required: false
36+
default: "v0.31.0"
37+
kind-checksum:
38+
description: "SHA256 checksum for the kind binary"
39+
required: false
40+
default: "eb244cbafcc157dff60cf68693c14c9a75c4e6e6fedaf9cd71c58117cb93e3fa"
41+
42+
runs:
43+
using: "composite"
44+
steps:
45+
- name: Verify supported runner
46+
shell: bash
47+
run: |
48+
set -euo pipefail
49+
if [[ "${{ runner.os }}" != "Linux" || "${{ runner.arch }}" != "X64" ]]; then
50+
echo "setup-helm-tools currently supports Linux X64 runners only" >&2
51+
exit 1
52+
fi
53+
54+
- name: Install Helm and optional kind
55+
shell: bash
56+
env:
57+
HELM_VERSION: ${{ inputs.helm-version }}
58+
HELM_CHECKSUM: ${{ inputs.helm-checksum }}
59+
KIND_VERSION: ${{ inputs.kind-version }}
60+
KIND_CHECKSUM: ${{ inputs.kind-checksum }}
61+
run: |
62+
set -euo pipefail
63+
args=()
64+
if [[ "${{ inputs.install-kind }}" == "true" ]]; then
65+
args+=(--install-kind)
66+
fi
67+
scripts/ci/setup-helm-tools.sh "${args[@]}"

.github/config/components.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,11 @@ components:
373373
- "web/**"
374374
tasks: ["lint", "build"]
375375

376+
helm:
377+
paths:
378+
- "helm/**"
379+
tasks: ["validate", "smoke"]
380+
376381
rust-bench-dashboard:
377382
paths:
378383
- "core/bench/dashboard/**"

.github/workflows/_test.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,29 @@ jobs:
192192
npm run build
193193
fi
194194
195+
# Helm chart testing
196+
- name: Setup Helm test tools
197+
if: inputs.component == 'helm' && (inputs.task == 'validate' || inputs.task == 'smoke')
198+
uses: ./.github/actions/utils/setup-helm-tools
199+
with:
200+
install-kind: ${{ inputs.task == 'smoke' }}
201+
202+
- name: Setup Helm smoke cluster
203+
if: inputs.component == 'helm' && inputs.task == 'smoke'
204+
run: scripts/ci/setup-helm-smoke-cluster.sh
205+
206+
- name: Validate Helm chart
207+
if: inputs.component == 'helm' && inputs.task == 'validate'
208+
run: scripts/ci/test-helm.sh validate
209+
210+
- name: Smoke test Helm chart runtime
211+
if: inputs.component == 'helm' && inputs.task == 'smoke'
212+
run: scripts/ci/test-helm.sh smoke --cleanup
213+
214+
- name: Collect Helm smoke diagnostics
215+
if: failure() && inputs.component == 'helm' && inputs.task == 'smoke'
216+
run: scripts/ci/test-helm.sh collect-smoke-diagnostics
217+
195218
# CI workflow validation
196219
- name: Validate CI workflows
197220
if: inputs.component == 'ci-workflows' && inputs.task == 'validate'

helm/charts/iggy/README.md

Lines changed: 78 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ helm uninstall iggy
8989
| `server.enabled` | bool | `true` | Enable the Iggy server deployment |
9090
| `server.replicaCount` | int | `1` | Number of server replicas |
9191
| `server.image.repository` | string | `"apache/iggy"` | Server image repository |
92-
| `server.image.tag` | string | `""` | Server image tag (defaults to chart appVersion) |
92+
| `server.image.tag` | string | `"0.7.0"` | Server image tag |
9393
| `server.ports.http` | int | `3000` | HTTP API port |
9494
| `server.ports.tcp` | int | `8090` | TCP protocol port |
9595
| `server.ports.quic` | int | `8080` | QUIC protocol port |
@@ -135,6 +135,83 @@ helm uninstall iggy
135135
| `ui.securityContext` | object | `{}` | UI container security context |
136136
| `ui.podSecurityContext` | object | `{}` | UI pod security context |
137137

138+
## Testing
139+
140+
The chart CI paths are also available locally from the repository root.
141+
142+
### Render Validation
143+
144+
If `helm` is already installed locally:
145+
146+
```bash
147+
scripts/ci/test-helm.sh validate
148+
```
149+
150+
If you want the pinned Linux CI tool version instead:
151+
152+
```bash
153+
scripts/ci/setup-helm-tools.sh
154+
scripts/ci/test-helm.sh validate
155+
```
156+
157+
This runs `helm lint --strict` plus the CI render scenarios, including:
158+
159+
* default chart output
160+
* all-features render
161+
* legacy Kubernetes 1.18 API coverage
162+
* server-only render
163+
* UI-only render
164+
* existing-secret render
165+
166+
### Runtime Smoke Test
167+
168+
The smoke path requires `helm`, `kind`, `kubectl`, and `curl`.
169+
170+
Before running the local smoke path, keep these common gotchas in mind:
171+
172+
* the Iggy server requires working `io_uring` support from the Kubernetes node/kernel/runtime
173+
* the server also needs enough available memory and locked-memory headroom during startup
174+
* `scripts/ci/test-helm.sh cleanup-smoke` removes the Helm release and smoke namespace, but it does not delete the reusable kind cluster created by `scripts/ci/setup-helm-smoke-cluster.sh`
175+
176+
If `helm` and `kind` are already installed:
177+
178+
```bash
179+
scripts/ci/setup-helm-smoke-cluster.sh
180+
scripts/ci/test-helm.sh smoke --cleanup
181+
```
182+
183+
If you want the pinned Linux CI tool versions:
184+
185+
```bash
186+
scripts/ci/setup-helm-tools.sh --install-kind
187+
scripts/ci/setup-helm-smoke-cluster.sh
188+
scripts/ci/test-helm.sh smoke --cleanup
189+
```
190+
191+
If a previous local smoke install failed and left resources behind, reset the smoke namespace with:
192+
193+
```bash
194+
scripts/ci/test-helm.sh cleanup-smoke
195+
```
196+
197+
On Apple Silicon hosts, the released `apache/iggy:0.7.0` `arm64` image may still fail during the runtime smoke path in kind. If your Docker setup supports amd64 emulation well enough, you can try recreating the dedicated smoke cluster with:
198+
199+
```bash
200+
HELM_SMOKE_KIND_PLATFORM=linux/amd64 scripts/ci/setup-helm-smoke-cluster.sh
201+
```
202+
203+
The smoke script defaults `IGGY_SYSTEM_SHARDING_CPU_ALLOCATION=1` for the server pod so the local kind path avoids the chart's `numa:auto` default and keeps the local runtime to a single shard, which has been more reliable on containerized local nodes. If you need a different local override, set `HELM_SMOKE_SERVER_CPU_ALLOCATION` before running `scripts/ci/test-helm.sh smoke`. Pass `--cleanup` to remove the smoke namespace after a successful run; omit it if you want to inspect the deployed resources.
204+
205+
On smoke-test failures you can collect the same diagnostics as CI with:
206+
207+
```bash
208+
scripts/ci/test-helm.sh collect-smoke-diagnostics
209+
```
210+
211+
> **Note:** `scripts/ci/setup-helm-tools.sh` currently supports Linux `x86_64` only.
212+
> On other local platforms, install equivalent `helm` and `kind` binaries yourself and then use the same scripts above.
213+
> The runtime smoke test may still fail on some local/containerized clusters if the node/kernel does not provide the `io_uring` support required by the server runtime even after the local sharding override, or if the local environment does not provide enough memory for the server to initialize cleanly.
214+
138215
## Troubleshooting
139216

140217
### Pod CrashLoopBackOff with "Out of memory" error

helm/charts/iggy/templates/hpa.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
18-
{{ if .Values.autoscaling.enabled }}
19-
{{- if .Capabilities.APIVersions.Has "autoscaling/v2" -}}
17+
{{ if .Values.autoscaling.enabled -}}
18+
{{- if semverCompare ">=1.23-0" .Capabilities.KubeVersion.GitVersion -}}
2019
apiVersion: autoscaling/v2
2120
{{- else -}}
2221
apiVersion: autoscaling/v2beta2
@@ -38,24 +37,24 @@ spec:
3837
- type: Resource
3938
resource:
4039
name: cpu
41-
{{- if .Capabilities.APIVersions.Has "autoscaling/v2" }}
40+
{{- if semverCompare ">=1.23-0" .Capabilities.KubeVersion.GitVersion }}
4241
target:
4342
type: Utilization
4443
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
4544
{{- else }}
46-
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
45+
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
4746
{{- end }}
4847
{{- end }}
4948
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
5049
- type: Resource
5150
resource:
5251
name: memory
53-
{{- if .Capabilities.APIVersions.Has "autoscaling/v2" }}
52+
{{- if semverCompare ">=1.23-0" .Capabilities.KubeVersion.GitVersion }}
5453
target:
5554
type: Utilization
5655
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
5756
{{- else }}
58-
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
57+
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
5958
{{- end }}
6059
{{- end }}
6160
{{- end }}

helm/charts/iggy/templates/ingress.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
18-
1917
{{ if .Values.server.ingress.enabled -}}
2018
{{ $fullName := include "iggy.fullname" . -}}
2119
{{ $svcPort := .Values.server.service.port -}}
@@ -24,11 +22,11 @@
2422
{{- $_ := set .Values.server.ingress.annotations "kubernetes.io/ingress.class" .Values.server.ingress.className}}
2523
{{- end }}
2624
{{- end }}
27-
{{ if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
25+
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
2826
apiVersion: networking.k8s.io/v1
29-
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }}
27+
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
3028
apiVersion: networking.k8s.io/v1beta1
31-
{{- else }}
29+
{{- else -}}
3230
apiVersion: extensions/v1beta1
3331
{{- end }}
3432
kind: Ingress
@@ -77,8 +75,6 @@ spec:
7775
{{- end }}
7876
{{- end }}
7977
{{- end }}
80-
81-
8278
{{ if .Values.ui.ingress.enabled -}}
8379
---
8480
{{ $fullName := include "iggy.fullname" . -}}
@@ -97,7 +93,7 @@ apiVersion: extensions/v1beta1
9793
{{- end }}
9894
kind: Ingress
9995
metadata:
100-
name: {{ $fullName }}
96+
name: {{ $fullName }}-ui
10197
labels:
10298
{{- include "iggy.labels" . | nindent 4 }}
10399
{{- with .Values.ui.ingress.annotations }}

0 commit comments

Comments
 (0)