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

Some arguments are missing from generation #189

Open
noahingh opened this issue Nov 3, 2022 · 2 comments · May be fixed by #190
Open

Some arguments are missing from generation #189

noahingh opened this issue Nov 3, 2022 · 2 comments · May be fixed by #190

Comments

@noahingh
Copy link

noahingh commented Nov 3, 2022

Describe the bug
The operator does not generate some arguments from the custom resources. In particular, the arguments that type is int and *bool are not created.

Steps to reproduce the issue:

  1. Apply the Thanos resource like the one below to a cluster that has the Thanos operator.
apiVersion: monitoring.banzaicloud.io/v1alpha1
kind: Thanos
metadata:
  name: thanos
  namespace: metrics
spec:
  query:
    queryReplicaLabel: ["prometheus", "prometheus_replica"]
  queryFrontend: 
    queryRangeSplit: 30m
    queryFrontendCompressResponses: true
    queryRangePartialResponse: true
    queryRangeMaxRetriesPerRequest: 1
  queryDiscovery: true
  1. Describe the thanos-query-front Deployment; you can figure out the args field misses some arguments like the one below.
  Containers:
   query-frontend:
    Image:      quay.io/thanos/thanos:v0.22.0
    Port:       9090/TCP
    Host Port:  0/TCP
    Args:
      query-frontend
      --http-address=0.0.0.0:9090
      --log.level=debug
      --query-frontend.downstream-url=http://thanos-query.metrics.svc.cluster.local:10902
      --query-range.split-interval=30m

Expected behavior
The thanos-query-front Deployment should have the arguments - --query-range.partial-response and --query-range.max-retries-per-request=1 - under the args field.

Additional context

  • Thanos operator version: 0.3.7
@noahingh
Copy link
Author

noahingh commented Nov 3, 2022

I guess there is a bug in the GetArgs function that generate arguments from the custom resource. In particular, in the case of the int type, the val variable is not assigned, and the *bool type is not handled. I'll make a PR to fix it.

@noahingh noahingh linked a pull request Nov 3, 2022 that will close this issue
3 tasks
@noahingh
Copy link
Author

noahingh commented Nov 4, 2022

@ahma @tarokkk Could you leave any comment on this issue? Appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant