-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chains section in TektonConfig gets override with default #2160
Comments
So I used the above configuration for chains you mentioned in the issue and tested the upgrade from Operator version: v0.70.x to v0.71.x, i.e. chain:
artifacts.oci.storage: oci
artifacts.pipelinerun.format: in-toto
artifacts.pipelinerun.storage: oci
artifacts.taskrun.format: in-toto
artifacts.taskrun.storage: ""
transparency.enabled: "false" With these values I have tested, it works fine and all the values and fields are preserved Only if you add this one field |
Hey @gbenhaim I'm able to reproduce this issue, working on the fix |
After making Chains install through TektonConfig, for backward compatibility to keep chains configured data preserved a mechanism was added to add the data from chains-config configMap to TektonConfig But if Chains is installed through TektonConfig and some default chains config, then those were getting over written because chains-config configMap was empty. Hence with this patch removing this support for backward compatibilty Fixes: tektoncd#2160 Signed-off-by: PuneetPunamiya <ppunamiy@redhat.com>
After making Chains install through TektonConfig, for backward compatibility to keep chains configured data preserved a mechanism was added to add the data from chains-config configMap to TektonConfig But if Chains is installed through TektonConfig and some default chains config, then those were getting over written because chains-config configMap was empty. Hence with this patch removing this support for backward compatibilty Fixes: tektoncd#2160 Signed-off-by: PuneetPunamiya <ppunamiy@redhat.com>
After making Chains install through TektonConfig, for backward compatibility to keep chains configured data preserved a mechanism was added to add the data from chains-config configMap to TektonConfig But if Chains is installed through TektonConfig and some default chains config, then those were getting over written because chains-config configMap was empty. Hence with this patch removing this support for backward compatibilty Fixes: tektoncd#2160 Signed-off-by: PuneetPunamiya <ppunamiy@redhat.com>
After making Chains install through TektonConfig, for backward compatibility to keep chains configured data preserved a mechanism was added to add the data from chains-config configMap to TektonConfig But if Chains is installed through TektonConfig and some default chains config, then those were getting over written because chains-config configMap was empty. Hence with this patch removing this support for backward compatibilty Fixes: #2160 Signed-off-by: PuneetPunamiya <ppunamiy@redhat.com>
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: