tektoncd/operator

display the actual error into the TektonConfig status

jkandasa opened this issue · 0 comments

If something goes wrong on the cluster with pipelines component, we are displaying the error on that component.
TektonConfig CR is the root for all the components. But it say the error very generically.
It is nice to display the actual error on TektonConfig CR status kubectl get tektonconfig config

Example:

Assume we set an incorrect value to HPA via tektonConfig CR

      horizontalPodAutoscalers:
        tekton-pipelines-webhook:
          spec:
            maxReplicas: 1
            minReplicas: 3

and we see the followings status

$ kubectl get tektonconfig config
NAME     VERSION   READY   REASON
config   devel     False   Components not in ready state: TektonPipeline: reconcile again and proceed

$ kubectl get tektonpipeline pipeline
NAME       VERSION   READY   REASON
pipeline   v0.56.1   False   Installer set not ready: Main Reconcilation failed: TektonPipeline/main: installer set not ready, will retry: Install failed with message: HorizontalPodAutoscaler.autoscaling "tekton-pipelines-webhook" is invalid: spec.maxReplicas: Invalid value: 1: must be greater than or equal to `minReplicas`

$ kubectl get tektoninstallerset
NAME                                READY   REASON
chain-config-m7n66                  True    
chain-secret-j4pk7                  True    
chain-xqtv5                         True    
dashboard-main-deployment-tk2kl     True    
dashboard-main-static-6gtx5         True    
pipeline-main-deployment-7w5bd      True    
pipeline-main-static-9flzx          False   Install failed with message: HorizontalPodAutoscaler.autoscaling "tekton-pipelines-webhook" is invalid: spec.maxReplicas: Invalid value: 1: must be greater than or equal to `minReplicas`
tektoncd-pruner-djrhs               True    
trigger-main-deployment-c92gh       True    
trigger-main-static-4fh4r           True    
validating-mutating-webhook-lgtcl   True