Open jarnfast opened 4 months ago
This PR adds the capability to use templates when constructing the indexFormat for OpenSearch sinks.
indexFormat
The change is backwards compatible with the existing time formatting directives - this is ensured by the added tests.
Given an example configuration:
receivers: - name: "by-namespace" opensearch: hosts: - http://localhost:9200 indexFormat: "kube-events-{{ .InvolvedObject.Namespace }}-{2006-01-02}"
An event originating from kube-system will end up in a index named kube-events-kube-system-<go formatted date>.
kube-system
kube-events-kube-system-<go formatted date>
Closes #155
This PR adds the capability to use templates when constructing the
indexFormat
for OpenSearch sinks.The change is backwards compatible with the existing time formatting directives - this is ensured by the added tests.
Given an example configuration:
An event originating from
kube-system
will end up in a index namedkube-events-kube-system-<go formatted date>
.Closes #155