Skip to content

Commit

Permalink
[nats helm] always use emptyDir for pidfile volume (#782)
Browse files Browse the repository at this point in the history
* [nats helm] always use emptyDir for pidfile volume

Signed-off-by: Caleb Lloyd <[email protected]>

* relese 1.0.2

Signed-off-by: Caleb Lloyd <[email protected]>

---------

Signed-off-by: Caleb Lloyd <[email protected]>
  • Loading branch information
caleblloyd authored Aug 17, 2023
1 parent 5f2b505 commit 380c183
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion helm/charts/nats/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords:
- nats
- messaging
- cncf
version: 1.0.1
version: 1.0.2
home: http://github.com/nats-io/k8s
maintainers:
- email: [email protected]
Expand Down
3 changes: 1 addition & 2 deletions helm/charts/nats/files/config/config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{{- $pidFile := ternary "/var/run/nats/nats.pid" "/var/run/nats.pid" .Values.reloader.enabled }}
{{- with .Values.config }}

server_name: << $SERVER_NAME >>
lame_duck_grace_period: 10s
lame_duck_duration: 30s
pid_file: {{ $pidFile }}
pid_file: /var/run/nats/nats.pid

########################################
# NATS
Expand Down
5 changes: 1 addition & 4 deletions helm/charts/nats/files/stateful-set/nats-container.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- $pidFile := ternary "/var/run/nats/nats.pid" "/var/run/nats.pid" .Values.reloader.enabled }}
name: nats
{{ include "nats.image" (merge (pick $.Values "global") .Values.container.image) }}

Expand Down Expand Up @@ -32,7 +31,7 @@ lifecycle:
# send the lame duck shutdown signal to trigger a graceful shutdown
command:
- nats-server
- -sl=ldm={{ $pidFile }}
- -sl=ldm=/var/run/nats/nats.pid

{{- if .Values.config.monitor.enabled }}
startupProbe:
Expand Down Expand Up @@ -69,10 +68,8 @@ volumeMounts:
- name: config
mountPath: /etc/nats-config
# PID volume
{{- if .Values.reloader.enabled }}
- name: pid
mountPath: /var/run/nats
{{- end}}
# JetStream PVC
{{- with .Values.config.jetstream }}
{{- if and .enabled .fileStore.enabled .fileStore.pvc.enabled }}
Expand Down
2 changes: 0 additions & 2 deletions helm/charts/nats/files/stateful-set/pod-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@ spec:
configMap:
name: {{ .Values.configMap.name }}
# PID volume
{{- if .Values.reloader.enabled }}
- name: pid
emptyDir: {}
{{- end }}
# tlsCA
{{- include "nats.tlsCAVolume" $ | nindent 2 }}
# secrets
Expand Down

0 comments on commit 380c183

Please sign in to comment.