-
Notifications
You must be signed in to change notification settings - Fork 717
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
Fix Logstash crashes with env #7475
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested - observed previous CrashLoopBackoff
, now fixed
LGTM
@@ -32,7 +32,7 @@ mount_path=` + volume.InitContainerConfigVolumeMountPath + ` | |||
|
|||
cp -f /usr/share/logstash/config/*.* "$mount_path" | |||
|
|||
ln -sf ` + volume.InternalConfigVolumeMountPath + `/` + ConfigFileName + ` $mount_path | |||
cp ` + volume.InternalConfigVolumeMountPath + `/` + ConfigFileName + ` $mount_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a comment explaining that Logstash rewrites the configuration file in the presence of environment variable and that that's why we have to copy it.
@@ -32,7 +32,7 @@ mount_path=` + volume.InitContainerConfigVolumeMountPath + ` | |||
|
|||
cp -f /usr/share/logstash/config/*.* "$mount_path" | |||
|
|||
ln -sf ` + volume.InternalConfigVolumeMountPath + `/` + ConfigFileName + ` $mount_path | |||
cp ` + volume.InternalConfigVolumeMountPath + `/` + ConfigFileName + ` $mount_path | |||
ln -sf ` + volume.InternalPipelineVolumeMountPath + `/` + PipelineFileName + ` $mount_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are pipeline files not rewritten?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pipeline files are not rewritten
@pebrc This is ready to merge. Thank you. |
Fixed: #7450
Logstash crashes when env variable name is in the list of env2yaml
This PR changes the config init container to copy the
logstash.yml
toconfig
Volume to allow updating the file.The following resource should start without error