Quick Start
TOC
Installation of Tekton ResultsPrerequisitesInstalling using operator CRDVerify Functionality1. Create aTaskRun resource2. Wait for the task execution to complete3. Use tkn-results CLI to query resultsReferencesInstallation of Tekton Results
This document explains how to install Tekton Results using an existing database.
Currently, the built-in PostgreSQL database is not supported, please use an external database.
About external database please refer to Using PostgreSQL from Data Services
Tekton Results supports storing logs in various storage backends. S3-compatible object storage (such as AWS S3, Ceph, MinIO) is now the recommended approach for scalable and durable log retention. For detailed S3 storage configuration, see the S3 Storage Configuration Guide. Local PVC storage is not recommended for production use.
Prerequisites
-
Tekton Pipelines must be installed in the cluster.
TIPThe following instructions assume that you have installed Results into the
tekton-pipelinesnamespace by default.If you have installed it into a different namespace, please replace
tekton-pipelineswith your namespace. -
Create a database root password.
Users must generate a database root password and store it in a Kubernetes Secret before installation. By default, Tekton Results expects this
Secretto have the following attributes:- Namespace:
tekton-pipelines - Name:
tekton-results-postgres - Including the following fields:
POSTGRES_USER=<your_username>POSTGRES_PASSWORD=<your_password>
You can quickly generate a
Secretusing the following command: - Namespace:
-
Generate a certificate/key pair. Note: Any certificate management software can be used for this purpose!
Tekton Results expects the certificate/key pair to be stored in a TLS Kubernetes Secret named
tekton-results-tls.-
Generate a new self-signed certificate
TIPIf your
opensslversion is too low and does not support some parameters, please upgrade youropensslversion from openssl binaries . -
Create a new TLS Secret from the certificate.
-
-
(For quick start only) Create a
PVCif you are using the legacyFilestorage type (not recommended for production).WARNINGPVC-based local storage is not recommended for production use. S3-compatible object storage is the recommended approach for scalable and durable log retention. For S3 storage configuration, see the S3 Storage Configuration Guide.
If you still need to use PVC for testing purposes:
- Please adjust the PVC size as needed.
- Note: This is only required if using the legacy File storage type.
Installing using operator CRD
DETAILS
All Tekton Results configuration fields are nested under spec.result in the TektonConfig resource.
db_host: The host of the database.db_port: The port of the database.db_name: The name of the database.is_external_db: Whether to use an external database.true: Use an external database.
db_secret_name: The name of the secret containing the database account information.- This is the secret created in the previous step.
server_port: The port of the server.targetNamespace: The namespace where the Results is deployed.auth_disable: Whether to disable authentication.db_enable_auto_migration: Whether to enable automatic database migration.log_level: The level of the log.logs_api: Whether to enable the logs API.true: Enable the logs API.
logs_type: The type of the logs.File: Store logs in a file (not recommended for production use).S3: Store logs in S3-compatible object storage (e.g., AWS S3, Ceph, MinIO). This is the recommended approach for scalable and durable log retention. For detailed configuration, see the S3 Storage Configuration Guide.
secret_name: The name of the secret containing the S3 account information. For detailed configuration, see the S3 Storage Configuration Guide.logs_path: The path of the logs.logs_buffer_size: The buffer size of the logs.logging_pvc_name: The name of the PVC to store the logs (only required when using legacy File storage type).- This is the PVC created in the previous step (not needed for S3 storage).
About more database configuration, please refer to PostgreSQL Configuration
After deployment, you can see that the status of results-api / results-retention-policy-agent / results-watcher is Running
Verify Functionality
Functionality can be verified through a simple taskrun.
1. Create a TaskRun resource
For air-gapped environments change the alpine image address to another present in the network
2. Wait for the task execution to complete
3. Use tkn-results CLI to query results
Preparing the CLI
tkn is a command-line tool for interacting with Tekton. You can download it from the official page.
You need to build tkn-results using golang.