|
@@ -3,7 +3,7 @@ package porter_app
|
|
|
import (
|
|
import (
|
|
|
"context"
|
|
"context"
|
|
|
|
|
|
|
|
- "github.com/porter-dev/porter/internal/integrations/powerdns"
|
|
|
|
|
|
|
+ "github.com/porter-dev/porter/internal/integrations/dns"
|
|
|
"github.com/porter-dev/porter/internal/kubernetes"
|
|
"github.com/porter-dev/porter/internal/kubernetes"
|
|
|
"github.com/porter-dev/porter/internal/kubernetes/domain"
|
|
"github.com/porter-dev/porter/internal/kubernetes/domain"
|
|
|
"github.com/porter-dev/porter/internal/repository"
|
|
"github.com/porter-dev/porter/internal/repository"
|
|
@@ -15,7 +15,7 @@ type CreatePorterSubdomainInput struct {
|
|
|
AppName string
|
|
AppName string
|
|
|
RootDomain string
|
|
RootDomain string
|
|
|
KubernetesAgent *kubernetes.Agent
|
|
KubernetesAgent *kubernetes.Agent
|
|
|
- PowerDNSClient *powerdns.Client
|
|
|
|
|
|
|
+ DNSClient *dns.Client
|
|
|
DNSRecordRepository repository.DNSRecordRepository
|
|
DNSRecordRepository repository.DNSRecordRepository
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -29,7 +29,7 @@ func CreatePorterSubdomain(ctx context.Context, input CreatePorterSubdomainInput
|
|
|
if input.KubernetesAgent == nil {
|
|
if input.KubernetesAgent == nil {
|
|
|
return "", telemetry.Error(ctx, span, nil, "k8s agent is nil")
|
|
return "", telemetry.Error(ctx, span, nil, "k8s agent is nil")
|
|
|
}
|
|
}
|
|
|
- if input.PowerDNSClient == nil {
|
|
|
|
|
|
|
+ if input.DNSClient == nil {
|
|
|
return "", telemetry.Error(ctx, span, nil, "powerdns client is nil")
|
|
return "", telemetry.Error(ctx, span, nil, "powerdns client is nil")
|
|
|
}
|
|
}
|
|
|
if input.AppName == "" {
|
|
if input.AppName == "" {
|
|
@@ -66,7 +66,7 @@ func CreatePorterSubdomain(ctx context.Context, input CreatePorterSubdomainInput
|
|
|
|
|
|
|
|
_record := domain.DNSRecord(*record)
|
|
_record := domain.DNSRecord(*record)
|
|
|
|
|
|
|
|
- err = _record.CreateDomain(input.PowerDNSClient)
|
|
|
|
|
|
|
+ err = _record.CreateDomain(input.DNSClient)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
return createdDomain, telemetry.Error(ctx, span, err, "error creating domain")
|
|
return createdDomain, telemetry.Error(ctx, span, err, "error creating domain")
|
|
|
}
|
|
}
|