Skip to content

Allow master flag to take multiple values for watching configmaps#62

Merged
linki merged 1 commit intomasterfrom
multi-cluster
Dec 4, 2025
Merged

Allow master flag to take multiple values for watching configmaps#62
linki merged 1 commit intomasterfrom
multi-cluster

Conversation

@linki
Copy link
Copy Markdown
Collaborator

@linki linki commented Nov 7, 2025

This PR changes the --master flag to a slice so that it can be specified multiple times. For each master it sets up a ConfigMap watcher that all feed into the same channel so that the controller can process ConfigMaps from multiple clusters.

AFAIK, deduplication is already part of the implementation but it's especially important here.

I extracted the previous (single-client) functions into their own function. This way they don't need to be indented when they become part of the for loop which keeps the diff smaller and the actual changes are more visible.

It's backwards compatible. The default value will yield one master "" which is the same as before and targets the local cluster.

There's nothing that maps credentials to the individual masters, so it only works correctly, when the credentials (however they are provided) work for all clusters.

Furthermore, providing a custom --kubeconfig might not be fully supported but if you look closely it never worked before anyways. I don't want to fix it in this PR as it doesn't make it worse than before.

@linki linki marked this pull request as ready for review November 7, 2025 17:43
@linki linki marked this pull request as draft November 18, 2025 10:53
@linki linki marked this pull request as ready for review December 4, 2025 10:20
@linki linki removed the do-not-merge label Dec 4, 2025
@linki
Copy link
Copy Markdown
Collaborator Author

linki commented Dec 4, 2025

👍

1 similar comment
@tcondeixa
Copy link
Copy Markdown

👍

@linki linki merged commit dbec786 into master Dec 4, 2025
2 checks passed
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.

2 participants