Hi folks, We are updating a secret in crd fluent-...
# fluent-operator
k
Hi folks, We are updating a secret in crd fluent-bit. Is dynamic reload of this secret possible ? Because without manual restart of the fluent-bit pod the secret isn’t updated. Can you help here?
p
If you mean by environment variable then no, that's K8S restriction - env vars are set at pod creation.
If you mean it's loaded from a file then hot reload should do it
k
No we we added as a different section not as env var.
p
hot reload should pick up config file changes
k
But we are making changes to crd but not the config file....
p
What CRD, what changes?
Ultimately stuff all becomes config
k
Added to this crd https://github.com/fluent/fluent-operator/blob/master/charts/fluent-operator/templates/fluentbit-fluentBit.yaml But when I check the config file. Only input, output, parsers, filters , lua, multiline parsers are part of that config.
p
That's a helm template, not a CRD...
Secrets will end up as env vars on the pod or files mounted into it.
k
Okay. Thanks!
p
So really look at what your secret actually is on the pods you mean - if it's an environment variable then the only way to update that is to recreate the pod. There's no other way in K8S.
k
When I describe the pod the secret is not mentioned in the environment section but the secret’s path is mounted. So, in this case will dynamic reload happen?
p
If you trigger hot reload yes
Fluent Bit does not rescan files typically unless it is told to
k
Is there any doc where I can I check how to trigger hot reload?
I'm pretty sure the operator enables it for you so maybe you just need to trigger it on secret rotation?