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

[nats helm] always use emptyDir for pidfile volume #782

Merged
merged 2 commits into from
Aug 17, 2023
Merged
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
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
Loading