Skip to content

Commit

Permalink
Use VolumeClaimTemplate instead of PVC
Browse files Browse the repository at this point in the history
Signed-off-by: vinamra28 <[email protected]>
  • Loading branch information
vinamra28 authored and tekton-robot committed Jul 22, 2020
1 parent 76a1b1c commit a66a0d2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 29 deletions.
20 changes: 7 additions & 13 deletions tekton/release-pipeline-run.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: tektoncd-cli-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 500Mi
---
apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
Expand All @@ -19,8 +8,13 @@ spec:
name: cli-release-pipeline
workspaces:
- name: shared-workspace
persistentvolumeclaim:
claimName: tektoncd-cli-pvc
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 500Mi
params:
- name: revision
value: v0.2.2
Expand Down
23 changes: 7 additions & 16 deletions tekton/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,20 +137,6 @@ kubectl -n ${TARGET_NAMESPACE} apply -f ./tekton/release-pipeline.yml

sleep 2

# Until tkn supports tkn create with parameters we do like this,
cat <<EOF | kubectl -n ${TARGET_NAMESPACE} apply -f-
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: tektoncd-cli-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 500Mi
EOF

# Start the pipeline, We can't use tkn start because until #272 and #262 are imp/fixed
cat <<EOF | kubectl -n ${TARGET_NAMESPACE} create -f-
apiVersion: tekton.dev/v1beta1
Expand All @@ -162,8 +148,13 @@ spec:
name: cli-release-pipeline
workspaces:
- name: shared-workspace
persistentvolumeclaim:
claimName: tektoncd-cli-pvc
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 500Mi
params:
- name: revision
value: ${RELEASE_VERSION}
Expand Down

0 comments on commit a66a0d2

Please sign in to comment.