Skip to content

Commit 5769981

Browse files
committed
RHDEVDOCS 6239 changes for Tekton Results GA
1 parent 52d9e36 commit 5769981

17 files changed

+194
-380
lines changed

install_config/installing-pipelines.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@ include::modules/op-pipelines-operator-in-restricted-environment.adoc[leveloffse
4040

4141
* You can learn more about installing Operators on {OCP} in the link:https://docs.openshift.com/container-platform/latest/operators/admin/olm-adding-operators-to-cluster.html[adding Operators to a cluster] section.
4242

43-
* To install {tekton-chains} using the {pipelines-title} Operator, see xref:../secure/using-tekton-chains-for-openshift-pipelines-supply-chain-security.adoc#using-tekton-chains-for-openshift-pipelines-supply-chain-security[Using {tekton-chains} for {pipelines-title} supply chain security].
43+
* To configure {tekton-chains}, see xref:../secure/using-tekton-chains-for-openshift-pipelines-supply-chain-security.adoc#using-tekton-chains-for-openshift-pipelines-supply-chain-security[Using {tekton-chains} for {pipelines-title} supply chain security].
44+
45+
* To configure {tekton-results}, see xref:../records/using-tekton-results-for-openshift-pipelines-observability.adoc#using-tekton-results-for-openshift-pipelines-observability[Using {tekton-results} for {pipelines-shortname} observability].
4446

4547
* To install and deploy in-cluster {tekton-hub}, see xref:../hub/using-tekton-hub-with-openshift-pipelines.adoc#using-tekton-hub-with-openshift-pipelines[Using {tekton-hub} with {pipelines-title}].
4648

47-
* For more information on using pipelines in a restricted environment, see:
49+
* For more information on using {pipelines-shortname} in a restricted environment, see:
4850

4951
** xref:../create/creating-applications-with-cicd-pipelines.adoc#op-mirroring-images-to-run-pipelines-in-restricted-environment_creating-applications-with-cicd-pipelines[Mirroring images to run pipelines in a restricted environment]
5052

modules/op-configuring-results.adoc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// This module is included in the following assembly:
2+
//
3+
// * records/using-tekton-results-for-openshift-pipelines-observability.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="configuring-results_{context}"]
7+
= Configuring {tekton-results}
8+
9+
After you install {pipelines-shortname}, {tekton-results} is enabled by default.
10+
11+
However, if you want to store and access logging information for your pipeline runs and task runs, you must configure forwarding this information to LokiStack.
12+
13+
You can optionally complete additional configuration for {tekton-results}.

modules/op-configuring-retention-policy-results.adoc

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,33 @@
88

99
By default, {tekton-results} stores pipeline runs, task runs, events, and logs indefinitely. This leads to an unnecesary use of storage resources and can affect your database performance.
1010

11-
You can configure the retention policy for {tekton-results} at the cluster level to remove older results and their associated records and logs. You can achieve this by editing the `TektonResult` custom resource (CR).
12-
13-
.Prerequisites
14-
15-
* You installed {tekton-results}.
11+
You can configure the retention policy for {tekton-results} at the cluster level to remove older results and their associated records and logs.
1612

1713
.Procedure
1814

19-
* In the `TektonResult` CR, configure the retention policy for {tekton-results}, as shown in the following example:
15+
* Edit the `TektonConfig` custom resource (CR) by using the following command:
16+
+
17+
[source,terminal]
18+
----
19+
$ oc edit TektonConfig config
20+
----
21+
+
22+
Make the following changes in the `result` spec:
2023
+
21-
.Example retention policy for {tekton-results}
2224
[source,yaml]
2325
----
2426
apiVersion: operator.tekton.dev/v1alpha1
25-
kind: TektonResult
27+
kind: TektonConfig
2628
metadata:
27-
name: result
29+
name: config
2830
spec:
29-
options:
30-
configMaps:
31-
config-results-retention-policy:
32-
data:
33-
runAt: "3 5 * * 0" #<1>
34-
maxRetention: "30" #<2>
31+
result:
32+
options:
33+
configMaps:
34+
config-results-retention-policy:
35+
data:
36+
runAt: "3 5 * * 0" #<1>
37+
maxRetention: "30" #<2>
3538
----
3639
<1> Specify, in cron format, when to run the pruning job in the database. This example runs the job at 5:03 AM every Sunday.
3740
<2> Specify how many days to keep the data in the database. This example retains the data for 30 days.

modules/op-installing-pipelines-operator-in-web-console.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ If you manually changed your existing installation, such as, changing the target
2020
The {pipelines-title} Operator now provides the option to choose the components that you want to install by specifying profiles as part of the `TektonConfig` custom resource (CR). The `TektonConfig` CR is automatically installed when the Operator is installed.
2121
The supported profiles are:
2222

23-
* Lite: This installs only Tekton Pipelines.
24-
* Basic: This installs Tekton Pipelines, Tekton Triggers, and Tekton Chains.
25-
* All: This is the default profile used when the `TektonConfig` CR is installed. This profile installs all of the Tekton components, including Tekton Pipelines, Tekton Triggers, Tekton Chains, {pac}, and Tekton Addons. Tekton Addons includes the `ClusterTriggerBindings`, `ConsoleCLIDownload`, `ConsoleQuickStart`, and `ConsoleYAMLSample` resources, as well as the tasks and step actions available using the cluster resolver from the `openshift-pipelines` namespace.
23+
* Lite: This profile installs only Tekton Pipelines.
24+
* Basic: This profile installs Tekton Pipelines, Tekton Triggers, {tekton-chains}, and {tekton-results}.
25+
* All: This is the default profile used when the `TektonConfig` CR is installed. This profile installs all of the Tekton components, including Tekton Pipelines, Tekton Triggers, {tekton-chains}, {tekton-results}, {pac}, and Tekton Addons. Tekton Addons includes the `ClusterTriggerBindings`, `ConsoleCLIDownload`, `ConsoleQuickStart`, and `ConsoleYAMLSample` resources, as well as the tasks and step action definitions available by using the cluster resolver from the `openshift-pipelines` namespace.
2626
2727
[discrete]
2828
.Procedure

modules/op-installing-results.adoc

Lines changed: 0 additions & 102 deletions
This file was deleted.

modules/op-prepare-opc-for-results.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Before you can query {tekton-results}, you must prepare the environment for the
1111

1212
.Prerequisites
1313

14-
* You installed {tekton-results}.
1514
* You installed the `opc` utility.
1615
1716
.Procedure

modules/op-query-results-name.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ You can list and query results and records using their names.
1111

1212
.Prerequisites
1313

14-
* You installed {tekton-results}.
1514
* You installed the `opc` utility and prepared its environment to query {tekton-results}.
1615
* You installed the `jq` package.
16+
* If you want to query logging information, you configured log forwarding to LokiStack.
1717
1818
.Procedure
1919

modules/op-results-cert.adoc

Lines changed: 0 additions & 40 deletions
This file was deleted.

modules/op-results-concepts.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,6 @@ $ oc get pipelinerun <cr_name> -o yaml
168168
apiVersion: tekton.dev/v1
169169
----
170170

171-
{tekton-results} also creates a log record that contains the logging information of all the tools that ran as a part of a pipeline run or task run.
172-
173171
You can access every result and record by its name. You can also use Common Expression Language (CEL) queries to search for results and records by the information they contain, including the YAML manifest.
172+
173+
You can also configure {tekton-results} to facilitate forwarding the logging information of all the tools that ran as a part of a pipeline or task to LokiStack. You can then query {tekton-results} for logging information of the task run associated with a {tekton-results} record.

modules/op-results-db.adoc

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,43 @@
44

55
:_mod-docs-content-type: PROCEDURE
66
[id="results-db_{context}"]
7-
= Preparing a secret with the database credentials
7+
= Configuring an external database server
88

9-
{tekton-results} uses a PostgreSQL database to store data. You can configure the installation to use either a PostgreSQL server that is automatically installed with {tekton-results} or an external PostgreSQL server that already exists in your deployment. In both cases, provide a secret with the database credentials.
9+
{tekton-results} uses a PostgreSQL database to store data. By default, the installation includes an internal PostgreSQL instance.
10+
You can configure the installation to use an external PostgreSQL server that already exists in your deployment.
1011

1112
.Procedure
1213

13-
Complete one of the following steps:
14-
15-
* If you do not need to use an external PostgreSQL server, create a secret with the database user named `result` and a random password in the `openshift-pipelines` namespace by entering the following command:
14+
. Create a secret with the credentials for connecting to your PostgreSQL server by entering the following command:
1615
+
1716
[source,terminal]
1817
----
1918
$ oc create secret generic tekton-results-postgres \
2019
--namespace=openshift-pipelines \
21-
--from-literal=POSTGRES_USER=result \
22-
--from-literal=POSTGRES_PASSWORD=$(openssl rand -base64 20)
20+
--from-literal=POSTGRES_USER=<user> \
21+
--from-literal=POSTGRES_PASSWORD=<password>
2322
----
24-
+
25-
[NOTE]
26-
====
27-
In this command and in subsequent commads, if you configured a custom target namespace for {pipelines-shortname}, use the name of this namespace instead of `openshift-pipelines`.
28-
====
2923

30-
* If you want to use an external PostgreSQL database server to store {tekton-results} data, create a secret with the credentials for this server by entering the following command:
24+
. Edit the `TektonConfig` custom resource (CR) by using the following command:
3125
+
3226
[source,terminal]
3327
----
34-
$ oc create secret generic tekton-results-postgres \
35-
--namespace=openshift-pipelines \
36-
--from-literal=POSTGRES_USER=<user> \ # <1>
37-
--from-literal=POSTGRES_PASSWORD=<password> #<2>
28+
$ oc edit TektonConfig config
3829
----
3930
+
40-
Replace `<user>` with the username for the PostgreSQL user that {tekton-results} must use. Replace `<password>` with the password for the same account.
31+
Make the following changes in the `result` spec:
32+
+
33+
[source,yaml]
34+
----
35+
apiVersion: operator.tekton.dev/v1alpha1
36+
kind: TektonConfig
37+
metadata:
38+
name: config
39+
spec:
40+
result:
41+
is_external_db: true
42+
db_host: database.example.com # <1>
43+
db_port: 5342 # <2>
44+
----
45+
<1> Provide the host name of your PostgreSQL server.
46+
<2> Provide the port number of your PostgreSQL server.

0 commit comments

Comments
 (0)