apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
  generateName: custom-volume-
  annotations:
    chains.tekton.dev/signed: 'true'
    pipeline.tekton.dev/release: e1c7828
  resourceVersion: '76521'
  name: custom-volume-gvg55
  uid: 2238c46d-04e9-40a6-9a89-cd5ca4b8e268
  creationTimestamp: '2024-02-13T19:00:24Z'
  generation: 1
  managedFields:
    - apiVersion: tekton.dev/v1
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:generateName': {}
        'f:spec':
          .: {}
          'f:params': {}
          'f:taskSpec':
            .: {}
            'f:steps': {}
            'f:workspaces': {}
          'f:workspaces': {}
      manager: kubectl-create
      operation: Update
      time: '2024-02-13T19:00:24Z'
    - apiVersion: tekton.dev/v1
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:annotations':
            .: {}
            'f:pipeline.tekton.dev/release': {}
      manager: openshift-pipelines-controller
      operation: Update
      time: '2024-02-13T19:00:24Z'
    - apiVersion: tekton.dev/v1
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:annotations':
            'f:chains.tekton.dev/signed': {}
          'f:finalizers':
            .: {}
            'v:"chains.tekton.dev"': {}
      manager: openshift-pipelines-chains-controller
      operation: Update
      time: '2024-02-13T19:00:39Z'
    - apiVersion: tekton.dev/v1
      fieldsType: FieldsV1
      fieldsV1:
        'f:status':
          .: {}
          'f:completionTime': {}
          'f:conditions': {}
          'f:podName': {}
          'f:provenance':
            .: {}
            'f:featureFlags':
              'f:ScopeWhenExpressionsToTask': {}
              'f:SetSecurityContext': {}
              'f:DisableCredsInit': {}
              'f:DisableAffinityAssistant': {}
              'f:EnableKeepPodOnCancel': {}
              'f:VerificationNoMatchPolicy': {}
              'f:RunningInEnvWithInjectedSidecars': {}
              'f:EnableCELInWhenExpression': {}
              'f:EnableTektonOCIBundles': {}
              .: {}
              'f:MaxResultSize': {}
              'f:AwaitSidecarReadiness': {}
              'f:EnableProvenanceInStatus': {}
              'f:EnableParamEnum': {}
              'f:Coschedule': {}
              'f:ResultExtractionMethod': {}
              'f:EnableStepActions': {}
              'f:EnableAPIFields': {}
              'f:RequireGitSSHSecretKnownHosts': {}
              'f:EnforceNonfalsifiability': {}
              'f:SendCloudEventsForRuns': {}
          'f:startTime': {}
          'f:steps': {}
          'f:taskSpec':
            .: {}
            'f:steps': {}
            'f:workspaces': {}
      manager: openshift-pipelines-controller
      operation: Update
      subresource: status
      time: '2024-02-13T19:00:39Z'
  namespace: test
  finalizers:
    - chains.tekton.dev
  labels:
    app.kubernetes.io/managed-by: tekton-pipelines
