-
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
Add ConfigMap volume source support to workspaces #1800
Conversation
The following is the coverage report on pkg/.
|
The following is the coverage report on pkg/.
|
The following is the coverage report on pkg/.
|
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.
SGTM
/cc @skaegi
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 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 |
Rebased on top of v1alpha2 changes. This is ready for review. |
The following is the coverage report on pkg/.
|
One of the original feature requests for workspaces was to include support for ConfigMaps as the contents of a volume mounted into Task containers. This PR introduces support for ConfigMaps as workspaces in a TaskRun definition.
The following is the coverage report on pkg/.
|
The following is the coverage report on pkg/.
|
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 wonderful!!! 😍 I had one small thought about unit tests for invalid configuration but it's super minor and I'm happy to go ahead without it :D
configmap: | ||
name: my-configmap | ||
``` | ||
|
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.
🎉
name: my-configmap | ||
data: | ||
message: hello world | ||
--- |
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.
🎉
@@ -24,5 +24,5 @@ import ( | |||
type WorkspaceDeclaration = v1alpha2.WorkspaceDeclaration | |||
|
|||
// WorkspaceBinding maps a Task's declared workspace to a Volume. | |||
// Currently we only support PersistentVolumeClaims and EmptyDir. | |||
// Currently we only support PersistentVolumeClaims, EmptyDir and ConfigMap. |
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.
I wonder if we'd be better off removing this comment so we don't have it fall out of date later 🤔
"workspace.persistentvolumeclaim", | ||
"workspace.emptydir", | ||
"workspace.configmap", | ||
} |
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.
🎉
// For a ConfigMap to work, you must provide the name of the ConfigMap to use. | ||
if b.ConfigMap != nil && b.ConfigMap.LocalObjectReference.Name == "" { | ||
return apis.ErrMissingField("workspace.configmap.name") | ||
} |
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.
should we have a unit test that tries to set a configmap + something else?
that's quickly starting to balloon out of control unit test permutation wise - i wonder if we can isolate the logic for determining this somehow such that the tests wont need to be updated with every permutation 🤔
/lgtm We can always tackle that invalid case unit test thing later |
Changes
One of the original feature requests for workspaces was to include
support for ConfigMaps as the contents of a volume mounted into
Task containers.
This PR introduces support for ConfigMaps as workspaces in a TaskRun
definition.
This PR contributes to #1438
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