diff --git a/internal/operator/networking/kinds/networking/core/current.go b/internal/operator/networking/kinds/networking/core/current.go index 705856cd7..3d0d3985b 100644 --- a/internal/operator/networking/kinds/networking/core/current.go +++ b/internal/operator/networking/kinds/networking/core/current.go @@ -11,10 +11,6 @@ const queriedName = "networking" type NetworkingCurrent interface { GetTlsCertName() string GetDomain() string - GetIssuerSubDomain() string - GetConsoleSubDomain() string - GetAPISubDomain() string - GetAccountsSubDomain() string GetReadyCertificate() core.EnsureFunc } diff --git a/internal/operator/networking/kinds/networking/legacycf/config/external.go b/internal/operator/networking/kinds/networking/legacycf/config/external.go index eec1b39e4..44271c3c6 100644 --- a/internal/operator/networking/kinds/networking/legacycf/config/external.go +++ b/internal/operator/networking/kinds/networking/legacycf/config/external.go @@ -6,14 +6,11 @@ import ( core2 "github.com/caos/orbos/internal/operator/core" "github.com/caos/orbos/internal/operator/networking/kinds/networking/core" "github.com/caos/orbos/pkg/labels" - - "github.com/caos/orbos/internal/operator/orbiter" ) type ExternalConfig struct { Verbose bool Domain string - IP orbiter.IPAddress Rules []*Rule Groups []*Group `yaml:"groups"` Credentials *Credentials `yaml:"credentials"` @@ -25,7 +22,6 @@ func (i *ExternalConfig) IsZero() bool { if (i.Credentials == nil || i.Credentials.IsZero()) && !i.Verbose && i.Domain == "" && - i.IP == "" && i.Groups == nil && i.Prefix == "" && i.Rules == nil && @@ -55,18 +51,13 @@ func (e *ExternalConfig) Validate() error { if e.Domain == "" { return errors.New("No domain configured") } - return e.IP.Validate() + + return nil } func (e *ExternalConfig) internalDomain() (*InternalDomain, *current) { - // TODO: Remove - subdomains := []*Subdomain{ - subdomain("accounts", e.IP), - subdomain("api", e.IP), - subdomain("console", e.IP), - subdomain("issuer", e.IP), - } + subdomains := make([]*Subdomain, 0) for _, sd := range e.AdditionalDNS { subdomains = append(subdomains, sd) } @@ -77,52 +68,22 @@ func (e *ExternalConfig) internalDomain() (*InternalDomain, *current) { Rules: e.Rules, }, ¤t{ - domain: e.Domain, - issureSubdomain: "issuer", - consoleSubdomain: "console", - apiSubdomain: "api", - accountsSubdomain: "accounts", - tlsCertName: "tls-cert-wildcard", + domain: e.Domain, + tlsCertName: "tls-cert-wildcard", } } -func subdomain(subdomain string, ip orbiter.IPAddress) *Subdomain { - return &Subdomain{ - Subdomain: subdomain, - IP: string(ip), - Proxied: true, - TTL: 0, - Type: "A", - } -} - var _ core.NetworkingCurrent = (*current)(nil) type current struct { - domain string `yaml:"-"` - issureSubdomain string `yaml:"-"` - consoleSubdomain string `yaml:"-"` - apiSubdomain string `yaml:"-"` - accountsSubdomain string `yaml:"-"` - tlsCertName string `yaml:"-"` - ReadyCertificate core2.EnsureFunc + domain string `yaml:"-"` + tlsCertName string `yaml:"-"` + ReadyCertificate core2.EnsureFunc } func (c *current) GetDomain() string { return c.domain } -func (c *current) GetIssuerSubDomain() string { - return c.issureSubdomain -} -func (c *current) GetConsoleSubDomain() string { - return c.consoleSubdomain -} -func (c *current) GetAPISubDomain() string { - return c.apiSubdomain -} -func (c *current) GetAccountsSubDomain() string { - return c.accountsSubdomain -} func (c *current) GetReadyCertificate() core2.EnsureFunc { return c.ReadyCertificate }