apiVersion: batch/v1
kind: Job
metadata:
  name: cups-test
  namespace: cups
  labels:
    app: cups
spec:
  template:
    metadata:
      labels:
        app: cups
    spec:
      containers:
      - name: cups-tester
        image: registry.fedoraproject.org/fedora-minimal:latest
        command: ["sh", "-c"]
        args: 
        - curl -s -w '%{http_code}\n' http://cups:631 | tail -n1
        env:
        - name: SERVICE
          value: "cups"
      restartPolicy: Never
