apiVersion: apps/v1
kind: Deployment
metadata:
  name: lifo-queue
spec:
  selector:
    matchLabels:
      app: lifo-queue
  template:
    metadata:
      labels:
        app: lifo-queue
    spec:
      containers:
      - name: lifo-queue
        image: jerrydevin96/lifo-queue
        ports:
        - containerPort: 8080
        envFrom:
        - configMapRef:
            name: appconfig
            optional: false
        - secretRef:
            name: appsecrets
            optional: false
      - name: lifo-queue-swagger-docs
        image: jerrydevin96/lifo-queue-swagger-docs:1.0.0
        command: ["/bin/sh", "-c"]
        args: ["cd /swagger-client && sed -i 's/input-host/'\"$SWAGGER_HOST\"'/g' swagger.json && cat swagger.json && ./swagger serve --flavor swagger --no-open --port=8083 swagger.json"]
        ports:
        - containerPort: 8083
        envFrom:
        - configMapRef:
            name: appconfig
            optional: false