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

Add Default TaskRun Workspace Bindings to config-default #2930

Merged
merged 1 commit into from
Jul 28, 2020

Conversation

jerop
Copy link
Member

@jerop jerop commented Jul 10, 2020

Changes

Currently, users have to completely specify Workspaces they don't care
about or whose configuration should be entirely in the hands of admins.

This PR enables users to specify default Workspaces for TaskRuns,
for example they can use emptyDir by default.

The WorkspaceBinding can be set in the config-defaults ConfigMap
in default-task-run-workspace-binding.

Fixes #2398 and partially fixes #2595.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Includes docs (if user facing)
  • Commit messages follow commit message best practices
  • Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.

Double check this list of stuff that's easy to miss:

Reviewer Notes

If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.

Release Notes

Users can now set a default `Workspace` configuration for any `Workspaces` that a Task declares but that a TaskRun does not explicitly provide. It can be set in the `config-defaults` ConfigMap in `default-task-run-workspace-binding`.

/cc sbwsg

@tekton-robot tekton-robot requested a review from a user July 10, 2020 16:16
@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 10, 2020
@jerop jerop force-pushed the default-workspace-bindings branch from 3bb9075 to 7b54c26 Compare July 10, 2020 16:29
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! It also tackles the TaskRun portion of #2595

pkg/reconciler/taskrun/taskrun.go Outdated Show resolved Hide resolved
@jerop jerop force-pushed the default-workspace-bindings branch 3 times, most recently from b18a0f6 to 594e525 Compare July 10, 2020 18:14
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/taskrun/taskrun.go 76.5% 78.3% 1.8

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/taskrun/taskrun.go 76.5% 78.3% 1.8

@jerop jerop force-pushed the default-workspace-bindings branch from 594e525 to fd7ad67 Compare July 10, 2020 18:29
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/taskrun/taskrun.go 76.5% 78.3% 1.8

@jerop jerop force-pushed the default-workspace-bindings branch from fd7ad67 to a934169 Compare July 10, 2020 18:40
@jerop
Copy link
Member Author

jerop commented Jul 10, 2020

/kind feature

@tekton-robot tekton-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 10, 2020
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/taskrun/taskrun.go 76.5% 78.3% 1.8

@jerop jerop force-pushed the default-workspace-bindings branch from a934169 to 36a7704 Compare July 10, 2020 18:49
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/taskrun/taskrun.go 76.5% 78.3% 1.8

@jerop jerop force-pushed the default-workspace-bindings branch from 36a7704 to fa5e84d Compare July 10, 2020 19:31
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/taskrun/taskrun.go 76.5% 77.1% 0.6

@jerop jerop force-pushed the default-workspace-bindings branch from fa5e84d to 17d37ce Compare July 10, 2020 19:39
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/taskrun/taskrun.go 76.5% 76.3% -0.2

@jerop jerop force-pushed the default-workspace-bindings branch from 17d37ce to 68e2a90 Compare July 10, 2020 19:53
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/taskrun/taskrun.go 76.5% 76.3% -0.2

@jerop jerop marked this pull request as ready for review July 10, 2020 19:58
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 10, 2020
@jerop jerop force-pushed the default-workspace-bindings branch from 68e2a90 to a884ebb Compare July 10, 2020 20:40
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/taskrun/taskrun.go 76.5% 76.3% -0.2

@jerop jerop force-pushed the default-workspace-bindings branch from 160091d to 1950cbf Compare July 10, 2020 21:08
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/taskrun/taskrun.go 76.5% 77.6% 1.1

@jerop jerop force-pushed the default-workspace-bindings branch 2 times, most recently from afaafae to 8ceca9b Compare July 10, 2020 21:21
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/taskrun/taskrun.go 76.5% 77.6% 1.1

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/taskrun/taskrun.go 76.5% 77.6% 1.1

@jerop
Copy link
Member Author

jerop commented Jul 10, 2020

/test pull-tekton-pipeline-build-tests

@tekton-robot tekton-robot requested a review from afrittoli July 13, 2020 09:00
@ghost
Copy link

ghost commented Jul 13, 2020

I've reviewed the test changes and they look good to me! I'm going to hold off on approving or lgtming the PR since I helped write a bit of it, would be good to get others' 👁️ on it for feedback.

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 20, 2020
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/meow

@tekton-robot
Copy link
Collaborator

@vdemeester: cat image

In response to this:

/meow

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbwsg, vdemeester

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 24, 2020
@tekton-robot
Copy link
Collaborator

@jerop: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jerop jerop force-pushed the default-workspace-bindings branch from 8ceca9b to 845a4b4 Compare July 28, 2020 15:58
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/taskrun/taskrun.go 77.3% 78.3% 1.0

Currently, users have to completely specify `Workspaces` they don't care
about or whose configuration should be entirely in the hands of admins.

This PR enables users to specify default `Workspaces` for `TaskRuns`,
for example they can use `emptyDir` by default.

The `WorkspaceBinding` can be set in the `config-defaults` ConfigMap
in `default-task-run-workspace-binding`.

Fixes tektoncd#2398 and partially fixes tektoncd#2595.
@jerop jerop force-pushed the default-workspace-bindings branch from 845a4b4 to acd42c6 Compare July 28, 2020 16:08
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/taskrun/taskrun.go 77.3% 78.3% 1.0

@ghost
Copy link

ghost commented Jul 28, 2020

Given that there have been two approvals now I'm going to lgtm it as well.

@ghost
Copy link

ghost commented Jul 28, 2020

/lgtm

@tekton-robot tekton-robot assigned ghost Jul 28, 2020
@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 28, 2020
@ghost ghost removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 28, 2020
@tekton-robot tekton-robot merged commit 116fadd into tektoncd:master Jul 28, 2020
@jerop jerop deleted the default-workspace-bindings branch September 30, 2020 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
4 participants