From 4257020ec3c378e088e0bd8e0b59a17a9f0b49f8 Mon Sep 17 00:00:00 2001 From: Shivam Mukhade Date: Mon, 8 Nov 2021 10:39:00 +0530 Subject: [PATCH] Updates Operator for Results v0.3.1 In v0.3.1, the db secret name is changed as Results API now uses a Postgres implementation instead of MySQL. Also, updates the CI to fetch 0.3.1 for testing instead of latest because of a bug https://github.com/tektoncd/results/issues/138 Signed-off-by: Shivam Mukhade --- Makefile | 2 +- docs/TektonResult.md | 4 ++-- pkg/reconciler/kubernetes/tektonresult/tektonresult.go | 2 +- test/config.sh | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 44bd5b0b0a..2c042bfd51 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ KO = $(or ${KO_BIN},${KO_BIN},$(BIN)/ko) PIPELINES ?= latest TRIGGERS ?= latest DASHBOARD ?= latest -RESULTS ?= latest +RESULTS ?= v0.3.1 # latest returns an older version hence hard coding to v0.3.1 for now (tektoncd/results#138) $(BIN)/ko: PACKAGE=github.com/google/ko/cmd/ko diff --git a/docs/TektonResult.md b/docs/TektonResult.md index 844a66263b..a5287817ce 100644 --- a/docs/TektonResult.md +++ b/docs/TektonResult.md @@ -20,7 +20,7 @@ To install Tekton Result on your cluster follow steps as given below: the following properties: - namespace: `tekton-pipelines` - - name: `tekton-results-mysql` + - name: `tekton-results-postgres` - contains the fields: - `user=root` - `password=` @@ -30,7 +30,7 @@ To install Tekton Result on your cluster follow steps as given below: Update namespace value in the command if Tekton Pipelines is installed in a different namespace.. ```sh - $ kubectl create secret generic tekton-results-mysql --namespace=tekton-pipelines --from-literal=user=root --from-literal=password=$(openssl rand -base64 20) + $ kubectl create secret generic tekton-results-postgres --namespace=tekton-pipelines --from-literal=user=root --from-literal=password=$(openssl rand -base64 20) ``` - Generate cert/key pair. Note: Feel free to use any cert management software to do this! diff --git a/pkg/reconciler/kubernetes/tektonresult/tektonresult.go b/pkg/reconciler/kubernetes/tektonresult/tektonresult.go index 020037afee..69a8d45032 100644 --- a/pkg/reconciler/kubernetes/tektonresult/tektonresult.go +++ b/pkg/reconciler/kubernetes/tektonresult/tektonresult.go @@ -35,7 +35,7 @@ import ( ) const ( - DbSecretName = "tekton-results-mysql" + DbSecretName = "tekton-results-postgres" TlsSecretName = "tekton-results-tls" ) diff --git a/test/config.sh b/test/config.sh index 39ff33cba3..18fb74d519 100644 --- a/test/config.sh +++ b/test/config.sh @@ -1,4 +1,4 @@ export PIPELINES=latest export TRIGGERS=latest -export RESULTS=latest +export RESULTS=v0.3.1 export DASHBOARD=latest