apiVersion: apps/v1
kind: Deployment
metadata:
  name: api
spec:
  selector:
    matchLabels:
      app: api
  replicas: 2
  template:
    metadata:
      labels:
        app: api
    spec:
      containers:
        - name: api
          image: localhost:5000/monitoring-api
          ports:
            - containerPort: 80
            - containerPort: 9464
          env:
            #- name: OTEL_COLLECTOR_ENDPOINT
            #  value: otel-collector.otel-collector:55680
            - name: ZIPKIN_COLLECTOR_ENDPOINT
              value: http://otel-collector.otel-collector:9411/api/v2/spans
          readinessProbe:
            httpGet:
              path: /health
              port: 80
            initialDelaySeconds: 3
            periodSeconds: 3
          resources:
            requests:
              memory: "100Mi"
              cpu: "10m"
            limits:
              memory: "200Mi"
              cpu: "50m"