spec:
  params:
    - name: name
      value: my
    - name: path
      value: testing
  serviceAccountName: pipeline
  taskSpec:
    steps:
      - computeResources: {}
        image: ubuntu
        name: write
        script: echo $(workspaces.custom.volume) > $(workspaces.custom.path)/foo
      - computeResources: {}
        image: ubuntu
        name: read
        script: cat $(workspaces.custom.path)/foo | grep $(workspaces.custom.volume)
      - computeResources: {}
        image: ubuntu
        name: write2
        script: echo $(workspaces.custom2.path) > $(workspaces.custom2.path)/foo
      - computeResources: {}
        image: ubuntu
        name: read2
        script: cat $(workspaces.custom2.path)/foo | grep $(workspaces.custom2.path)
      - computeResources: {}
        image: ubuntu
        name: write3
        script: echo $(workspaces.custom3.path) > $(workspaces.custom3.path)/foo
      - computeResources: {}
        image: ubuntu
        name: read3
        script: cat $(workspaces.custom3.path)/foo | grep $(workspaces.custom3.path)
      - computeResources: {}
        image: ubuntu
        name: readconfigmap
        script: cat $(workspaces.custom4.path)/$(params.name)-message.txt | grep "hello world"
      - computeResources: {}
        image: ubuntu
        name: readsecret
        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
      - mountPath: /foo/bar/baz
        name: custom2
      - name: custom3
      - mountPath: /baz/bar/quux
        name: custom4
      - mountPath: /my/secret/volume
        name: custom5
  timeout: 1h0m0s
  workspaces:
    - name: custom
      persistentVolumeClaim:
        claimName: $(params.name)-pvc
      subPath: $(params.name)-subdir
    - name: custom2
      persistentVolumeClaim:
        claimName: $(params.name)-pvc
    - emptyDir: {}
      name: custom3
      subPath: $(params.path)
    - configMap:
        items:
          - key: message
            path: my-message.txt
        name: $(params.name)-configmap
      name: custom4
    - name: custom5
      secret:
        secretName: $(params.name)-secret
