-
Notifications
You must be signed in to change notification settings - Fork 151
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
Fluent watcher #2851
Fluent watcher #2851
Conversation
Signed-off-by: Carly <carly.maggiolo@gmail.com>
Signed-off-by: Carly <carly.maggiolo@gmail.com>
Signed-off-by: Carly <carly.maggiolo@gmail.com>
|
||
module "test-versioned" { | ||
for_each = module.versions.versions | ||
source = "../fluent-operator/tests" |
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.
@newcarlis I don't think that we should depend on the fluent-operator's tests here because fluent-watcher is kind of a different project than fluent-operator 🫠
|
||
module "config" { | ||
for_each = module.versions.versions | ||
source = "../fluent-operator/config" |
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.
also here, we should create our own config for fluent-watcher according to the Dockerfile for the project:
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.
So the whole idea of the watcher is that it can detect changes to the fluent-bit config.
So, maybe a test like : https://github.com/chainguard-images/images/blob/main/images/fluent-bit/tests/main.tf
That deploys fluent-bit but with an overriden entrypoint which won't run the watcher. So edit the values:
image:
repository: <as needed>
tag: <as needed>
digest: <as needed>
command:
- /fluent-bit/bin/fluent-bit-watcher
args:
- -c=/fluent-bit/etc/conf/fluent-bit.conf
- -watch-path=/fluent-bit/etc/conf
That creates a ConfigMap called <chart name>-fluent-bit
with a fluent-bit.conf
section. Replace that section with something a bit different and monitor the log file for the message when it changes:
level=info time=2024-06-21T10:23:03Z msg="Config file changed, reloading..."
I'd recommend not using the "default" config because it tries to connect to elastic and fails and there is a lot of noise in the log from that and it's really slow. eg in values.yaml:
config:
outputs: []
You can't change the configmap by changing the values and rerunning helm because that restarts the pod! You have to change the CM direct. (For example of a change to make, remove the whole "FILTERS" section.)
We should not be creating public images anymore, and the public images should be created automatically by an automation, so, we should move this into the private images 🙏 cc @mamccorm |
New Image Pull Request Template
Image Size
Notes:
Image Vulnerabilities
Notes:
Image Tagging
Notes:
Basic Testing - K8s cluster
Notes:
Basic Testing - Package/Application
Notes:
Helm
Notes:
Processor Architectures
Notes:
Functional Testing + Documentation
Notes:
Environment Testing + Documentation
Notes:
Version
Notes:
Dev Tag Availability
Notes:
Access Control + Authentication
nonroot
and GID/UID are set to 65532 or upstream defaultENTRYPOINT
CMD
–help
Environment Variables
SIGTERM
docker kill $(docker run -d --rm cgr.dev/chainguard/nginx)
)Logs
Documentation - README