You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pod name can exceed Kubernetes 63-character limit when adding suffixes
The current implementation of _parse_app_name_and_id doesn't account for suffixes that are added after the initial name generation (like "-driver" for pod names). This can lead to pod names exceeding Kubernetes' 63-character limit.
Current Behavior
_parse_app_name_and_id truncates names to fit within 63 characters
However, suffixes like "-driver" are added later when creating pod specs
This can result in final pod names exceeding the 63-character limit
The method will truncate considering these, but when "-driver" or othere suffixes e.g "-exec-0" is added later for the pod name, it can exceed 63 characters.
Proposed Solution
Modify _parse_app_name_and_id to reserve space for known suffixes:
RESERVED_LENGTH=7# Length for "-driver" or other suffixesMAX_LENGTH=63-RESERVED_LENGTH# Calculate maximum length considering both suffix and reserved lengthmax_base_length=MAX_LENGTH-len(app_id_suffix_str)
The text was updated successfully, but these errors were encountered:
Pod name can exceed Kubernetes 63-character limit when adding suffixes
The current implementation of
_parse_app_name_and_id
doesn't account for suffixes that are added after the initial name generation (like "-driver" for pod names). This can lead to pod names exceeding Kubernetes' 63-character limit.Current Behavior
_parse_app_name_and_id
truncates names to fit within 63 charactersExample
If we have:
The method will truncate considering these, but when "-driver" or othere suffixes e.g "-exec-0" is added later for the pod name, it can exceed 63 characters.
Proposed Solution
Modify
_parse_app_name_and_id
to reserve space for known suffixes:The text was updated successfully, but these errors were encountered: