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
2 changes: 1 addition & 1 deletion deploy/helm/openshell/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Common labels
helm.sh/chart: {{ include "openshell.chart" . }}
{{ include "openshell.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/version: {{ .Chart.AppVersion | replace "+" "_" | trunc 63 | trimAll "-_." | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
Expand Down
126 changes: 126 additions & 0 deletions deploy/helm/openshell/tests/version_labels_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

suite: app version labels
templates:
- templates/statefulset.yaml
- templates/service.yaml
- templates/certgen.yaml
- templates/gateway-config.yaml
chart:
appVersion: 0.1.9+build.1
set:
agentSandbox.preflight.enabled: false

tests:
- it: normalizes build metadata on gateway workload
template: templates/statefulset.yaml
asserts:
- equal:
path: metadata.labels["app.kubernetes.io/version"]
value: 0.1.9_build.1

- it: normalizes build metadata on gateway Service
template: templates/service.yaml
asserts:
- equal:
path: metadata.labels["app.kubernetes.io/version"]
value: 0.1.9_build.1

- it: normalizes build metadata on certgen hook resources
template: templates/certgen.yaml
asserts:
- equal:
path: metadata.labels["app.kubernetes.io/version"]
value: 0.1.9_build.1

- it: preserves version 0.1.9
template: templates/statefulset.yaml
chart:
appVersion: 0.1.9
asserts:
- equal:
path: metadata.labels["app.kubernetes.io/version"]
value: 0.1.9

- it: preserves version 0.1.9-rc.1
template: templates/statefulset.yaml
chart:
appVersion: 0.1.9-rc.1
asserts:
- equal:
path: metadata.labels["app.kubernetes.io/version"]
value: 0.1.9-rc.1

- it: trims trailing hyphens after truncation
template: templates/statefulset.yaml
chart:
appVersion: 0.1.9+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-tail
asserts:
- equal:
path: metadata.labels["app.kubernetes.io/version"]
value: 0.1.9_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- matchRegex:
path: metadata.labels["app.kubernetes.io/version"]
pattern: '^[A-Za-z0-9]([-A-Za-z0-9_.]{0,61}[A-Za-z0-9])?$'

- it: trims trailing underscores after truncation
template: templates/statefulset.yaml
chart:
appVersion: 0.1.9-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa+tail
asserts:
- equal:
path: metadata.labels["app.kubernetes.io/version"]
value: 0.1.9-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- matchRegex:
path: metadata.labels["app.kubernetes.io/version"]
pattern: '^[A-Za-z0-9]([-A-Za-z0-9_.]{0,61}[A-Za-z0-9])?$'

- it: trims trailing dots after truncation
template: templates/statefulset.yaml
chart:
appVersion: 0.1.9+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.tail
asserts:
- equal:
path: metadata.labels["app.kubernetes.io/version"]
value: 0.1.9_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- matchRegex:
path: metadata.labels["app.kubernetes.io/version"]
pattern: '^[A-Za-z0-9]([-A-Za-z0-9_.]{0,61}[A-Za-z0-9])?$'

- it: preserves an explicit gateway tag with build metadata in appVersion
template: templates/statefulset.yaml
set:
gateway.image.tag: release-test
asserts:
- equal:
path: spec.template.spec.containers[0].image
value: ghcr.io/nvidia/openshell/gateway:release-test

- it: preserves digest precedence over a gateway tag for the workload
template: templates/statefulset.yaml
set:
gateway.image.tag: release-test
gateway.image.digest: sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
asserts:
- equal:
path: spec.template.spec.containers[0].image
value: ghcr.io/nvidia/openshell/gateway@sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

- it: preserves digest precedence over a gateway tag for the certgen Job
template: templates/certgen.yaml
documentIndex: 3
set:
gateway.image.tag: release-test
gateway.image.digest: sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
asserts:
- equal:
path: spec.template.spec.containers[0].image
value: ghcr.io/nvidia/openshell/gateway@sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

- it: leaves the appVersion image fallback unchanged
template: templates/statefulset.yaml
asserts:
- equal:
path: spec.template.spec.containers[0].image
value: ghcr.io/nvidia/openshell/gateway:0.1.9+build.1
8 changes: 7 additions & 1 deletion skills/debug-openshell-cluster/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,13 @@ the release. Look for failed installs, unexpected values, missing namespace, wro
image tag, TLS settings that do not match the registered endpoint, and
scheduling failures.

If Kubernetes rejects `app.kubernetes.io/version` on a resource or certgen hook,
inspect the rendered label and chart app version. Charts normalize SemVer build
metadata for labels (`0.1.9+build.1` becomes `0.1.9_build.1`) without changing
the app version or image references. Upgrade older charts that emit `+` in
labels; use explicit image tags or digests when the app version is not a valid
container image tag.

When checking a Helm values migration, compare the rendered `gateway.toml`
with the intended `gatewayConfig` tables. Explicit resource-admission settings
and the Kubernetes Secrets credential namespace take precedence over deprecated
Expand Down Expand Up @@ -1750,7 +1757,6 @@ Shared serving leases last at most fifteen seconds from issuance, independently
of configuration renewal; include membership failure detection when measuring a
partition's stale-owner interval. Storage failures prevent renewal.


Application ingress consumers call the separate `openshell.v1.ServiceDiscovery`
service, rather than `OpenShell`. Discovery snapshots share a one-second cache
per workspace (16 cached workspaces, four concurrent collections). The gateway
Expand Down
Loading