Skip to content

Conversation

@fra98
Copy link
Member

@fra98 fra98 commented Aug 27, 2025

Description

Fix #3093

As part of reflecting K8s pods, Liqo creates a new secret that holds the service account token from the consumer cluster. This secret has a particular label with the key "virtualkubelet.liqo.io/service-account-for-pod-name" and value of the original pod name. This causes an issue when the pod name is longer than 63 characters, where the resulting k8s secret cannot be created due to kubernetes limitations on max lenght of label values.

This artificially limits the size of pod names that can be reflected by Liqo to 63 instead of the 253 characters, which is allowed by Kubernetes.

This PR fixes the issue by changing how the secret is forged. Instead of relying on labels, the key is moved to annotations, which do NOT present any limitations on value length.

@adamjensenbot
Copy link
Collaborator

Hi @fra98. Thanks for your PR!

I am @adamjensenbot.
You can interact with me issuing a slash command in the first line of a comment.
Currently, I understand the following commands:

  • /rebase: Rebase this PR onto the master branch (You can add the option test=true to launch the tests
    when the rebase operation is completed)
  • /merge: Merge this PR into the master branch
  • /build Build Liqo components
  • /test Launch the E2E and Unit tests
  • /hold, /unhold Add/remove the hold label to prevent merging with /merge

Make sure this PR appears in the liqo changelog, adding one of the following labels:

  • feat: 🚀 New Feature
  • fix: 🐛 Bug Fix
  • refactor: 🧹 Code Refactoring
  • docs: 📝 Documentation
  • style: 💄 Code Style
  • perf: 🐎 Performance Improvement
  • test: ✅ Tests
  • chore: 🚚 Dependencies Management
  • build: 📦 Builds Management
  • ci: 👷 CI/CD
  • revert: ⏪ Reverts Previous Changes

@github-actions github-actions bot added the fix Fixes a bug in the codebase. label Aug 27, 2025
@fra98 fra98 changed the title [Virtual-kubelet] allow scheduling pods with name > 63 chars [virtual-kubelet] allow scheduling pods with name > 63 chars Aug 27, 2025
@fra98 fra98 changed the title [virtual-kubelet] allow scheduling pods with name > 63 chars [virtual-kubelet] Allow scheduling pods with name > 63 chars Aug 27, 2025
@fra98
Copy link
Member Author

fra98 commented Aug 29, 2025

/test

@fra98 fra98 marked this pull request as ready for review August 29, 2025 16:24
@fra98
Copy link
Member Author

fra98 commented Sep 8, 2025

/rebase test=true

@adamjensenbot adamjensenbot force-pushed the frt/reflect-pod-long-name branch from 19da77e to 4d59ae7 Compare September 8, 2025 15:19
@aleoli
Copy link
Member

aleoli commented Sep 10, 2025

/test

@claudiolor
Copy link
Contributor

/merge

@adamjensenbot adamjensenbot added the merge-requested Request bot merging (automatically managed) label Sep 12, 2025
@adamjensenbot adamjensenbot merged commit b0734d0 into liqotech:master Sep 12, 2025
14 checks passed
@adamjensenbot adamjensenbot removed the merge-requested Request bot merging (automatically managed) label Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Fixes a bug in the codebase. size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pod Name Used as K8s Label Value Causing Service Account Reflection Issues

4 participants