Repository navigation
Tags
Tags
Add pipeline run support for cloud events Replace the pipeline run controller own config store with the shared one used by the taskrun controller too. The pipeline run config store is only useful to the artifact storage, however the artifact storage loads the config by fetching the configmap via the kube client, so it does not use the config store. Attaching the shared config store to the controller, along with the cloud events client, enables the pipeline run controller to start sending cloud events for all events where we send k8s events today (except for error ones). Add a reconciler unit test to verify that events are sent when the sink is configured. Drop reconciler/pipelinerun/config because it's not used. It was injected in the pipeline run controller before, but not used. We can add the store for artifact configs back in a different commit, but it wil have to be part of the shared store. (cherry picked from commit e6c91d2) Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Revert "Remove creds-init intContainer" This reverts commit bbb767c. In tektoncd#2671 I removed the creds-init initContainer from Task Pods so that credentials could be used by containers running with non-root users. The intention was for this change to be free of any side-effects to end-users. Unfortunately a [backwards incompatible issue](tektoncd#2951) has cropped up with this change: When a user does not specify the `known_hosts` field in a creds-init Secret, the credential code will perform an `ssh-keyscan` of the remote server to get its public key. The problem is that previously we could guarantee `ssh-keyscan` was available since the code ran in our own creds-init container with our own docker image. Since we've now moved that code into Steps' entrypoint the Steps container is required to provide `ssh-keyscan`. This is a change in container contract and therefore backwards-incompatible. In this PR I've reverted the creds-init change for the 0.14 branch rather than attempt to fix the `ssh-keyscan` issue and possibly introduce more problems. Before 0.15 I'd like to get a better backwards-compatible fix organized. So I plan to leave the creds-init change in place in the `master` branch for the time being.
cloudevent: make sure we enter the channel before… … returning. This effectively 8000 wait for the goroutine to be schedule before getting out of `SendCloudEventWithRetries`. That way we are sure the "sending cloud event" goroutine is scheduled. This doesn't wait for `ceClient.Send` to execute, just making sure we got in the goroutine. This should fix flaky tests observed during release pipeline runs. Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
Remove tag+digest on shell-image 🍶 Some runtime (cri-o) do not support tag+digest notation on image reference. Removing this on shell-image to fix the `notags` release yamls. Signed-off-by: Vincent Demeester <vdemeest@redhat.com> (cherry picked from commit a6830f7)
StatefulSet is sensitive to long names - use hashed name
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
Add variable substitution for PVC name There may be use cases when a Task should initiate a PipelineRun or TaskRun. It can be beneficial to use the **same PVC** in the PipelineRun or TaskRun that is initiated, e.g. populated with cached data or a cloned git repository. When using a workspace with a PersistentVolumeClaim as volume source, the name of the PVC is known, and can be passed as a _param_ in the PipelineRun or TaskRun. But when a VolumeClaimTemplate is used as a volume source, the name is generated. In such use cases, it is useful to be able to "look up" the PVC name using variable substitution. Fixes tektoncd#2505
Fix PipelineTask timeout not correctly set 💦 Those were missing during in the conversion code. This means any Pipeline that defines timeout per tasks ends up with the default one instead of the one set by the user. Signed-off-by: Vincent Demeester <vdemeest@redhat.com> (cherry picked from commit 44656a9)
PreviousNext