apiVersion: v1
kind: ConfigMap
metadata:
  name: api-deployment-wrapper
  labels:
    mesitis/offering: "api-service"
    mesitis/kind: "deployment"
    mesitis/enabled: "true"
    mesitis/order: "2"
data:
  embedded-resource: |
    {
      "apiVersion": "extensions/v1beta1",
      "kind": "Deployment",
      "metadata": {
        "name": "back-end"
      },
      "spec": {
        "replicas":1,
        "strategy": {
          "type": "Recreate"
        },
      "template": {
        "metadata": {
            "labels": {
              "app": "back-end"
            }            
        },
        "spec":{
            "containers": [
              {
                "name": "service",
                "image": "localhost:5000/jbenton/service:003",
                "resources": {
                  "limits": {
                    "cpu": "100m",
                    "memory": "50Mi"
                  }
                },
                "env": [
                  {
                    "name": "PORT",
                    "value": ":9000"
                  },
                  {
                    "name": "TIME_SERVER",
                    "value": ""
                  }
                ],
                "ports": [
                  {
                    "name": "service",
                    "containerPort": 9000,
                    "hostPort": 9000
                  }
                ],
                "livenessProbe": {
                  "httpGet": {
                    "path": "/",
                    "port": 9000
                  },
                  "initialDelaySeconds": 3,
                  "periodSeconds": 3
                }
              }
            ]
        }
      }
    }
    }
