apiVersion: apps/v1
kind: Deployment
metadata:
  name: app-node-js
spec:
  replicas: 1
  selector:
    matchLabels:
      app: app-node-js
  template:
    metadata:
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "3000"
      labels:
        app: app-node-js
    spec:
      containers:
        - name: app-node-js
          image: app-node-js
          imagePullPolicy: IfNotPresent
          ports:
            - name: http
              containerPort: 3000
            - name: debug
              containerPort: 9229

          env:
            - name: PORT
              value: "3000"
            - name: OTEL_EXPORTER_JAEGER_ENDPOINT
              value: http://host.docker.internal:14268/api/traces
              # value: http://jaeger:14268/api/traces

          resources:
            requests:
              cpu: 100m
              memory: 128Mi
            limits:
              cpu: 300m
              memory: 512Mi

          readinessProbe:
            httpGet:
              path: /readyz
              port: 3000
            initialDelaySeconds: 5
            periodSeconds: 10

          livenessProbe:
            httpGet:
              path: /livez
              port: 3000
            initialDelaySeconds: 15
            periodSeconds: 20
