{
  "name": "kubectl-run-job",
  "title": "Run a one-off Kubernetes Job",
  "description": "Run a command in a container as a Job in the cluster, show its log, and fail the step if the Job fails or does not finish in time. The Job does not retry on its own.",
  "category": "Kubernetes",
  "tags": [
    "kubectl",
    "kubernetes"
  ],
  "latestVersion": "1.0.0",
  "versions": [
    "1.0.0"
  ],
  "parameters": [
    "image",
    "name",
    "cleanup",
    "command",
    "namespace",
    "service-account",
    "timeout-seconds"
  ],
  "images": [
    "cgr.dev/chainguard/kubectl@sha256:98f9c337808ecf5d5e80b79af4345762a3d8c803ebf8c857d2dddabf885107ba"
  ],
  "url": "https://catalog.dagweave.com/api/v1/items/kubectl-run-job.json",
  "templateUrl": "https://catalog.dagweave.com/api/v1/items/kubectl-run-job/latest/template.yaml",
  "page": "https://catalog.dagweave.com/items/kubectl-run-job/",
  "entrypoint": "run",
  "parameterDetails": [
    {
      "name": "image",
      "title": "Image",
      "description": "Container image the Job runs.",
      "type": "string",
      "required": true,
      "example": "postgres:18-alpine"
    },
    {
      "name": "name",
      "title": "Name",
      "description": "Name for the Job. It must not already exist in the namespace.",
      "type": "string",
      "required": true,
      "example": "reindex-2026-10"
    },
    {
      "name": "cleanup",
      "title": "Cleanup",
      "description": "Set to \"true\" to delete the Job once its log has been shown.",
      "type": "string",
      "required": false,
      "default": "true",
      "enum": [
        "true",
        "false"
      ]
    },
    {
      "name": "command",
      "title": "Command",
      "description": "Shell command to run in the image, which needs sh. Leave blank to run the image's own entrypoint.",
      "type": "string",
      "required": false,
      "default": "",
      "example": "pg_isready -h db.default.svc"
    },
    {
      "name": "namespace",
      "title": "Namespace",
      "description": "Namespace the resource lives in.",
      "type": "string",
      "required": false,
      "default": "default",
      "example": "default"
    },
    {
      "name": "service-account",
      "title": "Service account",
      "description": "Service account the Job runs as. Leave blank for the namespace default.",
      "type": "string",
      "required": false,
      "default": ""
    },
    {
      "name": "timeout-seconds",
      "title": "Timeout seconds",
      "description": "Seconds to wait for the Job to finish before failing the step.",
      "type": "string",
      "required": false,
      "default": "600"
    }
  ],
  "imageDetails": [
    {
      "ref": "cgr.dev/chainguard/kubectl@sha256:98f9c337808ecf5d5e80b79af4345762a3d8c803ebf8c857d2dddabf885107ba",
      "repository": "cgr.dev/chainguard/kubectl",
      "tag": "latest-dev",
      "digest": "sha256:98f9c337808ecf5d5e80b79af4345762a3d8c803ebf8c857d2dddabf885107ba"
    }
  ],
  "versionDetails": [
    {
      "version": "1.0.0",
      "date": "2026-10-18",
      "notes": "Initial release.",
      "latest": true,
      "installable": true,
      "url": "https://catalog.dagweave.com/api/v1/items/kubectl-run-job/1.0.0.json",
      "templateUrl": "https://catalog.dagweave.com/api/v1/items/kubectl-run-job/1.0.0/template.yaml"
    }
  ],
  "source": "https://github.com/dagweave/catalog/tree/67458f74dbbf913b03177f3cefc69424be85eb1d/catalog/kubectl-run-job",
  "catalogSha": "67458f74dbbf913b03177f3cefc69424be85eb1d"
}
