diff --git a/README.adoc b/README.adoc index a507405..cb2ec75 100644 --- a/README.adoc +++ b/README.adoc @@ -9,7 +9,10 @@ engineers working on the project. == The Operator xref:operator:index.adoc[➡] -- xref:operator:troubleshooting.adoc[Troubleshooting] +- xref:modules/operator/pages/troubleshooting.adoc[Troubleshooting] +- xref:modules/operator/pages/install-result.adoc[Installing Result] +- xref:modules/operator/pages/high-availability.adoc[High Availability for Tekton Pipelines Controller on OpenShift Pipelines 1.10 and 1.11] +- xref:modules/operator/pages/high-availability-1.12.adoc[High Availability for Tekton Pipelines Controller from OpenShift Pipelines 1.12] == Pipeline xref:pipeline:index.adoc[➡] diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index 86befb1..4c49e7b 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -5,8 +5,9 @@ ** xref:pipeline:cache-in-tekton.adoc[Caches "support" in tekton pipelines] * Operator ** xref:operator:troubleshooting.adoc[Troubleshooting] -** xref:operator:high-availability.adoc[High Availability for Tekton Pipelines Controller] ** xref:operator:install-result.adoc[Installing Result] +** xref:operator:high-availability.adoc[High Availability for Tekton Pipelines Controller on OpenShift Pipelines 1.10 and 1.11] +** xref:operator:high-availability-1.12.adoc[High Availability for Tekton Pipelines Controller from OpenShift Pipelines 1.12] * Results ** xref:results:query-using-opc.adoc[Query Results Using OPC CLI] * Chains diff --git a/modules/operator/pages/high-availability-1.12.adoc b/modules/operator/pages/high-availability-1.12.adoc new file mode 100644 index 0000000..75ebc43 --- /dev/null +++ b/modules/operator/pages/high-availability-1.12.adoc @@ -0,0 +1,108 @@ += High Availability for Tekton Pipelines Controller from OpenShift Pipelines 1.12 +:toc: left +:toclevels: 5 +:source-highlighter: rouge +:docinfo: shared +:docinfodir: ../common + + +== High Availability for Tekton Pipelines Controller + +If you want to run Tekton Pipelines to support high concurrent workload +scenarios, you need to follow following steps to enable high +availability for `tekton-pipelines-controller`. With this approach, you +divide the workqueue in buckets, and each replica owns a subset of those +buckets and process the load if that replica is the leader of that +bucket. + +[width="100%",cols="100%",] +|=== +|*NOTE*: This doc has been valid for `OpenShift Pipelines` from `v1.12.0` onwards. +|=== + +=== Enable High Availability With Operator on OpenShift: + +[arabic] +. First, specify the number of buckets across which you want to +distribute workqueue. The maximum supported value for bucket is `10`. +Also specify the number of replicas of tekton-pipelines-controller +you need to share the workloads process by the controller. +You need to update the `config` CR with the required number of buckets and replicas. + +[source,shell] +---- +oc edit tektonconfig config +---- + +[source,yaml] +---- +apiVersion: operator.tekton.dev/v1alpha1 +kind: TektonConfig +metadata: + name: config +spec: + <<--->> + pipeline: + <<--->> + performance: + disable-ha: false + buckets: < buckets required > + replicas: < replicas required > + <<--->> +---- + + +[arabic, start=2] +. Now delete the existing leases so that old replica removes hold and +new leases gets created which get acquired by different replicas. + +[source,shell] +---- +oc delete -n openshift-pipelines $(oc get leases -n openshift-pipelines -o name | grep tekton-pipelines-controller) +---- + +Note: + +* If by chance the leases are not properly divided over multiple +pods, you can try recreating them. +* Configmap config-leader-election is +by default getting used in knative controllers. So the change in data of +this gets read by all other components too. It is fixed for +pipelines-controller in +https://issues.redhat.com/browse/SRVKP-3336[1.11.1] and for others in +https://issues.redhat.com/browse/SRVKP-3377[1.13.0] + +=== Disable High Availability With Operator on OpenShift: + +[arabic] +. Remove the bucket and replicas field on the TektonConfig CR to remove the +workqueue distribution or set them both to 1 + +[source,shell] +---- +oc edit tektonconfig config +---- + +[source,yaml] +---- +apiVersion: operator.tekton.dev/v1alpha1 +kind: TektonConfig +metadata: + name: config +spec: + <<--->> + pipeline: + <<--->> + performance: + disable-ha: false + <<--->> +---- + +[arabic, start=2] +. Next is to delete the dangling leases which were acquired previously +by the replicas + +[source,shell] +---- +oc delete -n openshift-pipelines $(oc get leases -n openshift-pipelines -o name | grep tekton-pipelines-controller) +---- diff --git a/modules/operator/pages/high-availability.adoc b/modules/operator/pages/high-availability.adoc index 4298deb..214bb68 100644 --- a/modules/operator/pages/high-availability.adoc +++ b/modules/operator/pages/high-availability.adoc @@ -1,4 +1,4 @@ -= High Availability for Tekton Pipelines Controller += High Availability for Tekton Pipelines Controller on OpenShift Pipeline 1.10 and 1.11 :toc: left :toclevels: 5 :source-highlighter: rouge diff --git a/operator/index.adoc b/operator/index.adoc index aaf2a49..9497be4 100644 --- a/operator/index.adoc +++ b/operator/index.adoc @@ -7,4 +7,5 @@ List of content around the https://github.com/tektoncd/operator[`tektoncd/operat - xref:troubleshooting.adoc[Troubleshooting] - xref:install-result.adoc[Installing Results] -- xref:high-availability.adoc[High Availability for Tekton Pipelines Controller] +- xref:high-availability.adoc[High Availability for Tekton Pipelines Controller on OpenShift Pipelines 1.10 and 1.11] +- xref:high-availability-1.12.adoc[High Availability for Tekton Pipelines Controller from OpenShift Pipelines 1.12]