-
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
Remove extra log PVC #443
Remove extra log PVC #443
Conversation
[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 |
🤔 /test pull-knative-build-pipeline-integration-tests |
Looks like something is wrong with the cluster setup :S gonna have to ping @adrcunha and folks once we're back in regular working hours. |
/test pull-knative-build-pipeline-integration-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me, this has no conflict with the work I'm doing to refactor the pvc used to share artifacts between tasks
/test pull-knative-build-pipeline-integration-tests |
1 similar comment
/test pull-knative-build-pipeline-integration-tests |
/lgtm |
/retest |
2 similar comments
/retest |
/retest |
@bobcatfish this PR just needs to resolve conflicts and would be good to get merged |
b4e7baa
to
31ccf56
Compare
what have i done |
31ccf56
to
f357829
Compare
docs/using.md
Outdated
overwritten with a custom binary. The plan is to use this custom binary for | ||
controlling the execution of step containers ([#224](https://github.com/knative/build-pipeline/issues/224)) and log streaming | ||
[#107](https://github.com/knative/build-pipeline/issues/107), though currently | ||
it will write logs only to an [`emptyDir`]() (which cannot be read from after |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops 😅
We noticed early on that logs from init containers are often cleaned up immediately by k8s, particularly if the containers are short running (e.g. just echoing "hello world"). We started down a path to correct that, which takes an approach based on Prow's entrypoint solution (https://github.com/kubernetes/test-infra/tree/master/prow/cmd/entrypoint) (even using the same image at the moment!) which wraps the user's provided command and streams logs to a volume, from which the logs can be uploaded/streamed by a sidecar. Since we are using init containers for step execution, we can't yet use sidecars, but we are addressing that in tektoncd#224 (also an entrypoint re-writing based solution). Once we have that, we can sidecar support, starting with GCS as a POC (#107) and moving into other types. In the meantime, to enable us to get logs (particularly in tests), we had the taskrun controller create a PVC on the fly to hold logs. This has two problems: * The PVCs are not cleaned up so this is an unexpected side effect for users * Combined with PVC based input + ouput linking, this causes scheduling problems for the resulting pods (tektoncd#375) Now that we want to have an official release, this would be a bad state to release in, so we will remove this magical log PVC creation logic, which was never our intended end state anyway. Since we _do_ need the entrypoint rewriting and log interception logic in the long run, this commit leaves most functionality intact, removing only the PVC creation and changing the volume being used to an `emptyDir`, which is what we will likely use for #107 (and this is how Prow handles this as well). This means the released functionality will be streaming logs to a location where nothing can read them, however I think it is better than completely removing the functionality b/c: 1. We need the functionality in the long run 2. Users should be prepared for this functionality (e.g. dealing with edge cases around the taskrun controller being able to fetch an image's entrypoint) Fixes tektoncd#387
f357829
to
1fd6c16
Compare
The following is the coverage report on pkg/.
|
/lgtm |
Verifying the pipelinerun example worked was disabled due to the combo of tektoncd#375 and tektoncd#443, but now that we've removed the extra log PVC in tektoncd#443 we shouldn't run into this issue anymore :D
Verifying the pipelinerun example worked was disabled due to the combo of tektoncd#375 and tektoncd#443, but now that we've removed the extra log PVC in tektoncd#443 we shouldn't run into this issue anymore :D
We noticed early on that logs from init containers are often cleaned up
immediately by k8s, particularly if the containers are short running
(e.g. just echoing "hello world"). We started down a path to correct
that, which takes an approach based on Prow's entrypoint solution
(https://github.com/kubernetes/test-infra/tree/master/prow/cmd/entrypoint)
(even using the same image at the moment!) which wraps the user's
provided command and streams logs to a volume, from which the logs can
be uploaded/streamed by a sidecar.
Since we are using init containers for step execution, we can't yet use
sidecars, but we are addressing that in #224 (also an entrypoint
re-writing based solution). Once we have that, we can sidecar support,
starting with GCS as a POC (#107) and moving into other types.
In the meantime, to enable us to get logs (particularly in tests), we
had the taskrun controller create a PVC on the fly to hold logs. This
has two problems:
users
problems for the resulting pods (TestPipelineRun/fan-in_and_fan-out is broken #375)
Now that we want to have an official release, this would be a bad state
to release in, so we will remove this magical log PVC creation logic,
which was never our intended end state anyway.
Since we do need the entrypoint rewriting and log interception logic
in the long run, this commit leaves most functionality intact, removing
only the PVC creation and changing the volume being used to an
emptyDir
, which is what we will likely use for #107 (and this is howProw handles this as well). This means the released functionality will
be streaming logs to a location where nothing can read them, however I
think it is better than completely removing the functionality b/c:
edge cases around the taskrun controller being able to fetch an
image's entrypoint)
Fixes #387
(@pivotal-nader-ziada I think you said you've been refactoring the PVC logic a bunch, so if this conflicts with your changes plz just ignore it, and I'll deal with any rebasing later after you've merged!)