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 Pipelines must be installed in the cluster.
The following instructions assume that you have installed Results into the tekton-pipelines namespace by default.
If you have installed it into a different namespace, please replace tekton-pipelines with 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 Secret to have the following attributes:
tekton-pipelinestekton-results-postgresPOSTGRES_USER=<your_username>POSTGRES_PASSWORD=<your_password>You can quickly generate a Secret using the following command:
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
If your openssl version is too low and does not support some parameters, please upgrade your openssl version from openssl binaries .
Create a new TLS Secret from the certificate.
Create a PVC if you are using PVC to store logs.
:::details {title="Explanation of YAML fields"}
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.secret_name: The name of the secret containing the database account information.
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.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.
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
Functionality can be verified through a simple taskrun.
TaskRun resourceFor air-gapped environments change the alpine image address to another present in the network
For more usage patterns, refer to the official documentation Tekton Results API
Proxy the service to the local port 8080
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.