Task Policy

These rules are applied to Tekton task definitions.

1. Tekton task kind checks

Policies to verify that a Tekton task definition has the expected value for kind.

  • Package name: kind

  • Package full path: policy.task.kind

1.1. Task definition has expected kind

Confirm the task definition has the kind "Task".

  • Rule type: FAILURE

  • Failure message: Unexpected kind '%s' for task definition

  • Code: kind.expected_kind

  • Source

1.2. Kind field is present in task definition

Confirm the task definition includes the kind field.

  • Rule type: FAILURE

  • Failure message: Required field 'kind' not found

  • Code: kind.kind_present

  • Source