apiVersion: apps/v1
kind: Deployment
metadata:
  name: lti-app
spec:
  replicas: 2
  selector:
    matchLabels:
      app: lti-app
  template:
    metadata:
      labels:
        app: lti-app
    spec:
      restartPolicy: Always
      containers:
      - name: lti-app
        image: itbacep/lti-app
        ports:
        - containerPort: 8000
        resources: 
          requests:
            cpu: "100m"
            memory: "512Mi"
          limits:
            cpu: "300m"
            memory: "1Gi"
        env:
        - name: eureka.client.serviceUrl.defaultZone
          value: http://service-registry-0.service-registry:8761/eureka/,http://service-registry-1.service-registry:8761/eureka/
        - name: SPRING_PROFILES_ACTIVE
          value: prod
        - name: SPRING_ZIPKIN_BASEURL
          value: http://zipkin:9411/
        - name: LTIAPP_EXAMTAKINGURLTEMPLATE
          value: "https://cep.bellotapps.com/student-login?exam-id=${exam-id}&access-token=${access-token}&refresh-token=${refresh-token}&token-id=${token-id}"