Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add providers startup flag #142

Merged
merged 1 commit into from
May 29, 2024

Conversation

mikenairn
Copy link
Member

@mikenairn mikenairn commented May 28, 2024

closes #105

Add a new flag to the controller startup that determines what providers are enabled, if none are specified the list of registered default providers is used.

$ go run ./cmd/main.go --provider google,inmemory --provider aws
2024-05-28T17:29:15+01:00       INFO    setup   init provider factory   {"providers": ["google","inmemory","aws"]}
2024-05-28T17:29:15+01:00       INFO    setup   starting manager
....

$ go run ./cmd/main.go --provider aws
2024-05-28T17:32:28+01:00       INFO    setup   init provider factory   {"providers": ["aws"]}
2024-05-28T17:32:28+01:00       INFO    setup   starting manager
....

$ go run ./cmd/main.go
2024-05-28T17:32:48+01:00       INFO    setup   init provider factory   {"providers": ["google","aws"]}
2024-05-28T17:32:48+01:00       INFO    setup   starting manager
....

The provider factory is updated to take a list of providers that are enabled and ensures that only providers in this list can be loaded via the factory methods. Providers themselves optionally register themselves as "default" providers, in the case where no providers are specified these providers are enabled in the factory.

@mikenairn mikenairn force-pushed the add_supported_providers_flag branch 3 times, most recently from 50a1b49 to 8764133 Compare May 28, 2024 17:20
@mikenairn mikenairn marked this pull request as ready for review May 29, 2024 08:09
Copy link
Contributor

@philbrookes philbrookes left a comment

Choose a reason for hiding this comment

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

looks good, just want to make sure I've understood why inmemory is set to a default provider.

Add a new flag to the controller startup that determines what providers
are enabled, if none are specified the list of registered default
providers is used.

The provider factory is updated to take a list of providers that are
enabled and ensures that only providers in this list can be loaded via
the factory methods. Providers themselves optionally register themselves
as "default" providers, in the case where no providers are specified
these providers are enabled in the factory.
@mikenairn mikenairn force-pushed the add_supported_providers_flag branch from 8764133 to 69c0b37 Compare May 29, 2024 09:08
@mikenairn mikenairn added this pull request to the merge queue May 29, 2024
Merged via the queue into Kuadrant:main with commit 8b67a9a May 29, 2024
11 checks passed
@mikenairn mikenairn deleted the add_supported_providers_flag branch May 29, 2024 09:45
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.

Add option for supported dns providers
2 participants