---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    io.kompose.service: db
  name: db
spec:
  replicas: 1
  selector:
    matchLabels:
      io.kompose.service: db
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        io.kompose.service: db
    spec:
      containers:
        - image: mysql
          name: db
          volumeMounts:
            - mountPath: /data/configs.tar
              name: db-cm0
              subPath: configs.tar
      restartPolicy: Always
      volumes:
        - configMap:
            items:
              - key: configs.tar
                path: configs.tar
            name: db-cm0
          name: db-cm0


---
apiVersion: v1
binaryData:
  configs.tar: SDRzSUFId3pMVjhBQSsxV3pXc1RRUlFmQ3lMdVJRL2lRVkNHVmFsSVBtWm12N0tXRkFvRksxSU1UU29GVjhLWVRHc2tYK3h1WkV1SjlPaS80TkdiWjIrQ2wrSk4vQ3M4OTZ4WFo3K3lTWGFEc1NZcEpmdExabWJmNC9mbXZielpOeThsNm13eFdtZG12dFpwN3pjT0xEQjdJSVEwUllGQTh4Q3RLQUJHQkdKSnd4S1JzS0xKRUJGRVpCVkFadzZ4eE5DemJHcnlVTXl1MVdVbU0ra0Uzdk1uTzVYZDhvYXgyV25SUmh2dVdzd2N5WlgvVStCZ3ZTREFCWGpRcUJleHJoTkZ3YXFHQks3cGVScFoxeVFkUzdJZ0lkaXlHeTFXeElxdWFycFdJQ2lueWhqcC9Lc0w1LzBMVXZ3UGdxclB6OU5IV1AvSC9ObFdQNzF6MTdmZlRuK2hDT1AxajVBQ29ETFBvRUlzZWYySDUxOGE5SUZjdFU1dG1udGpkZG96OHNIem9jcnk1UHNmY1dIMC9JbWt5T245dndoTWMvOFRMZkgreHdVbHZmd3ZPc0w2bjMzVlJ3anIveGdrMy84eWtjZnJIeEgrL3cvTlBKSUVMSG45ZzhzM3I0QVZBTFpwRFQ0cnd6MFl3TldCcTN3UVBuN3l3ZVZMTjZiYmNxTlMyZkdmUEl1dmZPeU5VVllDL1hVQWJ0VTZyUnp0ZHBzczE2U1czYk5ZbmIrSzdHNnBISEIvOExFRndMV0kxNksxSmxlZWttelZKYnkzbjk3M3FYY2Uvbjc5NE9Qai91ZnZINm9uWDA1dW56VXB5NE40LzUvOVBYQ0cvcy9GdFA4dkFtbi9YMjZFOVQrLzd2L1gvbzlsTkY3L1dNVlMydjhYZ1JjQ2hFZUMyL0ZGeHhFZlFZd3lvZVRKN2lwT3BmSWVNKzY4Rmd3SERxWTFMR2RITmQ0MG9nL1VlY2NRTTlEd3RqVDQzdjZUVTNWOFJYL1l0ZWZidDh1dXIzUHF2WndoK2diUXA3c2ZPT1ExTXhYWkR3NW1qRVEyRHpHaVJ6dTdVVTNlUFRtZUFOeldjR0syc1p3RjgzaWdtU1RIM0hpVEhnNmJRY2ZMYldETEpXaTBvLzJQM0xrZitmTHlEWXR3ZGVoMEJoNVh4ODdmZjROODJYMkpQTEgvajV3WUswNmpOYnZSYWROWFRiYk5xTlV6V2VXd3l4S3NTRklBNGxBdUJ0a1hPYVV2dkR6dk1reVJJa1dLaGVNUENNUUc3Z0FjQUFBPQ==
kind: ConfigMap
metadata:
  annotations:
    use-subpath: "true"
  labels:
    io.kompose.service: db
  name: db-cm0

---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    io.kompose.service: web
  name: web
spec:
  replicas: 1
  selector:
    matchLabels:
      io.kompose.service: web
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        io.kompose.service: web
    spec:
      containers:
        - image: nginx
          name: web
          volumeMounts:
            - mountPath: /etc/tls
              name: web-cm0
            - mountPath: /etc/test-a-key.key
              name: web-cm1
              subPath: test-a-key.key
      restartPolicy: Always
      volumes:
        - configMap:
            name: web-cm0
          name: web-cm0
        - configMap:
            items:
              - key: a.key
                path: test-a-key.key
            name: web-cm1
          name: web-cm1

---
apiVersion: v1
data:
  a.crt: test-crt-data...
  a.key: test-key-data....
kind: ConfigMap
metadata:
  labels:
    io.kompose.service: web
  name: web-cm0

---
apiVersion: v1
data:
  a.key: test-key-data....
kind: ConfigMap
metadata:
  annotations:
    use-subpath: "true"
  labels:
    io.kompose.service: web
  name: web-cm1

