Слияние кода завершено, страница обновится автоматически
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-pvc
spec:
resources:
requests:
storage: 5Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
---
apiVersion: v1
kind: ConfigMap
metadata:
name: my-configmap
data:
message: hello world
---
apiVersion: v1
kind: Secret
metadata:
name: my-secret
type: Opaque
stringData:
username: user
data:
message: aGVsbG8gc2VjcmV0
---
apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
generateName: custom-volume-
spec:
workspaces:
- name: custom
persistentVolumeClaim:
claimName: my-pvc
subPath: my-subdir
- name: custom2
persistentVolumeClaim:
claimName: my-pvc
- name: custom3
emptyDir: {}
subPath: testing
- name: custom4
configMap:
name: my-configmap
items:
- key: message
path: my-message.txt
- name: custom5
secret:
secretName: my-secret
taskSpec:
steps:
- name: write
image: mirror.gcr.io/ubuntu
script: echo $(workspaces.custom.volume) > $(workspaces.custom.path)/foo
- name: read
image: mirror.gcr.io/ubuntu
script: cat $(workspaces.custom.path)/foo | grep $(workspaces.custom.volume)
- name: write2
image: mirror.gcr.io/ubuntu
script: echo $(workspaces.custom2.path) > $(workspaces.custom2.path)/foo
- name: read2
image: mirror.gcr.io/ubuntu
script: cat $(workspaces.custom2.path)/foo | grep $(workspaces.custom2.path)
- name: write3
image: mirror.gcr.io/ubuntu
script: echo $(workspaces.custom3.path) > $(workspaces.custom3.path)/foo
- name: read3
image: mirror.gcr.io/ubuntu
script: cat $(workspaces.custom3.path)/foo | grep $(workspaces.custom3.path)
- name: readconfigmap
image: mirror.gcr.io/ubuntu
script: cat $(workspaces.custom4.path)/my-message.txt | grep "hello world"
- name: readsecret
image: mirror.gcr.io/ubuntu
script: |
#!/usr/bin/env bash
set -xe
cat $(workspaces.custom5.path)/username | grep "user"
cat $(workspaces.custom5.path)/message | grep "hello secret"
workspaces:
- name: custom
- name: custom2
mountPath: /foo/bar/baz
- name: custom3
- name: custom4
mountPath: /baz/bar/quux
- name: custom5
mountPath: /my/secret/volume
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )