You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that the issue is that the pipelines operator runs its pre-upgrade logic after the tetkon config is created, but before it creates the TektonChains CR (https://github.com/tektoncd/operator/blob/main/pkg/reconciler/shared/tektonconfig/upgrade/pre_upgrade.go#L33), because of that the default values of chains configuration are written to the tekton config.
I saw the the pre-upgrade logic is running by turning on debug logging:
{"level":"debug","logger":"tekton-operator-lifecycle.upgrade","caller":"upgrade/upgrade.go:89","msg":"executing pre upgrade functions","commit":"2014719-dirty","knative.dev/pod":"tekton-operator-54f9b585dd-xlv8f","knative.dev/controller":"github.com.tektoncd.operator.pkg.reconciler.shared.tektonconfig.Reconciler","knative.dev/kind":"operator.tekton.dev.TektonConfig","knative.dev/traceid":"e29a3087-faa9-47f9-9db6-2d068254dbf5","knative.dev/key":"config","numberOfFunctions":2}
{"level":"debug","logger":"tekton-operator-lifecycle.upgrade","caller":"upgrade/upgrade.go:105","msg":"completed pre upgrade execution","commit":"2014719-dirty","knative.dev/pod":"tekton-operator-54f9b585dd-xlv8f","knative.dev/controller":"github.com.tektoncd.operator.pkg.reconciler.shared.tektonconfig.Reconciler","knative.dev/kind":"operator.tekton.dev.TektonConfig","knative.dev/traceid":"e29a3087-faa9-47f9-9db6-2d068254dbf5","knative.dev/key":"config"}
Expected Behavior
User provided configuration for Tekton Chains should be preserved.
Actual Behavior
When creating a TektonConfig with user provided configurations for chains, the operator overrides the values in the TektonConfig.
Example config the gets overriden:
Steps to Reproduce the Problem
Additional Info
Kubernetes version:
Output of
kubectl version
:Tekton Pipeline version:
Output of
tkn version
orkubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'
I think that the issue is that the pipelines operator runs its pre-upgrade logic after the tetkon config is created, but before it creates the TektonChains CR (https://github.com/tektoncd/operator/blob/main/pkg/reconciler/shared/tektonconfig/upgrade/pre_upgrade.go#L33), because of that the default values of chains configuration are written to the tekton config.
I saw the the pre-upgrade logic is running by turning on debug logging:
https://github.com/tektoncd/operator/blob/main/pkg/reconciler/shared/tektonconfig/upgrade/upgrade.go#L34
https://github.com/tektoncd/operator/blob/main/pkg/reconciler/shared/tektonconfig/upgrade/upgrade.go#L89
The text was updated successfully, but these errors were encountered: