Skip to content

Commit

Permalink
Sets query.sd-dns-resolver=miekgdns for thanos-querier and thanos-ruler
Browse files Browse the repository at this point in the history
Issue: https://issues.redhat.com/browse/OCPBUGS-5153

Problem: a downstream commit was made to make this the default because
of https://bugzilla.redhat.com/show_bug.cgi?id=1953518. However, this
commit conflicts when updating the downstream brach.

Solution: migrate default to jsonnet

Signed-off-by: JoaoBraveCoding <[email protected]>
  • Loading branch information
JoaoBraveCoding committed Dec 22, 2022
1 parent c20285b commit 652eb9d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
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
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:
- --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

0 comments on commit 652eb9d

Please sign in to comment.