Skip to content
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

"options" generates unnecessary values on TektonConfig CR #2001

Open
jkandasa opened this issue Feb 15, 2024 · 0 comments
Open

"options" generates unnecessary values on TektonConfig CR #2001

jkandasa opened this issue Feb 15, 2024 · 0 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@jkandasa
Copy link
Member

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] -

ConfigMaps map[string]corev1.ConfigMap `json:"configMaps,omitempty"`
Deployments map[string]appsv1.Deployment `json:"deployments,omitempty"`
HorizontalPodAutoscalers map[string]autoscalingv2.HorizontalPodAutoscaler `json:"horizontalPodAutoscalers,omitempty"`
StatefulSets map[string]appsv1.StatefulSet `json:"statefulSets,omitempty"`

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 jkandasa added the kind/bug Categorizes issue or PR as related to a bug. label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

1 participant