operator icon indicating copy to clipboard operation
operator copied to clipboard

"options" generates unnecessary values on TektonConfig CR

Open jkandasa opened this issue 4 months ago • 0 comments

we have options under all the components. User can update or create a resources with options as mentioned in https://tekton.dev/docs/operator/tektonconfig/#additional-fields-as-options

It is not mandatory to update all the fields, however GoLang struct[1] generates default data type values on TektonConfig CR. This leads confusion on user point of view.

[1] - https://github.com/tektoncd/operator/blob/8a69188aafc4c031ace535a4c3f347f23e55195e/pkg/apis/operator/v1alpha1/additional_options.go#L29-L32

Expected:

Should not add struct default values on TektonConfig CR. keep only what user added.

Current Behavior:

Entered:
    options:
      disabled: false
      horizontalPodAutoscalers:
        tekton-pipelines-webhook:
          spec:
            minReplicas: 2 
Generated:
    options:
      disabled: false
      horizontalPodAutoscalers:
        tekton-pipelines-webhook:
          metadata:
            creationTimestamp: null
          spec:
            maxReplicas: 0
            minReplicas: 2
            scaleTargetRef:
              kind: ""
              name: ""
          status:
            currentMetrics: null
            desiredReplicas: 0 

jkandasa avatar Feb 15 '24 08:02 jkandasa