Skip to content

Commit

Permalink
Fix FQDN and port of nodes in peers.json
Browse files Browse the repository at this point in the history
Pod FQDN was previously invalid, neglecting to have included the service
name. Also the HTTP port (4001) was being listed instead of the Raft
port (4002).

Somehow things worked when both were wrong, presumably by falling back
to DNS-based discovery, but correcting the FQDN issue exposed use of
the wrong port.
  • Loading branch information
jtackaberry committed Jan 3, 2024
1 parent 8a8d436 commit 4c7cfb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/rqlite/templates/config-peers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ pre-generated static list of peers used by the useStaticPeers chart option.
{{- range $i, $_ := until (.Values.replicaCount | int )}}
{{- $peers = append $peers (dict
"id" (printf "rqlite-%d" $i)
"address" (printf "%s-%d.%s.svc.cluster.local:4001" $name $i $.Release.Namespace)
"address" (printf "%s-%d.%s-headless.%s.svc.cluster.local:4002" $name $i $name $.Release.Namespace)
"non_voter" false
) }}
{{- end }}
{{- range $i, $_ := until (dig "readonly" "replicaCount" 0 .Values.AsMap | int )}}
{{- $peers = append $peers (dict
"id" (printf "rqlite-readonly-%d" $i)
"address" (printf "%s-readonly-%d.%s.svc.cluster.local:4001" $name $i $.Release.Namespace)
"address" (printf "%s-readonly-%d.%s-headless-readonly.%s.svc.cluster.local:4002" $name $i $name $.Release.Namespace)
"non_voter" true
) }}
{{- end }}
Expand Down

0 comments on commit 4c7cfb6

Please sign in to comment.