You can modify the fields under the .spec.pipeline.performance
parameter in the TektonConfig
custom resource (CR) to change high availability (HA) support and performance configuration for the OpenShift Pipelines controller.
Example TektonConfig performance fields
apiVersion: operator.tekton.dev/v1alpha1
kind: TektonConfig
metadata:
name: config
spec:
pipeline:
performance:
disable-ha: false
buckets: 7
replicas: 5
threads-per-controller: 2
kube-api-qps: 5.0
kube-api-burst: 10
All fields are optional. If you set them, the Red Hat OpenShift Pipelines Operator includes most of the fields as arguments in the openshift-pipelines-controller
deployment under the openshift-pipelines-controller
container. The OpenShift Pipelines Operator also updates the buckets
field in the config-leader-election
configuration map under the openshift-pipelines
namespace.
If you do not specify the values, the OpenShift Pipelines Operator does not update those fields and applies the default values for the OpenShift Pipelines controller.
|
If you modify or remove any of the performance fields, the OpenShift Pipelines Operator updates the openshift-pipelines-controller deployment and the config-leader-election configuration map (if the buckets field changed) and re-creates openshift-pipelines-controller pods.
|
High-availability (HA) mode applies to the OpenShift Pipelines controller, which creates and starts pods based on pipeline run and task run definitions. Without HA mode, a single pod executes these operations, potentially creating significant delays under a high load.
In HA mode, OpenShift Pipelines uses several pods (replicas) to execute these operations. Initially, OpenShift Pipelines assigns every controller operation into a bucket. Each replica picks operations from one or more buckets. If two replicas could pick the same operation at the same time, the controller internally determines a leader that executes this operation.
HA mode does not affect execution of task runs after the pods are created.
Table 1. Modifiable fields for tuning OpenShift Pipelines performance
Name |
Description |
Default value for the OpenShift Pipelines controller |
disable-ha
|
Enable or disable the high availability (HA) mode. By default, the HA mode is enabled. |
false
|
buckets
|
In HA mode, the number of buckets used to process controller operations. The maximum value is 10 |
1
|
replicas
|
In HA mode, the number of pods created to process controller operations. Set this value to the same or lower number than the buckets value. |
1
|
threads-per-controller
|
The number of threads (workers) to use when the work queue of the OpenShift Pipelines controller is processed. |
2
|
kube-api-qps
|
The maximum queries per second (QPS) to the cluster master from the REST client. |
5.0
|
kube-api-burst
|
The maximum burst for a throttle. |
10
|
|
The OpenShift Pipelines Operator does not control the number of replicas of the OpenShift Pipelines controller. The replicas setting of the deployment determines the number of replicas. For example, to change the number of replicas to 3, enter the following command:
$ oc --namespace openshift-pipelines scale deployment openshift-pipelines-controller --replicas=3
|
|
The kube-api-qps and kube-api-burst fields are multiplied by 2 in the OpenShift Pipelines controller. For example, if the kube-api-qps and kube-api-burst values are 10 , the actual QPS and burst values become 20 .
|