Skip to content

Commit 7c65fb3

Browse files
author
Souvik Sarkar
committed
Behavior of non-versioned and versioned cluster tasks
intermediate content changes checking page uilds with topc map changes modularizing content trying to resolve build issues trying to fix build errors trying to fix build errors trying to fix build errors trying chaning assembly name and id intermediate commit minor intermediate changes intermediate commits peer review comments more comments done incorporated more peer review comments
1 parent ef31df5 commit 7c65fb3

6 files changed

+140
-0
lines changed

_topic_maps/_topic_map.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1555,6 +1555,8 @@ Topics:
15551555
File: uninstalling-pipelines
15561556
- Name: Creating CI/CD solutions for applications using OpenShift Pipelines
15571557
File: creating-applications-with-cicd-pipelines
1558+
- Name: Managing non-versioned and versioned cluster tasks
1559+
File: managing-nonversioned-and-versioned-cluster-tasks
15581560
- Name: Using Tekton Hub with OpenShift Pipelines
15591561
File: using-tekton-hub-with-openshift-pipelines
15601562
- Name: Working with OpenShift Pipelines using the Developer perspective

cicd/pipelines/creating-applications-with-cicd-pipelines.adoc

+5
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ include::modules/op-creating-project-and-checking-pipeline-service-account.adoc[
3737

3838
include::modules/op-creating-pipeline-tasks.adoc[leveloffset=+1]
3939

40+
[role="_additional-resources"]
41+
.Additional resources
42+
43+
* xref:../../cicd/pipelines/managing-nonversioned-and-versioned-cluster-tasks.adoc#managing-nonversioned-and-versioned-cluster-tasks[Managing non-versioned and versioned cluster tasks]
44+
4045
include::modules/op-assembling-a-pipeline.adoc[leveloffset=+1]
4146

4247
include::modules/op-mirroring-images-to-run-pipelines-in-restricted-environment.adoc[leveloffset=+1]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
:_content-type: ASSEMBLY
2+
[id="managing-nonversioned-and-versioned-cluster-tasks"]
3+
= Managing non-versioned and versioned cluster tasks
4+
include::_attributes/common-attributes.adoc[]
5+
:context: managing-nonversioned-and-versioned-cluster-tasks
6+
7+
toc::[]
8+
9+
As a cluster administrator, installing the {pipelines-title} Operator creates variants of each default cluster task known as _versioned cluster tasks_ (VCT) and _non-versioned cluster tasks_ (NVCT). For example, installing the {pipelines-title} Operator v1.7 creates a `buildah-1-7-0` VCT and a `buildah` NVCT.
10+
11+
Both NVCT and VCT have the same metadata, behavior, and specifications, including `params`, `workspaces`, and `steps`. However, they behave differently when you disable them or upgrade the Operator.
12+
13+
include::modules/op-differences-between-non-versioned-and-versioned-cluster-tasks.adoc[leveloffset=+1]
14+
15+
include::modules/op-advantages-and-disadvantages-of-non-versioned-and-versioned-cluster-tasks.adoc[leveloffset=+1]
16+
17+
include::modules/op-disabling-non-versioned-and-versioned-cluster-tasks.adoc[leveloffset=+1]
18+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// This module is part of the following assembly:
2+
//
3+
// *cicd/pipelines/managing-nonversioned-and-versioned-cluster-tasks.adoc
4+
:_content-type: CONCEPT
5+
[id="advantages-and-disadvantages-of-non-versioned-and-versioned-cluster-tasks_{context}"]
6+
= Advantages and disadvantages of non-versioned and versioned cluster tasks
7+
8+
Before adopting non-versioned or versioned cluster tasks as a standard in production environments, cluster administrators might consider their advantages and disadvantages.
9+
10+
.Advantages and disadvantages of non-versioned and versioned cluster tasks
11+
[options="header"]
12+
|===
13+
14+
| Cluster task | Advantages | Disadvantages
15+
16+
| Non-versioned cluster task (NVCT)
17+
a|
18+
* If you prefer deploying pipelines with the latest updates and bug fixes, use the NVCT.
19+
* Upgrading the Operator upgrades the non-versioned cluster tasks, which consume fewer resources than multiple versioned cluster tasks.
20+
a| If you deploy pipelines that use NVCT, they might break after an Operator upgrade if the automatically upgraded cluster tasks are not backward-compatible.
21+
22+
| Versioned cluster task (VCT)
23+
a|
24+
* If you prefer stable pipelines in production, use the VCT.
25+
* The earlier version is retained on the cluster even after the later version of a cluster task is installed. You can continue using the earlier cluster tasks.
26+
a|
27+
* If you continue using an earlier version of a cluster task, you might miss the latest features and critical security updates.
28+
* The earlier versions of cluster tasks that are not operational consume cluster resources.
29+
* When upgraded , the Operator cannot manage the earlier VCT. You can delete the earlier VCT manually using the `oc delete clustertask` command, but you cannot restore it.
30+
|
31+
32+
|===
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// This module is part of the following assembly:
2+
//
3+
// *cicd/pipelines/managing-nonversioned-and-versioned-cluster-tasks.adoc
4+
:_content-type: CONCEPT
5+
[id="differences-between-non-versioned-and-versioned-cluster-tasks_{context}"]
6+
= Differences between non-versioned and versioned cluster tasks
7+
8+
Non-versioned and versioned cluster tasks have different naming conventions. And, the {pipelines-title} Operator upgrades them differently.
9+
10+
.Differences between non-versioned and versioned cluster tasks
11+
[options="header"]
12+
|===
13+
14+
| | Non-versioned cluster task | Versioned cluster task
15+
16+
| Nomenclature
17+
| The NVCT only contains the name of the cluster task. For example, the name of the NVCT of Buildah installed with Operator v1.7 is `buildah`.
18+
| The VCT contains the name of the cluster task, followed by the version as a suffix. For example, the name of the VCT of Buildah installed with Operator v1.7 is `buildah-1-7-0`.
19+
20+
| Upgrade
21+
| When you upgrade the Operator, it updates the non-versioned cluster task with the latest changes. The name of the NVCT remains unchanged.
22+
| Upgrading the Operator installs the latest version of the VCT and retains the earlier version. The latest version of a VCT corresponds to the upgraded Operator. For example, installing Operator 1.7 installs `buildah-1-7-0` and retains `buildah-1-6-0`.
23+
24+
|===
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// This module is part of the following assembly:
2+
//
3+
// *cicd/pipelines/managing-nonversioned-and-versioned-cluster-tasks.adoc
4+
:_content-type: PROCEDURE
5+
[id="disabling-non-versioned-and-versioned-cluster-tasks_{context}"]
6+
= Disabling non-versioned and versioned cluster tasks
7+
8+
As a cluster administrator, you can disable cluster tasks that the {pipelines-shortname} Operator installed.
9+
10+
.Procedure
11+
12+
. To delete all non-versioned cluster tasks and latest versioned cluster tasks, edit the `TektonConfig` custom resource definition (CRD) and set the `clusterTasks` parameter in `spec.addon.params` to `false`.
13+
+
14+
.Example `TektonConfig` CR
15+
[source,yaml]
16+
----
17+
apiVersion: operator.tekton.dev/v1alpha1
18+
kind: TektonConfig
19+
metadata:
20+
name: config
21+
spec:
22+
params:
23+
- name: createRbacResource
24+
value: "false"
25+
profile: all
26+
targetNamespace: openshift-pipelines
27+
addon:
28+
params:
29+
- name: clusterTasks
30+
value: "false"
31+
...
32+
----
33+
+
34+
When you disable cluster tasks, the Operator removes all the non-versioned cluster tasks and only the latest version of the versioned cluster tasks from the cluster.
35+
+
36+
[NOTE]
37+
====
38+
Re-enabling cluster tasks installs the non-versioned cluster tasks.
39+
====
40+
41+
. Optional: To delete earlier versions of the versioned cluster tasks, use any one of the following methods:
42+
.. To delete individual earlier versioned cluster tasks, use the `oc delete clustertask` command followed by the versioned cluster task name. For example:
43+
+
44+
[source,terminal]
45+
----
46+
$ oc delete clustertask buildah-1-6-0
47+
----
48+
.. To delete all versioned cluster tasks created by an old version of the Operator, you can delete the corresponding installer set. For example:
49+
+
50+
[source,terminal]
51+
----
52+
$ oc delete tektoninstallerset versioned-clustertask-1-6-k98as
53+
----
54+
+
55+
[CAUTION]
56+
====
57+
If you delete an old versioned cluster task, you cannot restore it. You can only restore versioned and non-versioned cluster tasks that the current version of the Operator has created.
58+
====
59+

0 commit comments

Comments
 (0)