---
apiVersion: v1
kind: Service
metadata:
  labels:
    io.kompose.service: busy
  name: busy
spec:
  ports:
    - name: "8081"
      port: 8081
      targetPort: 8080
    - name: "8026"
      port: 8026
      targetPort: 8025
  selector:
    io.kompose.service: busy

---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    io.kompose.service: busy
  name: busy
spec:
  replicas: 1
  selector:
    matchLabels:
      io.kompose.service: busy
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        io.kompose.service: busy
    spec:
      containers:
        - args:
            - /bin/sh
            - -c
            - cat /auth.txt /users.php /certs/cert1.pem
          image: busybox
          name: busy
          ports:
            - containerPort: 8080
              protocol: TCP
            - containerPort: 8025
              protocol: TCP
          volumeMounts:
            - mountPath: /certs
              name: busy-cm0
            - mountPath: /auth.txt
              name: busy-cm1
              subPath: auth.txt
            - mountPath: /users.php
              name: busy-cm2
              subPath: users.php
              readOnly: true
      restartPolicy: Always
      volumes:
        - configMap:
            name: busy-cm0
          name: busy-cm0
        - configMap:
            items:
              - key: auth.txt
                path: auth.txt
            name: busy-cm1
          name: busy-cm1
        - configMap:
            items:
              - key: users.php
                path: users.php
            name: busy-cm2
          name: busy-cm2

---
apiVersion: v1
data:
  cert1.pem: |
    content of file cert1.pem
kind: ConfigMap
metadata:
  labels:
    io.kompose.service: busy
  name: busy-cm0

---
apiVersion: v1
data:
  auth.txt: |
    content from file auth.txt
kind: ConfigMap
metadata:
  annotations:
    use-subpath: "true"
  labels:
    io.kompose.service: busy
  name: busy-cm1

---
apiVersion: v1
data:
  users.php: |
    content from file users.php
kind: ConfigMap
metadata:
  annotations:
    use-subpath: "true"
  labels:
    io.kompose.service: busy
  name: busy-cm2
