apiVersion: apps/v1
kind: ReplicaSet
metadata:
  name: rs-petclinic-servers
  labels:
    app: mng-servers

spec:
  template:
    metadata:
      name: pod-petclinic-servers
      labels:
        app: mng-servers
    spec:
      containers:
        - name: discovery-server
          image: awscicd/spring-petclinic-discovery-server
          command: ["./dockerize","-wait=tcp://config-server:8888","-timeout=60s","--","java", "-XX:+UnlockExperimentalVMOptions", "-XX:+UseCGroupMemoryLimitForHeap", "-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]

        - name: config-server
          image: awscicd/spring-petclinic-config-server

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

  replicas: 2
  selector:
    matchLabels:
      app: mng-servers

