kind: Secret
apiVersion: v1
metadata:
  name: secret-vol-param-password
stringData:
  ninja: SECRET_PASSWORD
---
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
  name: secret-volume-params
spec:
  taskSpec:
    params:
    - name: SCNAME
      description: Name of secret
      type: string
    steps:
    - image: public.ecr.aws/ubuntu/ubuntu:latest
      script: |
        #!/usr/bin/env bash
        SECRET_PASSWORD=$(cat /var/secret/ninja)
        [[ $SECRET_PASSWORD == SECRET_PASSWORD ]]
      volumeMounts:
      - name: secret-volume
        mountPath: /var/secret
    volumes:
    - name: secret-volume
      secret:
        secretName: "$(params.SCNAME)"
  params:
  - name: SCNAME
    value: secret-vol-param-password
