Skip to content

Conversation

@Baarsgaard
Copy link
Collaborator

@Baarsgaard Baarsgaard commented Dec 12, 2025

Changes:

  • All environment variables are now read by Kong
  • WATCH_LABEL_SELECTOR Will now exit if the selector cannot be parsed
  • ENFORCE_CACHE_LABELS is now validated by a Kong enum.
    Removed the switch that effectively set a bool to true to enable caching
  • Added validation for WATCH_NAMESPACE_SELECTOR, now returns an error when invalid

For now the changes have been tested manually, but further refactoring is planned.
Specifically to move logic out of main and into functions to allow for testing, maybe even with envtest

@github-actions github-actions bot added the chore label Dec 12, 2025
@Baarsgaard Baarsgaard force-pushed the chore_convert_env_vars_to_kong branch 2 times, most recently from 52be944 to 16a45f1 Compare December 19, 2025 15:06
@Baarsgaard Baarsgaard force-pushed the chore_convert_env_vars_to_kong branch 2 times, most recently from 9fb88ff to fd15765 Compare December 23, 2025 12:24
@Baarsgaard Baarsgaard force-pushed the chore_convert_env_vars_to_kong branch 2 times, most recently from 84462a7 to 1d1d4d1 Compare December 23, 2025 12:33
cl, err := client.New(restConfig, client.Options{})
if err != nil {
setupLog.Error(err, "Failed to get watch namespaces")
setupLog.Error(err, "failed to get watch namespaces")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since you're already touching this code, I think we should fix the error message here. E.g. "failed to create a Kubernetes client".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants