Skip to content

Commit

Permalink
Deprecate ClusterTasks
Browse files Browse the repository at this point in the history
This commit marks ClusterTasks as deprecated, planned for the next Pipelines release.
  • Loading branch information
lbernick committed Sep 22, 2022
1 parent 34274fb commit db8ffae
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ being deprecated.
| [The `PipelineRun.Status.TaskRuns` and `PipelineRun.Status.Runs` fields are deprecated and will be removed.](https://github.com/tektoncd/community/blob/main/teps/0100-embedded-taskruns-and-runs-status-in-pipelineruns.md) | v0.35.0 | Beta | Jan 25, 2023 |
| [PipelineRun.Timeout is deprecated and will be removed](https://github.com/tektoncd/community/blob/main/teps/0046-finallytask-execution-post-timeout.md) | v0.36.0 | Beta | Feb 25, 2023 |
| [Several fields of Task.Step are deprecated](https://github.com/tektoncd/pipeline/issues/4737) | v0.36.0 | Beta | Feb 25, 2023 |
| [ClusterTask is deprecated](https://github.com/tektoncd/pipeline/issues/4476) | v0.41.0 | Beta | July 13, 2023 |
2 changes: 2 additions & 0 deletions docs/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ spec:

### `Task` vs. `ClusterTask`

**Note: ClusterTasks are deprecated.** Please use the [cluster resolver](./cluster-resolver.md) instead.

A `ClusterTask` is a `Task` scoped to the entire cluster instead of a single namespace.
A `ClusterTask` behaves identically to a `Task` and therefore everything in this document
applies to both.
Expand Down
2 changes: 2 additions & 0 deletions examples/v1beta1/pipelineruns/clustertask-pipelinerun.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Note: ClusterTasks are deprecated. Please use the cluster resolver instead.
# https://github.com/tektoncd/pipeline/blob/main/docs/cluster-resolver.md
apiVersion: tekton.dev/v1beta1
kind: ClusterTask
metadata:
Expand Down
2 changes: 2 additions & 0 deletions examples/v1beta1/taskruns/clustertask.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Note: ClusterTasks are deprecated. Please use the cluster resolver instead.
# https://github.com/tektoncd/pipeline/blob/main/docs/cluster-resolver.md
apiVersion: tekton.dev/v1beta1
kind: ClusterTask
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Note: ClusterTasks are deprecated. Please use the cluster resolver instead.
# https://github.com/tektoncd/pipeline/blob/main/docs/cluster-resolver.md
apiVersion: tekton.dev/v1beta1
kind: ClusterTask
metadata:
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1beta1/cluster_task_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (

// 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.
// cluster. Deprecated: Please use the cluster resolver instead.
type ClusterTask struct {
metav1.TypeMeta `json:",inline"`
// +optional
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1beta1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/apis/pipeline/v1beta1/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@
}
},
"v1beta1.ClusterTask": {
"description": "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.",
"description": "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. Deprecated: Please use the cluster resolver instead.",
"type": "object",
"properties": {
"apiVersion": {
Expand Down

0 comments on commit db8ffae

Please sign in to comment.