-
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
v0.13.0: FailedCreate Pod affinity-assistant: must be no more than 63 characters #2766
Comments
/kind bug |
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 removes the prefix (affinity-assistant-), so that users can use up to 53 chars for Workspace Name and PipelineRun Name. 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
@r0bj Thanks for reporting this! It appears as the new version is more sensitive to long names for Workspaces+PipelineRuns, because of the introduction of an "Affinity Assistant" that is a In your example
I would recommend to remove |
@jlpettersson thanks! |
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
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
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
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 #2766
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
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 #2766
Expected Behavior
Pod affinity-assistant is created successfully.
Actual Behavior
Pod affinity-assistant fail to create so the whole pipelinerun fail.
Steps to Reproduce the Problem
TriggerBinding
:build-images-75hz8
build-images-build-images-workspace-build-images-75hz8
Additional Info
The text was updated successfully, but these errors were encountered: