Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Dns refactor #780

Merged
merged 3 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions cmd/policy_controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ import (
"github.com/Kuadrant/multicluster-gateway-controller/pkg/controllers/dnsrecord"
"github.com/Kuadrant/multicluster-gateway-controller/pkg/controllers/managedzone"
"github.com/Kuadrant/multicluster-gateway-controller/pkg/controllers/tlspolicy"
"github.com/Kuadrant/multicluster-gateway-controller/pkg/dns/dnsprovider"
"github.com/Kuadrant/multicluster-gateway-controller/pkg/health"
"github.com/Kuadrant/multicluster-gateway-controller/pkg/dns/health"
"github.com/Kuadrant/multicluster-gateway-controller/pkg/dns/provider"
_ "github.com/Kuadrant/multicluster-gateway-controller/pkg/dns/provider/aws"
_ "github.com/Kuadrant/multicluster-gateway-controller/pkg/dns/provider/google"
)

var (
Expand Down Expand Up @@ -90,7 +92,8 @@ func main() {
setupLog.Error(err, "unable to start manager")
os.Exit(1)
}
provider := dnsprovider.NewProvider(mgr.GetClient())

dnsProviderFactory := provider.NewFactory(mgr.GetClient())

healthMonitor := health.NewMonitor()
healthCheckQueue := health.NewRequestQueue(time.Second * 5)
Expand All @@ -106,9 +109,9 @@ func main() {
}

if err = (&dnsrecord.DNSRecordReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
DNSProvider: provider.DNSProviderFactory,
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
ProviderFactory: dnsProviderFactory,
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "DNSRecord")
os.Exit(1)
Expand All @@ -124,7 +127,7 @@ func main() {
TargetRefReconciler: reconcilers.TargetRefReconciler{
BaseReconciler: dnsPolicyBaseReconciler,
},
DNSProvider: provider.DNSProviderFactory,
ProviderFactory: dnsProviderFactory,
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "DNSPolicy")
os.Exit(1)
Expand Down Expand Up @@ -157,9 +160,9 @@ func main() {
//+kubebuilder:scaffold:builder

if err = (&managedzone.ManagedZoneReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
DNSProvider: provider.DNSProviderFactory,
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
ProviderFactory: dnsProviderFactory,
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "ManagedZone")
os.Exit(1)
Expand Down
Binary file removed docs/demos/dns-policy/Kuadrant - DNSPolicy (1).png
Binary file not shown.
Binary file removed docs/demos/dns-policy/Kuadrant - DNSPolicy (2).png
Binary file not shown.
Binary file removed docs/demos/dns-policy/Kuadrant - DNSPolicy (3).png
Binary file not shown.
Binary file removed docs/demos/dns-policy/Kuadrant - DNSPolicy.png
Binary file not shown.
31 changes: 0 additions & 31 deletions docs/demos/dns-policy/cleanup.sh

This file was deleted.

Binary file removed docs/demos/dns-policy/default.png
Binary file not shown.
179 changes: 0 additions & 179 deletions docs/demos/dns-policy/dnspolicy-demo.md

This file was deleted.

Loading
Loading