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

cleanup: remove clustertask support #8601

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion cmd/webhook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ var types = map[schema.GroupVersionKind]resourcesemantics.GenericCRD{
// v1beta1
v1beta1.SchemeGroupVersion.WithKind("Pipeline"): &v1beta1.Pipeline{},
v1beta1.SchemeGroupVersion.WithKind("Task"): &v1beta1.Task{},
v1beta1.SchemeGroupVersion.WithKind("ClusterTask"): &v1beta1.ClusterTask{},
v1beta1.SchemeGroupVersion.WithKind("TaskRun"): &v1beta1.TaskRun{},
v1beta1.SchemeGroupVersion.WithKind("PipelineRun"): &v1beta1.PipelineRun{},
v1beta1.SchemeGroupVersion.WithKind("CustomRun"): &v1beta1.CustomRun{},
Expand Down
7 changes: 3 additions & 4 deletions config/200-clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ rules:
# Controller needs cluster access to all of the CRDs that it is responsible for
# managing.
- apiGroups: ["tekton.dev"]
resources: ["tasks", "clustertasks", "taskruns", "pipelines", "pipelineruns", "customruns", "stepactions"]
resources: ["tasks", "taskruns", "pipelines", "pipelineruns", "customruns", "stepactions"]
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"]
- apiGroups: ["tekton.dev"]
resources: ["verificationpolicies"]
Expand All @@ -41,7 +41,7 @@ rules:
resources: ["taskruns/finalizers", "pipelineruns/finalizers", "customruns/finalizers"]
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"]
- apiGroups: ["tekton.dev"]
resources: ["tasks/status", "clustertasks/status", "taskruns/status", "pipelines/status", "pipelineruns/status", "customruns/status", "verificationpolicies/status", "stepactions/status"]
resources: ["tasks/status", "taskruns/status", "pipelines/status", "pipelineruns/status", "customruns/status", "verificationpolicies/status", "stepactions/status"]
verbs: ["get", "list", "create", "update", "delete", "patch", "watch"]
# resolution.tekton.dev
- apiGroups: ["resolution.tekton.dev"]
Expand Down Expand Up @@ -93,7 +93,6 @@ rules:
- pipelines.tekton.dev
- pipelineruns.tekton.dev
- tasks.tekton.dev
- clustertasks.tekton.dev
- taskruns.tekton.dev
- resolutionrequests.resolution.tekton.dev
- customruns.tekton.dev
Expand Down Expand Up @@ -148,5 +147,5 @@ metadata:
app.kubernetes.io/part-of: tekton-pipelines
rules:
- apiGroups: ["tekton.dev"]
resources: ["tasks", "clustertasks", "taskruns", "pipelines", "pipelineruns", "customruns"]
resources: ["tasks", "taskruns", "pipelines", "pipelineruns", "customruns"]
verbs: ["get", "list", "watch"]
4,492 changes: 0 additions & 4,492 deletions config/300-crds/300-clustertask.yaml

This file was deleted.

3 changes: 1 addition & 2 deletions config/300-crds/300-customrun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ spec:
description: |-
TaskKind indicates the Kind of the Task:
1. Namespaced Task when Kind is set to "Task". If Kind is "", it defaults to "Task".
2. Cluster-Scoped Task when Kind is set to "ClusterTask"
3. Custom Task when Kind is non-empty and APIVersion is non-empty
2. Custom Task when Kind is non-empty and APIVersion is non-empty
type: string
name:
description: 'Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names'
Expand Down
6 changes: 2 additions & 4 deletions config/300-crds/300-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,7 @@ spec:
description: |-
TaskKind indicates the Kind of the Task:
1. Namespaced Task when Kind is set to "Task". If Kind is "", it defaults to "Task".
2. Cluster-Scoped Task when Kind is set to "ClusterTask"
3. Custom Task when Kind is non-empty and APIVersion is non-empty
2. Custom Task when Kind is non-empty and APIVersion is non-empty
type: string
name:
description: 'Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names'
Expand Down Expand Up @@ -757,8 +756,7 @@ spec:
description: |-
TaskKind indicates the Kind of the Task:
1. Namespaced Task when Kind is set to "Task". If Kind is "", it defaults to "Task".
2. Cluster-Scoped Task when Kind is set to "ClusterTask"
3. Custom Task when Kind is non-empty and APIVersion is non-empty
2. Custom Task when Kind is non-empty and APIVersion is non-empty
type: string
name:
description: 'Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names'
Expand Down
3 changes: 1 addition & 2 deletions config/300-crds/300-taskrun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1213,8 +1213,7 @@ spec:
description: |-
TaskKind indicates the Kind of the Task:
1. Namespaced Task when Kind is set to "Task". If Kind is "", it defaults to "Task".
2. Cluster-Scoped Task when Kind is set to "ClusterTask"
3. Custom Task when Kind is non-empty and APIVersion is non-empty
2. Custom Task when Kind is non-empty and APIVersion is non-empty
type: string
name:
description: 'Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names'
Expand Down
12 changes: 0 additions & 12 deletions docs/labels.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@ Tekton automatically adds labels to Tekton entities as described in the followin
<td><code>Pods</code></td>
<td>Name of the <code>Task</code> that the <code>TaskRun</code> references.</td>
</tr>
<tr>
<td><code>tekton.dev/clusterTask</code></td>
<td><code>TaskRuns</code> that reference an existing <code>ClusterTask</code>.</td>
<td><code>Pods</code></td>
<td>Name of the <code>ClusterTask</code> that the <code>TaskRun</code> references.</td>
</tr>
<tr>
<td><code>tekton.dev/taskRun</code></td>
<td><code>Pods</code></td>
Expand Down Expand Up @@ -112,12 +106,6 @@ The following command finds all `TaskRuns` that reference a `Task` named `test-t
kubectl get taskruns --all-namespaces -l tekton.dev/task=test-task
```

The following command finds all `TaskRuns` that reference a `ClusterTask` named `test-clustertask`:

```shell
kubectl get taskruns --all-namespaces -l tekton.dev/clusterTask=test-clustertask
```

## Annotations propagation

Annotation propagate among Tekton entities as follows (similar to Labels):
Expand Down
225 changes: 4 additions & 221 deletions docs/pipeline-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5177,11 +5177,7 @@ failed step will not exit</p>
<th>Description</th>
</tr>
</thead>
<tbody><tr><td><p>&#34;ClusterTask&#34;</p></td>
<td><p>ClusterTaskRefKind is the task type for a reference to a task with cluster scope.
ClusterTasks are not supported in v1, but v1 types may reference ClusterTasks.</p>
</td>
</tr><tr><td><p>&#34;Task&#34;</p></td>
<tbody><tr><td><p>&#34;Task&#34;</p></td>
<td><p>NamespacedTaskKind indicates that the task type has a namespaced scope.</p>
</td>
</tr></tbody>
Expand Down Expand Up @@ -8480,8 +8476,6 @@ controller.</p>
</div>
Resource Types:
<ul><li>
<a href="#tekton.dev/v1beta1.ClusterTask">ClusterTask</a>
</li><li>
<a href="#tekton.dev/v1beta1.CustomRun">CustomRun</a>
</li><li>
<a href="#tekton.dev/v1beta1.Pipeline">Pipeline</a>
Expand All @@ -8494,216 +8488,6 @@ Resource Types:
</li><li>
<a href="#tekton.dev/v1beta1.TaskRun">TaskRun</a>
</li></ul>
<h3 id="tekton.dev/v1beta1.ClusterTask">ClusterTask
</h3>
<div>
<p>ClusterTask is a Task with a cluster scope. ClusterTasks are used to
represent Tasks that should be publicly addressable from any namespace in the
cluster.</p>
<p>Deprecated: Please use the cluster resolver instead.</p>
</div>
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>apiVersion</code><br/>
string</td>
<td>
<code>
tekton.dev/v1beta1
</code>
</td>
</tr>
<tr>
<td>
<code>kind</code><br/>
string
</td>
<td><code>ClusterTask</code></td>
</tr>
<tr>
<td>
<code>metadata</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#objectmeta-v1-meta">
Kubernetes meta/v1.ObjectMeta
</a>
</em>
</td>
<td>
<em>(Optional)</em>
Refer to the Kubernetes API documentation for the fields of the
<code>metadata</code> field.
</td>
</tr>
<tr>
<td>
<code>spec</code><br/>
<em>
<a href="#tekton.dev/v1beta1.TaskSpec">
TaskSpec
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Spec holds the desired state of the Task from the client</p>
<br/>
<br/>
<table>
<tr>
<td>
<code>resources</code><br/>
<em>
<a href="#tekton.dev/v1beta1.TaskResources">
TaskResources
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Resources is a list input and output resource to run the task
Resources are represented in TaskRuns as bindings to instances of
PipelineResources.</p>
<p>Deprecated: Unused, preserved only for backwards compatibility</p>
</td>
</tr>
<tr>
<td>
<code>params</code><br/>
<em>
<a href="#tekton.dev/v1beta1.ParamSpecs">
ParamSpecs
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>Params is a list of input parameters required to run the task. Params
must be supplied as inputs in TaskRuns unless they declare a default
value.</p>
</td>
</tr>
<tr>
<td>
<code>displayName</code><br/>
<em>
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>DisplayName is a user-facing name of the task that may be
used to populate a UI.</p>
</td>
</tr>
<tr>
<td>
<code>description</code><br/>
<em>
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>Description is a user-facing description of the task that may be
used to populate a UI.</p>
</td>
</tr>
<tr>
<td>
<code>steps</code><br/>
<em>
<a href="#tekton.dev/v1beta1.Step">
[]Step
</a>
</em>
</td>
<td>
<p>Steps are the steps of the build; each step is run sequentially with the
source mounted into /workspace.</p>
</td>
</tr>
<tr>
<td>
<code>volumes</code><br/>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.24/#volume-v1-core">
[]Kubernetes core/v1.Volume
</a>
</em>
</td>
<td>
<p>Volumes is a collection of volumes that are available to mount into the
steps of the build.
See Pod.spec.volumes (API version: v1)</p>
</td>
</tr>
<tr>
<td>
<code>stepTemplate</code><br/>
<em>
<a href="#tekton.dev/v1beta1.StepTemplate">
StepTemplate
</a>
</em>
</td>
<td>
<p>StepTemplate can be used as the basis for all step containers within the
Task, so that the steps inherit settings on the base container.</p>
</td>
</tr>
<tr>
<td>
<code>sidecars</code><br/>
<em>
<a href="#tekton.dev/v1beta1.Sidecar">
[]Sidecar
</a>
</em>
</td>
<td>
<p>Sidecars are run alongside the Task&rsquo;s step containers. They begin before
the steps start and end after the steps complete.</p>
</td>
</tr>
<tr>
<td>
<code>workspaces</code><br/>
<em>
<a href="#tekton.dev/v1beta1.WorkspaceDeclaration">
[]WorkspaceDeclaration
</a>
</em>
</td>
<td>
<p>Workspaces are the volumes that this Task requires.</p>
</td>
</tr>
<tr>
<td>
<code>results</code><br/>
<em>
<a href="#tekton.dev/v1beta1.TaskResult">
[]TaskResult
</a>
</em>
</td>
<td>
<p>Results are values that this Task can output</p>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
<h3 id="tekton.dev/v1beta1.CustomRun">CustomRun
</h3>
<div>
Expand Down Expand Up @@ -14985,7 +14769,7 @@ failed step will not exit</p>
<h3 id="tekton.dev/v1beta1.TaskObject">TaskObject
</h3>
<div>
<p>TaskObject is implemented by Task and ClusterTask</p>
<p>TaskObject is implemented by Task</p>
</div>
<h3 id="tekton.dev/v1beta1.TaskRef">TaskRef
</h3>
Expand Down Expand Up @@ -15026,8 +14810,7 @@ TaskKind
<td>
<p>TaskKind indicates the Kind of the Task:
1. Namespaced Task when Kind is set to &ldquo;Task&rdquo;. If Kind is &ldquo;&rdquo;, it defaults to &ldquo;Task&rdquo;.
2. Cluster-Scoped Task when Kind is set to &ldquo;ClusterTask&rdquo;
3. Custom Task when Kind is non-empty and APIVersion is non-empty</p>
2. Custom Task when Kind is non-empty and APIVersion is non-empty</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -16075,7 +15858,7 @@ Kubernetes core/v1.ResourceRequirements
<h3 id="tekton.dev/v1beta1.TaskSpec">TaskSpec
</h3>
<p>
(<em>Appears on:</em><a href="#tekton.dev/v1beta1.ClusterTask">ClusterTask</a>, <a href="#tekton.dev/v1beta1.Task">Task</a>, <a href="#tekton.dev/v1beta1.EmbeddedTask">EmbeddedTask</a>, <a href="#tekton.dev/v1beta1.TaskRunSpec">TaskRunSpec</a>, <a href="#tekton.dev/v1beta1.TaskRunStatusFields">TaskRunStatusFields</a>)
(<em>Appears on:</em><a href="#tekton.dev/v1beta1.Task">Task</a>, <a href="#tekton.dev/v1beta1.EmbeddedTask">EmbeddedTask</a>, <a href="#tekton.dev/v1beta1.TaskRunSpec">TaskRunSpec</a>, <a href="#tekton.dev/v1beta1.TaskRunStatusFields">TaskRunStatusFields</a>)
</p>
<div>
<p>TaskSpec defines the desired state of Task.</p>
Expand Down
Loading
Loading