Dynamic Addition for Exporters to Zeebe Cluster Containers #33
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.
Looks good for me. I added two minor comments.
@@ -22,43 +22,8 @@ data: | |||
ZEEBE_CONTACT_POINTS="${ZEEBE_CONTACT_POINTS},${HOSTNAME::-1}$i.$(hostname -d):26502" | |||
done | |||
export ZEEBE_CONTACT_POINTS="${ZEEBE_CONTACT_POINTS}" | |||
ls -al /exporters/ | |||
cp -a /exporters/*.jar /usr/local/zeebe/lib/ |
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.
I would prefer to copy the exporters into a separate folder (e.g. /usr/local/zeebe/exporters/
) to avoid classpath issues.
zeebe-cluster/values.yaml
Outdated
zeebeCfg: |- | ||
[[exporters]] | ||
id = "elasticsearch" | ||
className = "io.zeebe.exporter.ElasticsearchExporter" |
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.
I think we should start to load the exporters from a defined jarPath
to avoid classpath issues. For example, by adding jarPath = "exporters/zeebe-elasticsearch-exporter-0.22.1.jar"
next to the exporters className
.
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.
@saig0 is that already there? I mean jarPath =
can I use that already?
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.
Yes, it is (since the beginning). We were just too lazy to use it 😅
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.
@saig0 ok.. but I cannot make this change right now as the elasticsearch
exporter is not in that new location right?
What I will do for now is to use your recommended path and in the examples, I will add the jarPath
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.
👍
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: saig0 If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Generally looks fine for Zeebe pre 0.23.x - but from 0.23.x, injecting exporters becomes a piece of 🍰. Since we can now arbitrarily define exporters using environment variables, injecting exporters is now mostly just copying over the JAR to a pre-defined location and configuring your exporter. Whether we want to keep distributing these containers which contain the JAR + some default config is something to be discussed I guess. |
@npepinpe what would you expect to change for 0.23.x forward? I mean.. this is just showing how to do that exactly.. configure + copy the jars.. I consider this more like an example on how to do that. But if you are already working in big changes for how to plug new exporters please let me know so we can reflect that in the charts. |
@Zelldon I will try to rebase and re-test early next week. |
e5475d7
to
f50a257
Compare
This PR has an initial approach to be able to use initContainers to register new Exporters to the official Zeebe Docker Images.
This PR should promote not creating your own Docker Images for adding your custom exporters. It also made me think about removing the ElasticSearch one, as we can clearly document how to add one with
initContainers
hence having the base image more reusable and not bloated.An example of how to add hazelcast and kafka can be found here:
https://github.com/zeebe-io/zeebe-helm-profiles/blob/master/examples/zeebe-cluster/exporters-values.yaml