Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ToC in TaskRuns documentation #4265

Merged
merged 1 commit into from
Sep 29, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions docs/taskruns.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,41 @@ weight: 300

# `TaskRuns`

- [Overview](#taskruns)
<!-- toc -->
- [Overview](#overview)
- [Configuring a `TaskRun`](#configuring-a-taskrun)
- [Specifying the target `Task`](#specifying-the-target-task)
- [Tekton Bundles](#tekton-bundles)
- [Specifying `Parameters`](#specifying-parameters)
- [Implicit Parameters](#implicit-parameters)
- [Extra Parameters](#extra-parameters)
- [Specifying `Resources`](#specifying-resources)
- [Specifying `ServiceAccount` credentials](#specifying-serviceaccount-credentials)
- [Specifying `Resource` limits](#specifying-resource-limits)
- [Specifying a `Pod` template](#specifying-a-pod-template)
- [Specifying `Workspaces`](#specifying-workspaces)
- [Specifying `Sidecars`](#specifying-sidecars)
- [Specifying `LimitRange` values](#specifying-limitrange-values)
- [Configuring the failure timeout](#configuring-the-failure-timeout)
- [Specifying `ServiceAccount` credentials](#specifying-serviceaccount-credentials)
- [Monitoring execution status](#monitoring-execution-status)
- [Monitoring `Steps`](#monitoring-steps)
- [Steps](#steps)
- [Monitoring `Results`](#monitoring-results)
- [Cancelling a `TaskRun`](#cancelling-a-taskrun)
- [Debugging a `TaskRun`](#debugging-a-taskrun)
- [Breakpoint on Failure](#breakpoint-on-failure)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the toc needs to be re-generated after changing the heading level of these two. They're still indented one level too far I think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @sbwsg I think it shows all aligned:

Screen Shot 2021-09-29 at 6 30 18 AM

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, the - [Breakpoint on Failure](#breakpoint-on-failure) is one level indented further compared to - [Monitoring Results](#monitoring-results).

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah OK, looks like it renders fine even though the markdown spacing is different.

- [Debug Environment](#debug-environment)
- [Events](events.md#taskruns)
- [Running a TaskRun Hermetically](hermetic.md)
- [Code examples](#code-examples)
- [Example `TaskRun` with a referenced `Task`](#example-taskrun-with-a-referenced-task)
- [Example `TaskRun` with an embedded `Task`](#example-taskrun-with-an-embedded-task)
- [Reusing a `Task`](#reusing-a-task)
- [Using custom `ServiceAccount` credentials](#using-custom-serviceaccount-credentials)
- [Running step containers as a non-root user](#running-step-containers-as-a-non-root-user)
- [Running Step Containers as a Non Root User](#running-step-containers-as-a-non-root-user)
<!-- /toc -->

# Overview
## Overview

A `TaskRun` allows you to instantiate and execute a [`Task`](tasks.md) on-cluster. A `Task` specifies one or more
`Steps` that execute container images and each container image performs a specific piece of build work. A `TaskRun` executes the
Expand Down Expand Up @@ -370,7 +378,7 @@ object(s), if present. Any `Request` or `Limit` specified by the user (on `Task`

For more information, see the [`LimitRange` support in Pipeline](./limitrange.md).

## Configuring the failure timeout
### Configuring the failure timeout

You can use the `timeout` field to set the `TaskRun's` desired timeout value. If you do not specify this
value for the `TaskRun`, the global default timeout value applies. If you set the timeout to 0, the `TaskRun` will
Expand All @@ -390,7 +398,7 @@ If a `TaskRun` runs longer than its timeout value, the pod associated with the `
means that the logs of the `TaskRun` are not preserved. The deletion of the `TaskRun` pod is necessary in order to
stop `TaskRun` step containers from running.

### Specifying `ServiceAccount' credentials
### Specifying `ServiceAccount` credentials

You can execute the `Task` in your `TaskRun` with a specific set of credentials by
specifying a `ServiceAccount` object name in the `serviceAccountName` field in your `TaskRun`
Expand Down Expand Up @@ -509,9 +517,9 @@ spec:
```


### Debugging a `TaskRun`
## Debugging a `TaskRun`

#### Breakpoint on Failure
### Breakpoint on Failure

TaskRuns can be halted on failure for troubleshooting by providing the following spec patch as seen below.

Expand All @@ -530,7 +538,7 @@ During this time, the user/client can get remote shell access to the step contai
kubectl exec -it print-date-d7tj5-pod-w5qrn -c step-print-date-human-readable
```

#### Debug Environment
### Debug Environment

After the user/client has access to the container environment, they can scour for any missing parts because of which
their step might have failed.
Expand Down