Skip to content
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

Isolate TaskRun↔Pod translation into a separate package #1519

Closed
imjasonh opened this issue Nov 4, 2019 · 0 comments
Closed

Isolate TaskRun↔Pod translation into a separate package #1519

imjasonh opened this issue Nov 4, 2019 · 0 comments
Assignees
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.

Comments

@imjasonh
Copy link
Member

imjasonh commented Nov 4, 2019

Expected Behavior

TaskRun→Pod and PodStatus→TaskRunStatus translation code should be organized into its own package, ideally with minimal exported symbols.

This would make it easier to test and use in isolation: the TaskRun reconciler would simply be able to call pod.MakePod(taskRun) and create the correct Pod for the TaskRun, without being exposed to any details of what that even entails.

Actual Behavior

MakePod is buried among dozens of exported methods in pkg/reconciler/taskrun/resources, which also contains code for PipelineResources.

TaskRun→Pod translation also includes entrypoint rewriting and copy step injection, which has leaked into taskrun.go.

PodStatus→TaskRunStatus translation is in a separate package, in status.UpdateStatusFromPod, which happens to unnecessarily take a kubeclient.

/assign
/kind cleanup

@imjasonh imjasonh added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Projects
None yet
Development

No branches or pull requests

1 participant