Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[controller] Limit the length of label values for BlockDevice resources to 63 symbols #107

Merged
merged 2 commits into from
Dec 5, 2024

Conversation

AleksZimin
Copy link
Member

@AleksZimin AleksZimin commented Dec 5, 2024

Description

This PR limits the length of label values for BlockDevice resources to 63 symbols. If a label value exceeds this limit, it is truncated to comply with Kubernetes restrictions, as Kubernetes does not allow label values longer than 63 characters.

Why do we need it, and what problem does it solve?

Kubernetes enforces a strict 63-character limit for label values. Without this change, BlockDevice resources with label values exceeding this limit could cause errors during resource creation or updates. By truncating values, this fix ensures compliance and prevents such errors.

What is the expected result?

  • Label values for BlockDevice resources are truncated to 63 characters if they exceed the limit.
  • Successful creation and management of BlockDevice resources, even when original label values are longer than 63 characters.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Signed-off-by: Aleksandr Zimin <alexandr.zimin@flant.com>
Signed-off-by: Alexandr Stefurishin <alexandr.stefurishin@flant.com>
@AleksZimin AleksZimin changed the title [controller] Fix label length for BlockDevice [controller] Limit the length of label values for BlockDevice resources to 63 symbols Dec 5, 2024
@AleksZimin AleksZimin self-assigned this Dec 5, 2024
@AleksZimin AleksZimin added the bug Something isn't working label Dec 5, 2024
@AleksZimin AleksZimin marked this pull request as ready for review December 5, 2024 22:28
@AleksZimin AleksZimin merged commit 5627280 into main Dec 5, 2024
8 of 10 checks passed
@AleksZimin AleksZimin deleted the fix-label-value-length branch December 5, 2024 22:28
astef pushed a commit that referenced this pull request Feb 13, 2025
…rces to 63 symbols (#107)

Signed-off-by: Aleksandr Zimin <alexandr.zimin@flant.com>
Signed-off-by: Alexandr Stefurishin <alexandr.stefurishin@flant.com>
Co-authored-by: Alexandr Stefurishin <alexandr.stefurishin@flant.com>
Signed-off-by: Aleksandr Stefurishin <aleksandr.stefurishin@flant.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants