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

OCPBUGS-5153: Sets query.sd-dns-resolver=miekgdns for thanos-querier and thanos-ruler #1858

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions assets/thanos-querier/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ spec:
- --grpc-client-server-name=prometheus-grpc
- --rule=dnssrv+_grpc._tcp.prometheus-operated.openshift-monitoring.svc.cluster.local
- --target=dnssrv+_grpc._tcp.prometheus-operated.openshift-monitoring.svc.cluster.local
- --query.sd-dns-resolver=miekgdns
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- --query.sd-dns-resolver=miekgdns
- --store.sd-dns-resolver=miekgdns

Copy link
Contributor

@juzhao juzhao Dec 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from https://github.com/openshift/cluster-monitoring-operator/blob/652eb9d657322c453b510ee4f2bb1cad305910a7/assets/thanos-querier/deployment.yaml
it seems @JoaoBraveCoding is right, - --store.sd-dns-resolver=miekgdns is in the code, the PR added - --query.sd-dns-resolver=miekgdns to code

        - --store.sd-dns-resolver=miekgdns
        - --grpc-client-tls-secure
        - --grpc-client-tls-cert=/etc/tls/grpc/client.crt
        - --grpc-client-tls-key=/etc/tls/grpc/client.key
        - --grpc-client-tls-ca=/etc/tls/grpc/ca.crt
        - --grpc-client-server-name=prometheus-grpc
        - --rule=dnssrv+_grpc._tcp.prometheus-operated.openshift-monitoring.svc.cluster.local
        - --target=dnssrv+_grpc._tcp.prometheus-operated.openshift-monitoring.svc.cluster.local
        - --query.sd-dns-resolver=miekgdns

env:
- name: HOST_IP_ADDRESS
valueFrom:
Expand Down
4 changes: 3 additions & 1 deletion assets/thanos-ruler/thanos-ruler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ spec:
key: alertmanagers.yaml
name: thanos-ruler-alertmanagers-config
containers:
- name: thanos-ruler
- args:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, container's args generated by the operator would be overwritten, we probably need to add spec.additionalArgs to the ThanosRuler CRD first.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- --query.sd-dns-resolver=miekgdns
name: thanos-ruler
securityContext:
allowPrivilegeEscalation: false
capabilities:
Expand Down
4 changes: 4 additions & 0 deletions jsonnet/components/thanos-querier.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,10 @@ function(params)
'--grpc-client-server-name=prometheus-grpc',
'--rule=dnssrv+_grpc._tcp.prometheus-operated.openshift-monitoring.svc.cluster.local',
'--target=dnssrv+_grpc._tcp.prometheus-operated.openshift-monitoring.svc.cluster.local',
// The native Go resolver fails to parse compressed responses for SRV records.
// The miekgdns resolver doesn't suffer the same issue hence defaulting to it instead.
// See https://bugzilla.redhat.com/show_bug.cgi?id=1953518
'--query.sd-dns-resolver=miekgdns',
],
resources: {
requests: {
Expand Down
6 changes: 6 additions & 0 deletions jsonnet/components/thanos-ruler.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,12 @@ function(params)
// Note: this is performing strategic-merge-patch for thanos-ruler container.
// Remainder of the container configuration is managed by prometheus-operator based on $.thanosRuler.spec
name: tr.config.name,
args: [
// The native Go resolver fails to parse compressed responses for SRV records.
// The miekgdns resolver doesn't suffer the same issue hence defaulting to it instead.
// See https://bugzilla.redhat.com/show_bug.cgi?id=1953518
'--query.sd-dns-resolver=miekgdns',
],
terminationMessagePolicy: 'FallbackToLogsOnError',
volumeMounts: [
{
Expand Down