Skip to content

Conversation

jarnfast
Copy link

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:

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>.

Closes #155

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Supporting Kubernetes event properties in OpenSearch index format
2 participants