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

Commit

Permalink
Merge pull request #780 from mikenairn/dns_refactor
Browse files Browse the repository at this point in the history
Dns refactor
  • Loading branch information
maleck13 authored Feb 1, 2024
2 parents 263b512 + 60f13a1 commit d2e05a0
Show file tree
Hide file tree
Showing 78 changed files with 566 additions and 2,292 deletions.
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

0 comments on commit d2e05a0

Please sign in to comment.