apiVersion: apps/v1
kind: Deployment
metadata:
  name: deploy-petclinic-webservices
  labels:
    app: webservices

spec:
  template:
    metadata:
      name: pod-petclinic-webservices
      labels:
        app: webservices
    spec:
      containers:
        - name: customers-service
          image: awscicd/spring-petclinic-customers-service
          command: ["./dockerize","-wait=tcp://discovery-server:8761","-timeout=60s","--","java", "-XX:+UnlockExperimentalVMOptions", "-XX:+UseCGroupMemoryLimitForHeap", "-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
          ports:
           - containerPort: 7081

        - name: visits-service
          image: awscicd/spring-petclinic-visits-service
          command: ["./dockerize","-wait=tcp://discovery-server:8761","-timeout=60s","--","java", "-XX:+UnlockExperimentalVMOptions", "-XX:+UseCGroupMemoryLimitForHeap", "-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
          ports:
           - containerPort: 7082

        - name: vets-service
          image: awscicd/spring-petclinic-vets-service
          command: ["./dockerize","-wait=tcp://discovery-server:8761","-timeout=60s","--","java", "-XX:+UnlockExperimentalVMOptions", "-XX:+UseCGroupMemoryLimitForHeap", "-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
          ports:
           - containerPort: 7083

  replicas: 1
  selector:
    matchLabels:
      app: webservices
