---
apiVersion: batch/v1
kind: Job
metadata:
  name: otlp-load-generator
  namespace: otel-samples
  labels:
    app: opentelemetry
    component: otlp-load-generator
spec:
  template:
    spec:
      containers:
        - image: otlp-load-generator:latest   # Local image built and tagged according to instructions
          imagePullPolicy: Never              # Force kubernetes to use local image
          name: otlp-load-generator
          env:
          - name: HOST_IP
            valueFrom:
              fieldRef:
                fieldPath: status.hostIP
          - name: OTLP_HOST
            value: "http://$(HOST_IP):4317" # Send traffic to agent running on same host
      restartPolicy: Never