Skip to content

Commit

Permalink
Inject address for peers at storage controller start-up (#101)
Browse files Browse the repository at this point in the history
The storage controller needs to know the address at which it is
reachable by it's peers within the deployment. It will use this
to mark itself as the leader in the database.

The CLI arg was added in neondatabase/neon#8588
and that's already been deployed everywhere.

Note that we are not enabling graceful leadership tranfers with this
change. The only change in storcon behaviour is that each instance
will write its address into the database at start-up. If that fails,
the process exits.
  • Loading branch information
VladLazar authored Aug 20, 2024
1 parent 487fbee commit 9c25701
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/neon-storage-controller/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: neon-storage-controller
description: Neon storage controller
type: application
version: 1.1.1
version: 1.1.2
appVersion: "0.1.0"
kubeVersion: "^1.18.x-x"
home: https://neon.tech
Expand Down
2 changes: 1 addition & 1 deletion charts/neon-storage-controller/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# neon-storage-controller

![Version: 1.1.1](https://img.shields.io/badge/Version-1.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) [![Lint and Test Charts](https://github.com/neondatabase/helm-charts/actions/workflows/lint-test.yaml/badge.svg)](https://github.com/neondatabase/helm-charts/actions/workflows/lint-test.yaml)
![Version: 1.1.2](https://img.shields.io/badge/Version-1.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) [![Lint and Test Charts](https://github.com/neondatabase/helm-charts/actions/workflows/lint-test.yaml/badge.svg)](https://github.com/neondatabase/helm-charts/actions/workflows/lint-test.yaml)

Neon storage controller

Expand Down
6 changes: 6 additions & 0 deletions charts/neon-storage-controller/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,19 @@ spec:
- --chaos-interval
- {{ .Values.settings.chaosInterval | quote }}
{{- end }}
- --address-for-peers
- http://$(POD_IP):{{ .Values.service.port }}/
env:
- name: LD_LIBRARY_PATH
value: "/usr/local/v16/lib"
- name: RUST_LOG
value: "INFO"
- name: RUST_BACKTRACE
value: "1"
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
{{- if .Values.settings }}
{{- with .Values.settings.sentryUrl }}
- name: SENTRY_DSN
Expand Down

0 comments on commit 9c25701

Please sign in to comment.