hetznercloud / hcloud-cloud-controller-manager

Kubernetes cloud-controller-manager for Hetzner Cloud
Apache License 2.0
740 stars 118 forks source link

fix: invalid characters in label instance-type of robot servers #770

Closed lukasmetzner closed 3 weeks ago

lukasmetzner commented 3 weeks ago

Invalid characters like should be removed when generating the instance-type label for Robot servers.

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 70.75%. Comparing base (e6c0356) to head (6e9fb48). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #770 +/- ## ========================================== + Coverage 70.73% 70.75% +0.01% ========================================== Files 31 31 Lines 3188 3190 +2 ========================================== + Hits 2255 2257 +2 Misses 760 760 Partials 173 173 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

lukasmetzner commented 3 weeks ago

Syntax and character set

The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.

There are some additional cases we do not cover yet like:

Should we do something specific about them, e.g trim label, trim characters and beginning or end? @apricote

apricote commented 3 weeks ago

Looking at the list of previous models I do not think we run into any problems with length or non-alphanumeric characters for now: https://docs.hetzner.com/robot/dedicated-server/general-information/root-server-hardware#hardware-configuration