Chapter 1. Installing OpenShift Pipelines
This guide walks cluster administrators through the process of installing the Red Hat OpenShift Pipelines Operator to an OpenShift Container Platform cluster.
Prerequisites
-
You have access to an OpenShift Container Platform cluster using an account with
cluster-adminpermissions. -
You have installed
ocCLI. -
You have installed OpenShift Pipelines (
tkn) CLI on your local system. - Your cluster has the Marketplace capability enabled or the Red Hat Operator catalog source configured manually.
In a cluster with both Windows and Linux nodes, Red Hat OpenShift Pipelines can run on only Linux nodes.
1.1. Installing the Red Hat OpenShift Pipelines Operator in web console Copy linkLink copied to clipboard!
You can install the Red Hat OpenShift Pipelines Operator by using the OpenShift Container Platform web console to automatically configure the necessary custom resources (CRs) for your pipelines. This method provides a graphical interface to manage the installation and seamless upgrades of the Operator and its components.
The default Operator custom resource definition (CRD) config.operator.tekton.dev is now replaced by tektonconfigs.operator.tekton.dev. In addition, the Operator provides the following additional CRDs to individually manage OpenShift Pipelines components: tektonpipelines.operator.tekton.dev, tektontriggers.operator.tekton.dev and tektonaddons.operator.tekton.dev.
If you have OpenShift Pipelines already installed on your cluster, the existing installation is seamlessly upgraded. The Operator will replace the instance of config.operator.tekton.dev on your cluster with an instance of tektonconfigs.operator.tekton.dev and additional objects of the other CRDs as necessary.
If you manually changed your existing installation, such as, changing the target namespace in the config.operator.tekton.dev CRD instance by making changes to the resource name - cluster field, then the upgrade path is not smooth. In such cases, the recommended workflow is to uninstall your installation and reinstall the Red Hat OpenShift Pipelines Operator.
The Red Hat OpenShift Pipelines Operator now provides the option to select the components that you want to install by specifying profiles as part of the TektonConfig custom resource (CR). The Operator automatically installs the TektonConfig CR when you install the Operator. The supported profiles are:
- Lite: This profile installs only Tekton Pipelines.
- Basic: This profile installs Tekton Pipelines, Tekton Triggers, Tekton Chains, and Tekton Results.
-
All: This is the default profile used when you install the
TektonConfigCR. This profile installs all of the Tekton components, including Tekton Pipelines, Tekton Triggers, Tekton Chains, Tekton Results, Pipelines as Code, and Tekton add-ons. Tekton add-ons includes theClusterTriggerBindings,ConsoleCLIDownload,ConsoleQuickStart, andConsoleYAMLSampleresources, and the tasks and step action definitions available by using the cluster resolver from theopenshift-pipelinesnamespace.
Procedure
-
In the Administrator perspective of the web console, navigate to Operators
OperatorHub. -
Use the Filter by keyword box to search for
Red Hat OpenShift PipelinesOperator in the catalog. Click the Red Hat OpenShift Pipelines Operator tile. - Read the brief description about the Operator on the Red Hat OpenShift Pipelines Operator page. Click Install.
On the Install Operator page:
-
Select All namespaces on the cluster (default) for the Installation Mode. This mode installs the Operator in the default
openshift-operatorsnamespace, which enables the Operator to watch and be available to all namespaces in the cluster. - Select Automatic for the Approval Strategy. This ensures that the Operator Lifecycle Manager (OLM) automatically handles future upgrades to the Operator. If you select the Manual approval strategy, OLM creates an update request. As a cluster administrator, you must then manually approve the OLM update request to update the Operator to the new version.
Select an Update Channel.
-
The
latestchannel enables installation of the most recent stable version of the Red Hat OpenShift Pipelines Operator. Currently, it is the default channel for installing the Red Hat OpenShift Pipelines Operator. To install a specific version of the Red Hat OpenShift Pipelines Operator, cluster administrators can use the corresponding
pipelines-<version>channel. For example, to install the Red Hat OpenShift Pipelines Operator version1.8.x, you can use thepipelines-1.8channel.NoteStarting with OpenShift Container Platform 4.11, the
previewandstablechannels for installing and upgrading the Red Hat OpenShift Pipelines Operator are not available. However, in OpenShift Container Platform 4.10 and earlier versions, you can use thepreviewandstablechannels for installing and upgrading the Operator.
-
The
-
Select All namespaces on the cluster (default) for the Installation Mode. This mode installs the Operator in the default
Click Install. You will see the Operator listed on the Installed Operators page.
NoteThe Operator installs automatically into the
openshift-operatorsnamespace.Verify that the Status displays Succeeded Up to date to confirm successful installation of Red Hat OpenShift Pipelines Operator.
WarningThe success status might show as Succeeded Up to date even if installation of other components is in-progress. Therefore, it is important to verify the installation manually in the terminal.
Verify that the Red Hat OpenShift Pipelines Operator installed all components successfully. Login to the cluster on the terminal, and run the following command:
oc get tektonconfig config
$ oc get tektonconfig configCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
NAME VERSION READY REASON config 1.20.0 True
NAME VERSION READY REASON config 1.20.0 TrueCopy to Clipboard Copied! Toggle word wrap Toggle overflow If the READY condition is True, the Operator and its components installed successfully.
Additionally, check the components' versions by running the following command:
oc get tektonpipeline,tektontrigger,tektonchain,tektonaddon,pac
$ oc get tektonpipeline,tektontrigger,tektonchain,tektonaddon,pacCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
1.2. Installing the OpenShift Pipelines Operator by using the CLI Copy linkLink copied to clipboard!
You can install the Red Hat OpenShift Pipelines Operator from the OperatorHub by using the command-line interface (CLI) to manage your installation programmatically. Once you install the Operator, you can create a Subscription object to subscribe a namespace to the Operator and automate the deployment process.
Procedure
Create a
Subscriptionobject YAML file to subscribe a namespace to the Red Hat OpenShift Pipelines Operator, for example,sub.yaml:Copy to Clipboard Copied! Toggle word wrap Toggle overflow spec.channel-
Name of the channel that you want to subscribe. The
pipelines-<version>channel is the default channel. For example, the default channel for Red Hat OpenShift Pipelines Operator version1.7ispipelines-1.7. Thelatestchannel enables installation of the most recent stable version of the Red Hat OpenShift Pipelines Operator. spec.name- Name of the Operator to subscribe to.
spec.source-
Name of the
CatalogSourceobject that provides the Operator. spec.sourceNamespace-
Namespace of the
CatalogSourceobject. Useopenshift-marketplacefor the default OperatorHub catalog sources.
Create the
Subscriptionobject by running the following command:oc apply -f sub.yaml
$ oc apply -f sub.yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow The subscription installs the Red Hat OpenShift Pipelines Operator into the
openshift-operatorsnamespace. The Operator automatically installs OpenShift Pipelines into the defaultopenshift-pipelinestarget namespace.
1.3. Red Hat OpenShift Pipelines Operator in a restricted environment Copy linkLink copied to clipboard!
You can use the Red Hat OpenShift Pipelines Operator to support the installation of pipelines in a restricted network environment. The Operator automatically configures proxy settings for your pipeline containers and resources, ensuring they can operate securely within your network constraints.
The Operator installs a proxy webhook that sets the proxy environment variables in the containers of the pod created by tekton-controllers based on the cluster proxy object. It also sets the proxy environment variables in the TektonPipelines, TektonTriggers, Controllers, Webhooks, and Operator Proxy Webhook resources.
By default, the proxy webhook is disabled for the openshift-pipelines namespace. To disable it for any other namespace, you can add the operator.tekton.dev/disable-proxy: true label to the namespace object.