Skip to content

Add full configuration file for Event Handler helm chart#62049

Merged
kshi36 merged 5 commits intomasterfrom
kevin/event-handler-chart-options
Dec 15, 2025
Merged

Add full configuration file for Event Handler helm chart#62049
kshi36 merged 5 commits intomasterfrom
kevin/event-handler-chart-options

Conversation

@kshi36
Copy link
Copy Markdown
Contributor

@kshi36 kshi36 commented Dec 6, 2025

Closes #53356
Part of #60411

This PR updates the Event Handler helm chart to set any arbitrary configuration option. In addition, the Event Handler README was updated with all existing options, and the CLI extended with more environment variables and more dump statements.

A follow-up docs PR will be made to auto-generate the helm chart reference and replace the existing static version (via render-helm-ref).

Manual Tests

  • Verify generated toml file (setting all added config options) is correctly parsed by teleport-event-handler plugin when calling
teleport-event-handler start -c teleport-event-handler.toml
  • Verify new environment variables (FDFWD_ prefix) and old environment variables (FDWRD_ prefix) both correctly set CLI options' values.

changelog: Added full configuration file for teleport-plugin-event-handler helm chart
changelog: Added full environment variable configuration for event handler CLI

@kshi36 kshi36 changed the title Added full configuration file for Event Handler helm chart Add full configuration file for Event Handler helm chart Dec 6, 2025

// Timeout is the time poller will wait before the new request if there are no events in the queue
Timeout time.Duration `help:"Polling timeout" default:"5s" env:"FDFWD_TIMEOUT"`
Timeout time.Duration `help:"Polling timeout" default:"10s" env:"FDFWD_TIMEOUT"`
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All default values for helm chart values.yaml were added based on internal event handler CLI default values. However, I set CLI's timeout to "10s" which matches existing reference examples as well as current helm chart default value.

Comment on lines -40 to +41
FluentdCert string `help:"fluentd TLS certificate file" type:"existingfile" env:"FDWRD_FLUENTD_CERT"`
FluentdCert string `help:"fluentd TLS certificate file" type:"existingfile" env:"FDFWD_FLUENTD_CERT,FDWRD_FLUENTD_CERT"`
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I am missing something, FDWRD_ prefix is inconsistent/typo, since FDFWD_ is adopted most everywhere else. I included the fixed env var as well as retained old env var, for backwards compatibility. README also reflects new preferred env var.

Alternatively can include both FDWRD_ and FDFWD_ prefixes everywhere for maximum consistency...

@kshi36 kshi36 force-pushed the kevin/event-handler-chart-options branch from d93eee4 to 75823ca Compare December 8, 2025 17:18
@kshi36 kshi36 marked this pull request as ready for review December 8, 2025 18:56
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for converting the chart to the default values format :)

Once this PR is merged, can you open a followup PR to change examples/chart/Makefile, add render-chart-ref-event-handler and check-chart-ref-event-handle so we use the comments from values.yaml to generate the reference?

Comment on lines +32 to +45
{{- if .Values.eventHandler.lock }}
{{- if .Values.eventHandler.lock.enabled }}
lock-enabled = {{ .Values.eventHandler.lock.enabled }}
{{- end }}
{{- if .Values.eventHandler.lock.failedAttemptsCount }}
lock-failed-attempts-count = {{ .Values.eventHandler.lock.failedAttemptsCount }}
{{- end }}
{{- if .Values.eventHandler.lock.period }}
lock-period = {{ .Values.eventHandler.lock.period | quote }}
{{- end }}
{{- if .Values.eventHandler.lock.for }}
lock-for = {{ .Values.eventHandler.lock.for | quote }}
{{- end }}
{{- end }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks to this PR I learned that the event handler is able to lock users out of Teleport. Now I want to unlearn this 🫠

This is not a great design because we stream event with potentially quite some delay (on athena we can be up to 5 minute late).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok down the rabbit hole, we use some external rate-limiter that is mentioned in go's hall of shame https://go.dev/src/runtime/timestub.go?s=610:641

The fact it uses the current time make the logic completely broken because:

  • we might be backfilling events, so we should use the event time instead of the current time
  • on some backends we are consuming event potentially by chunks, so we only get event batches and they essentially all appear at the same time

I filed: #62252 , no need to do it now but I'll add this to the backlog.

@kshi36 kshi36 added this pull request to the merge queue Dec 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 15, 2025
@kshi36 kshi36 added this pull request to the merge queue Dec 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 15, 2025
@kshi36 kshi36 added this pull request to the merge queue Dec 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 15, 2025
@kshi36 kshi36 added this pull request to the merge queue Dec 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 15, 2025
@kshi36 kshi36 added this pull request to the merge queue Dec 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 15, 2025
@kshi36 kshi36 added this pull request to the merge queue Dec 15, 2025
Merged via the queue into master with commit d668ae6 Dec 15, 2025
47 of 48 checks passed
@kshi36 kshi36 deleted the kevin/event-handler-chart-options branch December 15, 2025 22:32
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@kshi36 See the table below for backport results.

Branch Result
branch/v18 Create PR

21KennethTran pushed a commit that referenced this pull request Jan 6, 2026
* Added full configuration file for Event Handler helm chart

* Fix snapshot

* Fix test

* Remove exitOnLastEvent, refresh options; refactoring

* Refactor, fix test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow full configuration file for the Event Handler chart

3 participants