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 Secret volume source support to workspaces #1801

Merged
merged 1 commit into from Jan 16, 2020
Merged

Add Secret volume source support to workspaces #1801

merged 1 commit into from Jan 16, 2020

Conversation

ghost
Copy link

@ghost ghost commented Jan 3, 2020

Changes

Fixes #1438

The final of the original feature requests related to workspaces
was to include support for Secrets as the source of a volume mounted
into Task containers.

This PR introduces support for Secrets as workspaces in a TaskRun
definition.

Submitter Checklist

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

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

Secrets can now be used for the contents of task workspaces. Users can now more easily declare and expose a secret as a volume for tasks to use in their step containers.

@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 3, 2020
@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label Jan 3, 2020
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 3, 2020
@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/workspace/apply.go 94.1% 94.7% 0.6

@ghost ghost requested a review from bobcatfish January 3, 2020 16:44
@ghost
Copy link
Author

ghost commented Jan 14, 2020

Rebased on top of v1alpha2 changes. Not ready for review until #1800 changes go in.

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1alpha2/workspace_validation.go 100.0% 90.0% -10.0
pkg/workspace/apply.go 94.1% 94.7% 0.6

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/workspace/apply.go 94.1% 94.7% 0.6

@ghost ghost changed the title WIP Add Secret volume source support to workspaces Add Secret volume source support to workspaces Jan 14, 2020
@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 Jan 14, 2020
@@ -24,5 +24,4 @@ import (
type WorkspaceDeclaration = v1alpha2.WorkspaceDeclaration

// WorkspaceBinding maps a Task's declared workspace to a Volume.
// Currently we only support PersistentVolumeClaims, EmptyDir and ConfigMap.
Copy link
Author

Choose a reason for hiding this comment

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

Removed as suggested in #1800 (comment)

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/workspace/apply.go 94.3% 94.7% 0.5

@@ -77,6 +85,30 @@ func TestWorkspaceBindingValidateInvalid(t *testing.T) {
ClaimName: "pool-party",
},
},
}, {
name: "Provided both emptydir and configmap",
Copy link
Author

Choose a reason for hiding this comment

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

Added in response to #1800 (comment)

We could write a thing that tests every permutation but I'm not super compelled to do so with this PR.

Fixes #1438

The final of the original feature requests related to workspaces
was to include support for Secrets as the source of a volume mounted
into Task containers.

This PR introduces support for Secrets as workspaces in a TaskRun
definition.
@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/workspace/apply.go 94.3% 94.7% 0.5

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/workspace/apply.go 94.3% 94.7% 0.5

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.

looking good :)

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

@dibyom dibyom left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 16, 2020
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dibyom, 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 merged commit 19a23d7 into tektoncd:master Jan 16, 2020
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. cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for a "volume resource"-like Task.spec field
4 participants