Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

hot-reload of pipeline configs without restarting logstash pods #474

Closed
morganchristiansson opened this issue Feb 7, 2020 · 20 comments
Closed

Comments

@morganchristiansson
Copy link
Contributor

morganchristiansson commented Feb 7, 2020

Describe the feature:

https://www.elastic.co/guide/en/logstash/current/reloading-config.html

Describe a specific use case for the feature:

Starting logstash can be slow. Hot-reloading config files should help when updating logstash pipelines via helm values.

Seems to me it's just a matter of adding --config.reload.automatic and removing/disabling this code in logstash/templates/statefulset.yaml

{{/* This forces a restart if the configmap has changed */}}
{{- if .Values.logstashConfig }}
configchecksum: {{ include (print .Template.BasePath "/configmap-config.yaml") . | sha256sum | trunc 63 }}
{{- end }}
{{/* This forces a restart if the configmap has changed */}}
{{- if .Values.logstashPipeline }}
pipelinechecksum: {{ include (print .Template.BasePath "/configmap-pipeline.yaml") . | sha256sum | trunc 63 }}
{{- end }}

Or is restart preferred for any reason?

@drenze
Copy link

drenze commented Feb 11, 2020

Kubernetes won't reload changed configmaps. The only way to force the reload is by including the config checksum, which forces the pod to reload.

@morganchristiansson
Copy link
Contributor Author

morganchristiansson commented Feb 12, 2020

https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#mounted-configmaps-are-updated-automatically

as long as subPath option is not used the configmap values are reloaded into volumes, aswell as environment variables from envFrom: I believe.

@morganchristiansson
Copy link
Contributor Author

Also need --config.reload.automatic per https://www.elastic.co/guide/en/logstash/current/reloading-config.html

@botelastic
Copy link

botelastic bot commented Jun 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@botelastic
Copy link

botelastic bot commented Jul 3, 2020

This issue has been automatically closed because it has not had recent activity since being marked as stale.

@botelastic botelastic bot closed this as completed Jul 3, 2020
@jmlrt
Copy link
Member

jmlrt commented Jul 8, 2020

This is still relevant

@jmlrt jmlrt reopened this Jul 8, 2020
@botelastic botelastic bot removed the triage/stale label Jul 8, 2020
@jmlrt jmlrt added the logstash label Jul 13, 2020
@botelastic
Copy link

botelastic bot commented Oct 11, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@jmlrt
Copy link
Member

jmlrt commented Oct 12, 2020

still valid

@botelastic botelastic bot removed the triage/stale label Oct 12, 2020
@botelastic
Copy link

botelastic bot commented Jan 10, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@jmlrt
Copy link
Member

jmlrt commented Jan 13, 2021

still valid

@botelastic botelastic bot removed the triage/stale label Jan 13, 2021
@smallersoup
Copy link

still valid

@liladler
Copy link

liladler commented Mar 8, 2021

Since secrets are automatically reloaded without restarting the pods, what worked for me is to configure Logstash with a stringData Secret while setting config.reload.automatic: true in logstash.yml

@chas0amx
Copy link

chas0amx commented Mar 9, 2021

@liladler
In the Chart we have ConfigMap, not Secret. Is it possible to configure Logstash with Secret?

https://github.com/elastic/helm-charts/blob/master/logstash/templates/configmap-pipeline.yaml

Selection_233

@botelastic
Copy link

botelastic bot commented Jun 7, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@jmlrt
Copy link
Member

jmlrt commented Jun 23, 2021

still valid

@botelastic botelastic bot removed the triage/stale label Jun 23, 2021
@botelastic
Copy link

botelastic bot commented Sep 21, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@jmlrt
Copy link
Member

jmlrt commented Sep 21, 2021

still valid

@botelastic botelastic bot removed the triage/stale label Sep 21, 2021
@botelastic
Copy link

botelastic bot commented Dec 20, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@botelastic
Copy link

botelastic bot commented Jan 19, 2022

This issue has been automatically closed because it has not had recent activity since being marked as stale.

@botelastic botelastic bot closed this as completed Jan 19, 2022
@cchriso
Copy link

cchriso commented Jun 30, 2022

still valid

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants