Commit b282d0a2 authored by Sergio Gimenez's avatar Sergio Gimenez
Browse files

fix(kubernetes): give helm releases a name Kubernetes accepts

The adapter used the deployment unit ref as the release name. Charts name
their Services after the release, and a Service name must be a DNS-1035
label: lowercase, starting with a letter. SRM passes instance UUIDs (about
10 in 16 start with a digit) and instance names with '_', so those installs
failed with a Service "... is invalid" that the logs reported only as
helm_command_failed.

release_name() lowercases the ref, turns anything but letters, digits and
'-' into '-', puts "r-" in front when it doesn't start with a letter, and
keeps to helm's 53 characters. A ref that is already valid keeps its name,
and terminate, update and status follow the external id activate returns,
so existing releases are unaffected. helm's "is invalid" errors now log as
invalid_kubernetes_object.

Co-Authored-By: default avatarClaude Opus 5.5 <noreply@anthropic.com>
parent 1c4dcfa2
Loading
Loading
Loading
Loading