apiVersion: apps/v1
kind: Deployment
metadata:
  name: flights-api
spec:
  selector:
    matchLabels:
      app: flights-api
  template:
    metadata:
      labels:
        app: flights-api
    spec:
      terminationGracePeriodSeconds: 6
      containers:
        - name: flights-api
          image: flights-api
          ports:
          - containerPort: 8081
            protocol: TCP
          env:
          - name: DATA_SERVICE_URI
            value: http://data-api.svc.cluster.local:8080/
          - name: CACHE_SERVICE_URI
            value: http://cache-api.svc.cluster.local:9090/
          resources:
            requests:
              memory: "512Mi"
              cpu: "200m"
            limits:
              memory: "1024Mi"
              cpu: "1000m"