hanahmily opened a new pull request, #67:
URL: https://github.com/apache/skywalking-banyandb-helm/pull/67
## Summary
Adds a comprehensive name-length validation layer that fails at `helm
install/upgrade` time before Kubernetes ever sees the resources.
## Problem
Long Helm release names cause StatefulSet pod labels to exceed the 63-byte
Kubernetes limit. The StatefulSet controller appends a
`controller-revision-hash` label in the form
`<statefulset-name>-<10-char-hash>`, so StatefulSet names must be <= 52 bytes.
Example failure from a real deployment:
```
metadata.labels: Invalid value:
"dr-test-2-prod-observability-manage-banyandb-data-hot-84bf98695d": must be no
more than 63 bytes
```
## Changes
- Added `banyandb.validateNameLength` and `banyandb.validateNames` helpers
in `chart/templates/_helpers.tpl`.
- `banyandb.validateNames` checks all generated resource names:
- `fullname` itself (<= 63)
- Standalone StatefulSet (<= 52)
- Liaison StatefulSet and headless service
- Data StatefulSet and headless service for every configured role
- Auth Secret, UI Deployment, FODC proxy Deployment and services
- Invoked the validation helper from every resource template.
- Updated the `fullnameOverride` comment in `values.yaml` to document the
constraint.
## Verification
- `helm lint chart/ --set image.tag=0.6.0` passes.
- Long release name now fails early with a clear message:
```
Data StatefulSet name for role 'hot'
'dr-test-2-prod-observability-manage-banyandb-data-hot'
is 53 characters long, which exceeds the 52-byte Kubernetes limit.
Shorten the Helm release name 'dr-test-2-prod-observability-manage' or set
a shorter fullnameOverride.
```
- Short release name or `fullnameOverride` renders successfully.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]