apiVersion: v1
kind: ReplicationController
metadata:
  name: angularfrontend-rc
spec:
  replicas: 2
  selector:
    app: angularfrontend
  template: 
    metadata:
      labels:
        app: angularfrontend
        tier: frontend
    spec:
      containers:
      - name: angularfrontend
        image: dynatrace/easytravel-angular-frontend
        env:
        - name: CATALINA_OPTS
          value: "-agentpath:/srv/dynatrace/agent/lib64/libdtagent.so=name=angularfrontend_easyTravelKube,collector=localhost:9998"
        - name: ET_BACKEND_URL
          value: "http://backend:8080"
        ports:
        - containerPort: 8080
        - containerPort: 8280
        volumeMounts:
        - name: dynatrace-volume
          mountPath: /srv/dynatrace
      - name: dtagent
        image: dynatrace/agent
        volumeMounts:
        - name: dynatrace-volume
          mountPath: /srv/dynatrace
        lifecycle:
          postStart:
            exec:
              command: ["cp", "-R", "/dynatrace", "/srv"]
      - name: dtcollector
        image: dynatrace/collector
        env:
        - name: DT_COLLECTOR_SERVER
          value: "acmeco.dynatracesaas.com:6698"
        ports:
        - containerPort: 9998
      volumes:
      - name: dynatrace-volume
        emptyDir: {}