Waits for a specified Kubernetes job to complete within a given namespace and timeout period.
Input Schema
| Property | Type | Description | Required |
|---|---|---|---|
| token | string | An optional OIDC token that will be used to authenticate to the Kubernetes cluster | |
| labels | any | - | |
| namespace | string | The namespace of the resource to wait on, e.g. default | |
| clusterName | string | The name of the Kubernetes cluster to use (from app-config) | |
| timeoutSeconds | number | The timeout in seconds to wait for the job to complete |
Output Schema
Usage Examples
Wait for a migration job in the default namespace
Use this to block the workflow until a Kubernetes Job with specific labels completes. This example waits up to 15 minutes for a migration job in the default namespace after fetching your template with fetch:template.
steps:
- id: fetch-base
action: fetch:template
input:
url: ./skeleton
- id: wait-migration-job
action: kube:job:wait
input:
labels:
app: billing
job: migration
namespace: default
timeoutSeconds: 900Wait for a Helm post-upgrade job on a specific cluster
Use this when a Helm release triggers a Job and you need to wait for it to finish on a target cluster. After fetch:template and publish:github, this waits for a Helm managed job in the prod namespace on the gke-prod cluster.
steps:
- id: fetch-chart
action: fetch:template
input:
url: ./helm-chart
- id: publish-repo
action: publish:github
input:
repoUrl: github.com?owner=acme&type=repository&repo=billing-service
- id: wait-helm-job
action: kube:job:wait
input:
labels:
"app.kubernetes.io/managed-by": Helm
"app.kubernetes.io/name": schema-migrate
"app.kubernetes.io/instance": ${{ parameters.releaseName }}
namespace: prod
clusterName: gke-prod
timeoutSeconds: 1200Wait with an OIDC token on a restricted cluster
Use this when the cluster requires an explicit OIDC token for authentication. This waits for a seeding job in a parameterized namespace on the aks-staging cluster.
steps:
- id: fetch-app
action: fetch:template
input:
url: ./service-template
- id: wait-seed-job
action: kube:job:wait
input:
labels:
app: reporting-api
purpose: seed
namespace: ${{ parameters.namespace }}
clusterName: aks-staging
timeoutSeconds: 600
token: ${{ parameters.k8sOidcToken }}Wait for a tenant specific backfill job
Use this for multi tenant systems where a backfill job runs per tenant after registration. After catalog:register, this waits for a worker job labeled for the tenant in a tenant scoped namespace.
steps:
- id: fetch-templates
action: fetch:template
input:
url: ./tenant-service
- id: register-catalog
action: catalog:register
input:
repoContentsUrl: ${{ steps['fetch-templates'].output.repoContentsUrl }}
- id: wait-backfill
action: kube:job:wait
input:
labels:
tenant: ${{ parameters.tenantId }}
component: worker
operation: backfill
namespace: tenant-${{ parameters.tenantId }}
timeoutSeconds: 1800Wait for a data migration job with dynamic labels
Use this when your pipeline sets labels that include environment and release identifiers. This waits for a migration job in the target environment with cluster selection and a strict timeout.
steps:
- id: fetch
action: fetch:template
input:
url: ./migration-kit
- id: wait-data-migration
action: kube:job:wait
input:
labels:
app: data-service
environment: ${{ parameters.env }}
release: ${{ parameters.releaseId }}
namespace: ${{ parameters.env }}
clusterName: eks-dev
timeoutSeconds: 1500