Skip to content

Conversation

@wavesoft
Copy link

@wavesoft wavesoft commented Mar 6, 2020

Apparently this is an implicit limitation on the maximum length of network labels, enforced by the k8s apimachinery library that various CNI plugins use for their API abstraction.

The maximum allowed length is 63 characters. Therefore, in order for us to be able to maximize the amount of information preserved, I am proposing the following solution for long labels:

MD5(<label>)[0:7] + "~" + <label>[sizeof(<label>)-53:]

For example:

/teams/backend-services/database-service/deployments/development/tag-1.12-dev

Becomes:

df1d656~database-service/deployments/development/tag-1.12-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants