-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[promtail] allow to inject templates #3248
[promtail] allow to inject templates #3248
Conversation
494c746
to
deab3b8
Compare
Signed-off-by: Wout Van De Wiel <[email protected]>
Signed-off-by: Wout Van De Wiel <[email protected]>
deab3b8
to
e6c14a7
Compare
@zalegrala Just curious, who are the members of loki maintainers? This chart includes them in Chart.yaml but not win much of their attention. |
I'm not sure @zanhsieh. I think folks are encouraged to use the I don't think there is a problem with the community maintaining extra charts here, but it would be good to get more community involvement, since don't have a test environment for much of this, so getting other community members to sanity check and approve what might break in their environment would be helpful. |
Perhaps @camrossi, @Sheikh-Abubaker would be kind enough to have a look at this PR? |
Signed-off-by: MH <[email protected]>
@Wielewout could you please explain the scope of this PR ? |
@Sheikh-Abubaker The main idea is to give more possibilities to integrate promtail as a dependency of a parent chart. As almost always the release name is included in resources, My specific goal is to deploy promtail in a way that it can scrape some topics on kafka and push data in loki. All of these are deployed with a single parent chart where kafka, loki and promtail are dependencies. Problem is that there were some crashes if kafka is not ready yet. Also loki is deployed with the basic auth enabled through the loki-gateway, so the additional promtail deployment needs to get credentials to be able to connect. The The If desired I can split up the PR for each of the two tpl calls. Or I would gladly add more of them if there are other use cases that we want to cover for integration of promtail through a parent chart 😄 |
Co-authored-by: Mohammad Abubaker <[email protected]> Signed-off-by: Wout Van De Wiel <[email protected]>
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.
LGTM! Thanks for the Contribution @Wielewout! keep them coming!!
In this PR the
extraVolumes
andinitContainers
can be filled in with templates in a parent chart.For the
initContainers
it allows to for example inject a container that waits until kafka is ready. From the context of a parent chart, a service would be created where the name for example is{{ .Release.Name }}-kafka
. This could for example be injected inkcat
to check if kafka is ready.It's also possible now to include a secret that's created in a parent chart (with the release name included in the name). This could be useful to inject a password using
password_file
with a file coming from a volume made with that secret.This could for example look like the following in a values file of a parent chart.
Note that
{{ $.Release.Name }}-loki-gateway-auth
is a secret here with usernames as keys and the corresponding password as a value within it.