-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
PR into 0.13.x: StatefulSet is sensitive to long names - use hashed name #2794
PR into 0.13.x: StatefulSet is sensitive to long names - use hashed name #2794
Conversation
This PR cannot be merged: expecting exactly one kind/ label Available
|
The following is the coverage report on the affected files.
|
Names in Kubernetes can be up to 253 chars, but labels can only be up to 63 chars. We are relatively conservative with the two labels we introduce for the Affinity Assistant app.kubernetes.io/component: affinity-assistant app.kubernetes.io/instance: ws-parallel-pipelinerun-bbx6w But apparently, StatefulSets adds a label with the full StatefulSet Name + 10 chars (for a hash) as a label controller-revision-hash: affinity-assistant-ws-parallel-pipelinerun-bbx6w-dd64c6c8d This only leave users to use StatefulSet Names up to 53 chars. We use a prefix of 19 chars (affinity-assistant-) on the Affinity Assistant StatefulSet. This leaves Tekton users with only 34 chars for a combination of Workspace Name and the PipelineRun Name. This commit use a hash of the Workspace Name and the PipelineRun Name to make sure that the name is not too long. Typical labels after this commit will be: labels: app.kubernetes.io/component: affinity-assistant app.kubernetes.io/instance: affinity-assistant-e067465fc0 controller-revision-hash: affinity-assistant-e067465fc0-b78cb9478 statefulset.kubernetes.io/pod-name: affinity-assistant-e067465fc0-0 tekton.dev/pipeline: parallel-pipeline tekton.dev/pipelineRun: parallel-pipelinerun-wr9wd Also the unnecessary name of the PVC in the volumeClaimTemplate-example is removed. This limitation of StatefulSet is apparently a known problem kubernetes/kubernetes#64023 but I was not aware of it. /kind bug Fixes tektoncd#2766
2aecd8c
to
fc79022
Compare
I just rebased + force pushed to your branch @jlpettersson , should resolve the error the tests were running into :D 🤞 |
The following is the coverage report on the affected files.
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bobcatfish The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Changes
This PR is identical to #2768 - before that one is rebased.
Both has commit id
2aecd8cbd9c050d033198b4f19d3172355b33213
- until the other one is rebased.