operator icon indicating copy to clipboard operation
operator copied to clipboard

The TektonResults component cannot store logs information.

Open l-qing opened this issue 10 months ago • 6 comments

Expected Behavior

After enabling the logs API feature of TektonResults, logs can be stored normally.

Actual Behavior

Even if the switch is enabled in TektonConfig, logs still cannot be stored.

Steps to Reproduce the Problem

  1. Adjust TektonResults configuration
apiVersion: operator.tekton.dev/v1alpha1
kind: TektonResult
metadata:
  name: result
spec:
  auth_disable: true
  db_enable_auto_migration: true
  db_host: 192.168.188.7
  db_name: qingliu_tektoncd_results_202502171201
  db_port: 5432
  is_external_db: true
  log_level: debug
  logging_pvc_name: tekton-logs
  logs_api: true        # <- enable logs api
  logs_path: /logs
  logs_type: File
  options: {}
  secret_name: tekton-results-postgres
  server_port: 8080
  targetNamespace: tekton-pipelines
  1. Restart the pod
$ kubectl delete pods -n tekton-pipelines -l app.kubernetes.io/name=tekton-results-watcher

$ kubectl delete pods -n tekton-pipelines -l app.kubernetes.io/name=tekton-results-api
  1. Create TaskRun
$ cat <<'EOF' | kubectl create -f -
apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
  name: hello
spec:
  taskSpec:
    steps:
      - name: hello
        image: alpine
        command: ["echo", "hello"]
EOF

Additional Info

  • Kubernetes version:

    Output of kubectl version:

    Client Version: v1.32.2
    Kustomize Version: v5.5.0
    Server Version: v1.28.13
    WARNING: version difference between client (1.32) and server (1.28) exceeds the supported minor version skew of +/-1
    
  • Tekton Operator version:

    • v0.75.0

Reference

  • Changed the default startup argument logs_api to false.
    • https://github.com/tektoncd/results/pull/782
  • Solutions from others
    • https://github.com/tektoncd/results/pull/910
  • The TektonOperator does not modify the startup parameters of the tekton-results-watcher based on the logs_api value in TektonResults when deploying TektonResults. This results in the watcher service always having this feature disabled.
    • https://github.com/tektoncd/operator/blob/07fcbf76face59c774f9d32d1eec786673c86131/pkg/reconciler/kubernetes/tektonresult/transform.go#L85-L95

l-qing avatar Feb 19 '25 13:02 l-qing

hi @l-qing Are you working on a fix for this ?

jkhelil avatar Mar 04 '25 08:03 jkhelil

Are you working on a fix for this ?

I haven't been working on fixing this issue recently.
I'm not sure if it's a problem with Tekton Results or Tekton Operator.

l-qing avatar Mar 04 '25 11:03 l-qing

@pratap0007 Please have a look

jkhelil avatar Apr 07 '25 06:04 jkhelil

@pratap0007 any findings for this please ?

jkhelil avatar Apr 16 '25 13:04 jkhelil

Hi @l-qing, can you please try this again on branch release-v0.75.x as it contains the fix? and you will need to setup a MinIO or S3 bucket.

pratap0007 avatar Apr 16 '25 14:04 pratap0007

Hi @l-qing, can you please try this again on branch release-v0.75.x as it contains the fix? and you will need to setup a MinIO or S3 bucket.

Sorry, I was on vacation recently and didn’t reply to messages in time.

I don’t have MinIO or S3 bucket; I only have a fixed PVC. Does this modification work for fixed PVC?

I use the version 0.75.0 (released on March 17), and there are still the same issues using the PVC method. Maybe switching to MinIO is better. I want to ask, have we given up support for fixed PVC?

l-qing avatar Apr 27 '25 05:04 l-qing