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

Allow the customization of the storage class for the PVC of pipelines #1148

Merged
merged 1 commit into from
Aug 5, 2019

Conversation

Fabian-K
Copy link
Contributor

@Fabian-K Fabian-K commented Aug 2, 2019

Changes

This commit enables to use storage classes other than the cluster-wide default storage class for the PVC of pipelines. The customization can be defined in the config map config-artifact-pvc.yaml - similar to how the size of the PVC can already be defined. By default, it will fallback to the cluster-wide default storage class. fixes #1101

Submitter Checklist

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

See the contribution guide for more details.

Release Notes

Allow the definition of a storage class for the artifact pvc using the ConfigMap `config-artifact-pvc`

This commit enables to use storage classes other than the cluster-wide default storage class for the PVC of pipelines. The customization can be defined in the config map config-artifact-pvc.yaml - similar to how the size of the PVC can already be defined. By default, it will fallback to the cluster-wide default storage class. fixes tektoncd#1101
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 2, 2019
@Fabian-K
Copy link
Contributor Author

Fabian-K commented Aug 2, 2019

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit and removed cla: no labels Aug 2, 2019
Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

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

Thank you for this.
This functionality might go away, but unless we manage to remove before next release, I think it's worth getting this in, as it will help folks running Tekton on clouds where a non-default storageClass is important.

pvcSpec := GetPVCSpec(pr, pvcSize)
var pvcStorageClassName *string
if pvcStorageClassNameStr == "" {
pvcStorageClassName = nil
Copy link
Member

Choose a reason for hiding this comment

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

Since this goes to nil if it's not defined, it will work fine on existing (or new) clusters that do not include the storageClass in the config map.

@afrittoli
Copy link
Member

/ok-to-test

@tekton-robot tekton-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 2, 2019
@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/artifacts/artifacts_storage.go 79.5% 80.9% 1.4

@afrittoli
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 2, 2019
Copy link
Collaborator

@bobcatfish bobcatfish left a comment

Choose a reason for hiding this comment

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

My only feedback is that I'd like the install docs to include a bit more info on how to configure this - I don't know much about storage classes myself so I'd be a bit lost in knowing what kind of values I can use! I don't want to block the PR on that tho so @Fabian-K if you are able to add that to the install docs in a follow up PR that would be awesome 🙏 but no worries if not! Thanks for updating the install docs anyway :D

Like @afrittoli said this functionality will likely be going away - but we also need to make sure that #1087 (which will replace this in the long run!) uses this same configuration!

/approve
/meow space

@@ -109,6 +109,7 @@ The PVC option can be configured using a ConfigMap with the name
`config-artifact-pvc` and the following attributes:

- size: the size of the volume (5Gi by default)
- storageClassName: the storage class of the volume (default storage class by default)
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe link to some docs here on what kind of values can be used?

@tekton-robot
Copy link
Collaborator

@bobcatfish: cat image

In response to this:

My only feedback is that I'd like the install docs to include a bit more info on how to configure this - I don't know much about storage classes myself so I'd be a bit lost in knowing what kind of values I can use! I don't want to block the PR on that tho so @Fabian-K if you are able to add that to the install docs in a follow up PR that would be awesome 🙏 but no worries if not! Thanks for updating the install docs anyway :D

Like @afrittoli said this functionality will likely be going away - but we also need to make sure that #1087 (which will replace this in the long run!) uses this same configuration!

/approve
/meow space

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: bobcatfish, Fabian-K

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 5, 2019
@tekton-robot tekton-robot merged commit 33ea1a0 into tektoncd:master Aug 5, 2019
Fabian-K added a commit to Fabian-K/pipeline that referenced this pull request Aug 6, 2019
…of pipelines

This commit adds a link to the k8s documentation for storage classes as a follow up for tektoncd#1148.
tekton-robot pushed a commit that referenced this pull request Aug 6, 2019
…of pipelines

This commit adds a link to the k8s documentation for storage classes as a follow up for #1148.
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configure storage class for PVC of PipelineRuns
5 participants