status:
  completionTime: '2024-02-13T19:00:39Z'
  conditions:
    - lastTransitionTime: '2024-02-13T19:00:39Z'
      message: All Steps have completed executing
      reason: Succeeded
      status: 'True'
      type: Succeeded
  podName: custom-volume-gvg55-pod
  provenance:
    featureFlags:
      MaxResultSize: 4096
      AwaitSidecarReadiness: true
      Coschedule: workspaces
      ResultExtractionMethod: termination-message
      EnableParamEnum: false
      SendCloudEventsForRuns: false
      EnforceNonfalsifiability: none
      ScopeWhenExpressionsToTask: false
      SetSecurityContext: false
      DisableCredsInit: false
      DisableAffinityAssistant: true
      EnableStepActions: false
      EnableAPIFields: beta
      RequireGitSSHSecretKnownHosts: false
      RunningInEnvWithInjectedSidecars: true
      EnableKeepPodOnCancel: false
      EnableTektonOCIBundles: false
      VerificationNoMatchPolicy: ignore
      EnableProvenanceInStatus: true
      EnableCELInWhenExpression: false
  startTime: '2024-02-13T19:00:24Z'
  steps:
    - container: step-write
      imageID: 'docker.io/library/ubuntu@sha256:bcc511d82482900604524a8e8d64bf4c53b2461868dac55f4d04d660e61983cb'
      name: write
      terminated:
        containerID: 'cri-o://2435807ef819a4fdf60f3b4b425291418a333e0bbb72b6aab36083dc4543681f'
        exitCode: 0
        finishedAt: '2024-02-13T19:00:36Z'
        reason: Completed
        startedAt: '2024-02-13T19:00:36Z'
    - container: step-read
      imageID: 'docker.io/library/ubuntu@sha256:bcc511d82482900604524a8e8d64bf4c53b2461868dac55f4d04d660e61983cb'
      name: read
      terminated:
        containerID: 'cri-o://a244b224dedc651c9fd654019ba6e4cfa16da137f7e521fefb7110c1cb50d828'
        exitCode: 0
        finishedAt: '2024-02-13T19:00:36Z'
        reason: Completed
        startedAt: '2024-02-13T19:00:36Z'
    - container: step-write2
      imageID: 'docker.io/library/ubuntu@sha256:bcc511d82482900604524a8e8d64bf4c53b2461868dac55f4d04d660e61983cb'
      name: write2
      terminated:
        containerID: 'cri-o://deffb8e99511a6cd2fb0f97184833fbe8330bd7aa6209451c5d7e6fd557c6865'
        exitCode: 0
        finishedAt: '2024-02-13T19:00:37Z'
        reason: Completed
        startedAt: '2024-02-13T19:00:37Z'
    - container: step-read2
      imageID: 'docker.io/library/ubuntu@sha256:bcc511d82482900604524a8e8d64bf4c53b2461868dac55f4d04d660e61983cb'
      name: read2
      terminated:
        containerID: 'cri-o://4fa38cdc0347172be4547769441c7ec300354a84cb1f8e1cb864fae6809b90ab'
        exitCode: 0
        finishedAt: '2024-02-13T19:00:37Z'
        reason: Completed
        startedAt: '2024-02-13T19:00:37Z'
    - container: step-write3
      imageID: 'docker.io/library/ubuntu@sha256:bcc511d82482900604524a8e8d64bf4c53b2461868dac55f4d04d660e61983cb'
      name: write3
      terminated:
        containerID: 'cri-o://cc46c6e3edd3ec5e1e134144b460d112bd04a85b52d6f31200c183f674b64087'
        exitCode: 0
        finishedAt: '2024-02-13T19:00:37Z'
        reason: Completed
        startedAt: '2024-02-13T19:00:37Z'
    - container: step-read3
      imageID: 'docker.io/library/ubuntu@sha256:bcc511d82482900604524a8e8d64bf4c53b2461868dac55f4d04d660e61983cb'
      name: read3
      terminated:
        containerID: 'cri-o://11c2228b5ca845cea0734fff670a4f1f57cbc49fb3b13b38a1d4c3f03016253f'
        exitCode: 0
        finishedAt: '2024-02-13T19:00:38Z'
        reason: Completed
        startedAt: '2024-02-13T19:00:38Z'
    - container: step-readconfigmap
      imageID: 'docker.io/library/ubuntu@sha256:bcc511d82482900604524a8e8d64bf4c53b2461868dac55f4d04d660e61983cb'
      name: readconfigmap
      terminated:
        containerID: 'cri-o://d8931ed980346656b865b96fde51ec11a43c4c32b0fdbd0453168fcd5421efaf'
        exitCode: 0
        finishedAt: '2024-02-13T19:00:38Z'
        reason: Completed
        startedAt: '2024-02-13T19:00:38Z'
    - container: step-readsecret
      imageID: 'docker.io/library/ubuntu@sha256:bcc511d82482900604524a8e8d64bf4c53b2461868dac55f4d04d660e61983cb'
      name: readsecret
      terminated:
        containerID: 'cri-o://2de195ba9bcc60a68eefde478266605f198846c3451c493d18bcc2bab98d3da0'
        exitCode: 0
        finishedAt: '2024-02-13T19:00:38Z'
        reason: Completed
        startedAt: '2024-02-13T19:00:38Z'
  taskSpec:
    steps:
      - computeResources: {}
        image: ubuntu
        name: write
        script: echo ws-fvlw8 > /workspace/custom/foo
      - computeResources: {}
        image: ubuntu
        name: read
        script: cat /workspace/custom/foo | grep ws-fvlw8
      - computeResources: {}
        image: ubuntu
        name: write2
        script: echo /foo/bar/baz > /foo/bar/baz/foo
      - computeResources: {}
        image: ubuntu
        name: read2
        script: cat /foo/bar/baz/foo | grep /foo/bar/baz
      - computeResources: {}
        image: ubuntu
        name: write3
        script: echo /workspace/custom3 > /workspace/custom3/foo
      - computeResources: {}
        image: ubuntu
        name: read3
        script: cat /workspace/custom3/foo | grep /workspace/custom3
      - computeResources: {}
        image: ubuntu
        name: readconfigmap
        script: cat /baz/bar/quux/my-message.txt | grep "hello world"
      - computeResources: {}
        image: ubuntu
        name: readsecret
        script: |
          #!/usr/bin/env bash
          set -xe
          cat /my/secret/volume/username | grep "user"
          cat /my/secret/volume/message | grep "hello secret"
    workspaces:
      - name: custom
      - mountPath: /foo/bar/baz
        name: custom2
      - name: custom3
      - mountPath: /baz/bar/quux
        name: custom4
      - mountPath: /my/secret/volume
        name: custom5
