Skip to content

Commit bc90267

Browse files
committed
Allow configuration of PVC size from ConfigMap
PVCs are hardcoded to 5Gi and that should be configurable. For instance Alibaba Container Service does not allow volumes smaller than 20Gi Add a `config-artifact-pvc` ConfigMap that can be used to store such configuration Signed-off-by: Carlos Sanchez <carlos@apache.org>
1 parent c7c7385 commit bc90267

File tree

6 files changed

+206
-85
lines changed

6 files changed

+206
-85
lines changed

config/config-artifact-pvc.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright 2018 The Knative Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
apiVersion: v1
16+
kind: ConfigMap
17+
metadata:
18+
name: config-artifact-pvc
19+
namespace: tekton-pipelines
20+
data:
21+
# size of the PVC volume
22+
# size: 5Gi
23+

docs/install.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,13 @@ Pipelines need a way to share resources between tasks. The alternatives are a
104104
[Persistent volume](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)
105105
or a [GCS storage bucket](https://cloud.google.com/storage/)
106106

107-
The PVC option does not require any configuration, but the GCS storage bucket
108-
can be configured using a ConfigMap with the name `config-artifact-bucket` with
107+
The PVC option can be configured using a ConfigMap with the name
108+
`config-artifact-pvc` and the following attributes:
109+
110+
- size: the size of the volume (5Gi by default)
111+
112+
The GCS storage bucket can be configured
113+
using a ConfigMap with the name `config-artifact-bucket` with
109114
the following attributes:
110115

111116
- location: the address of the bucket (for example gs://mybucket)

pkg/apis/pipeline/v1alpha1/artifact_pvc.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ var (
3333
// ArtifactPVC represents the pvc created by the pipelinerun
3434
// for artifacts temporary storage
3535
type ArtifactPVC struct {
36-
Name string
36+
Name string
37+
PersistentVolumeClaim *corev1.PersistentVolumeClaim
3738
}
3839

3940
// GetType returns the type of the artifact storage

pkg/apis/pipeline/v1alpha1/zz_generated.deepcopy.go

Lines changed: 24 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)