|
4 | 4 |
|
5 | 5 | :_mod-docs-content-type: PROCEDURE
|
6 | 6 | [id="results-storage_{context}"]
|
7 |
| -= Preparing storage for logging information |
| 7 | += Preparing storage or LokiStack forwarding for logging information |
8 | 8 |
|
9 | 9 | {tekton-results} uses separate storage for logging information related to pipeline runs and task runs. You can configure any one of the following types of storage:
|
10 | 10 |
|
11 | 11 | * Persistent volume claim (PVC) on your {product-title} cluster
|
12 | 12 | * Google Cloud Storage
|
13 | 13 | * S3 bucket storage
|
14 | 14 |
|
| 15 | +Alternatively, you can install LokiStack and OpenShift Logging on your {OCP} cluster and configure forwarding of the logging information to LokiStack. This option provides better scalability for higher loads. |
| 16 | + |
| 17 | +[NOTE] |
| 18 | +==== |
| 19 | +In OpenShift Pipelines 1.16, the {tekton-results} ability to natively store logging information on a PVC, in Google Cloud Storage, and in S3 bucket storage is deprecated and is planned to be removed in a future release. |
| 20 | +==== |
| 21 | + |
| 22 | +Logging information is available using the {tekton-results} command-line interface and API, irrespective of the type of logging information storage or LokiStack forwarding that you configure. |
| 23 | + |
15 | 24 | .Procedure
|
16 | 25 |
|
17 | 26 | Complete one of the following procedures:
|
@@ -85,3 +94,85 @@ Adjust the path and filename of the application credentials file as necessary.
|
85 | 94 | $ oc create secret generic s3-credentials \
|
86 | 95 | --from-file=s3_secret.yaml -n openshift-pipelines
|
87 | 96 | ----
|
| 97 | + |
| 98 | +. To configure LokiStack forwarding, complete the following steps: |
| 99 | + |
| 100 | +.. On your {OCP} cluster, install LokiStack by using the Loki Operator and also install the OpenShift Logging Operator. |
| 101 | + |
| 102 | +.. Create a `ClusterLogForwarder.yaml` manifest file for the `ClusterLogForwarder` custom resource (CR) with one of the following YAML manifests, dependings on whether you installed OpenShift Logging version 6 or version 5: |
| 103 | ++ |
| 104 | +.YAML manifest for the `ClusterLogForwarder` CR if you installed OpenShift Logging version 6 |
| 105 | +[source,yaml] |
| 106 | +---- |
| 107 | +apiVersion: observability.openshift.io/v1 |
| 108 | +kind: ClusterLogForwarder |
| 109 | +metadata: |
| 110 | + name: collector |
| 111 | + namespace: openshift-logging |
| 112 | +spec: |
| 113 | + inputs: |
| 114 | + - application: |
| 115 | + selector: |
| 116 | + matchLabels: |
| 117 | + app.kubernetes.io/managed-by: tekton-pipelines |
| 118 | + name: only-tekton |
| 119 | + type: application |
| 120 | + managementState: Managed |
| 121 | + outputs: |
| 122 | + - lokiStack: |
| 123 | + labelKeys: |
| 124 | + application: |
| 125 | + ignoreGlobal: true |
| 126 | + labelKeys: |
| 127 | + - log_type |
| 128 | + - kubernetes.namespace_name |
| 129 | + - openshift_cluster_id |
| 130 | + authentication: |
| 131 | + token: |
| 132 | + from: serviceAccount |
| 133 | + target: |
| 134 | + name: logging-loki |
| 135 | + namespace: openshift-logging |
| 136 | + name: default-lokistack |
| 137 | + tls: |
| 138 | + ca: |
| 139 | + configMapName: openshift-service-ca.crt |
| 140 | + key: service-ca.crt |
| 141 | + type: lokiStack |
| 142 | + pipelines: |
| 143 | + - inputRefs: |
| 144 | + - only-tekton |
| 145 | + name: default-logstore |
| 146 | + outputRefs: |
| 147 | + - default-lokistack |
| 148 | + serviceAccount: |
| 149 | + name: collector |
| 150 | +---- |
| 151 | ++ |
| 152 | +.YAML manifest for the `ClusterLogForwarder` CR if you installed OpenShift Logging version 5 |
| 153 | +[source,yaml] |
| 154 | +---- |
| 155 | +apiVersion: "logging.openshift.io/v1" |
| 156 | +kind: ClusterLogForwarder |
| 157 | +metadata: |
| 158 | + name: instance |
| 159 | + namespace: openshift-logging |
| 160 | +spec: |
| 161 | + inputs: |
| 162 | + - name: only-tekton |
| 163 | + application: |
| 164 | + selector: |
| 165 | + matchLabels: |
| 166 | + app.kubernetes.io/managed-by: tekton-pipelines |
| 167 | + pipelines: |
| 168 | + - name: enable-default-log-store |
| 169 | + inputRefs: [ only-tekton ] |
| 170 | + outputRefs: [ default ] |
| 171 | +---- |
| 172 | + |
| 173 | +.. To create the `ClusterLogForwarder` CR in the `openshift-logging` namespace, log into your {OCP} cluster with the {oc-first} as a cluster administrator user, and then enter the following command: |
| 174 | ++ |
| 175 | +[source, terminal] |
| 176 | +---- |
| 177 | +$ oc apply -n openshift-logging ClusterLogForwarder.yaml |
| 178 | +---- |
0 commit comments