apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: myubuntu-all
  name: myubuntu-all
spec:
  replicas: 1
  selector:
    matchLabels:
      app: myubuntu-all
  template:
    metadata:
      annotations:
        admission.trusted.identity/inject: "true"
        tsi.secrets: |
             - tsi.secret/name: "mysecret1"
               tsi.secret/constraints: "region,cluster-name,namespace,images"
               tsi.secret/local-path: "mysecrets/myubuntu"
             - tsi.secret/name: "mysecret2.json"
               tsi.secret/constraints: "region,images"
               tsi.secret/local-path: "mysecrets/"
             - tsi.secret/name: "mysecret3"
               tsi.secret/constraints: "region,cluster-name,namespace"
               tsi.secret/local-path: "mysecrets/myubuntu"
             - tsi.secret/name: "mysecret4"
               tsi.secret/constraints: "region"
               tsi.secret/local-path: "mysecrets"
             - tsi.secret/name: "password"
               tsi.secret/constraints: "region"
               tsi.secret/local-path: "mysecrets"
             - tsi.secret/name: "invalid"
               tsi.secret/constraints: "region"
               tsi.secret/local-path: "mysecretsx"
             - tsi.secret/name: "non-existing"
               tsi.secret/constraints: "regionx"
               tsi.secret/local-path: "mysecrets"
      labels:
        app: myubuntu-all
      name: myubuntu-all
    spec:
      containers:
        - name: myubuntu-all
          image: ubuntu@sha256:250cc6f3f3ffc5cdaa9d8f4946ac79821aafb4d3afc93928f0de9336eba21aa4
          imagePullPolicy: Always
          command: [ "/bin/bash", "-c", "--" ]
          args: [ "while true; do cat /mydata; sleep 5; done;" ]
