apiVersion: v1
kind: Pod
metadata:
  annotations:
    prometheus.io/port: '2112'
    prometheus.io/scrape: 'true'
spec:  
  containers:
  - name: k6
    image: vieskov1980/k6influxdb  #loadimpact/k6
    #command: ["tail","-f","/dev/null"]
    command: ["/bin/sh"] #
    resources:
      requests:
          cpu: "100m"
          memory: "256Mi"
    tty: true
    securityContext: ## <-- When define USER in Dockerfile, securityContext should be added with root user, so that shell script will not hang in container
      runAsUser: 0

  # Adds the k6-prometheus-exporter sidecar
  - name: k6-exporter
    image: ghcr.io/benc-uk/k6-prometheus-exporter:latest
    imagePullPolicy: Always
    ports:
      - containerPort: 2112    
 