Skip to content

Commit

Permalink
Customer configured DNS for cloud platforms AWS, Azure and GCP
Browse files Browse the repository at this point in the history
  • Loading branch information
sadasu committed Aug 31, 2023
1 parent 043c27b commit c8d87d0
Showing 1 changed file with 59 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: custom-dns
title: cloud-custom-dns
authors:
- "@sadasu"
reviewers:
Expand Down Expand Up @@ -194,6 +194,22 @@ this information to generate the CoreDNS CoreFile.

### API Extensions

1. A new ConfigMap called `lbConfigforDNS` is created by the Installer. It can
be created in any namespace but we are choosing to create it in the same
namespace as the CoreDNS pods. Hence, the namespace name would be constructed
as: openshift-$platform_name-infra

```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: LBConfigforDNS
namespace: openshift-aws-infra
data:
internal-api-lb-dns-name: "abc-123"
external-api-lb-dns-name: "xyz-456"
```
1. The AWSPlatformStatus within the PlatformStatus field of the Infrastructure
ConfigResource (CR) is updated to contain all the DNS config required for the
in-cluster CoreDNS solution. This same CR is available to the user post a
Expand Down Expand Up @@ -244,7 +260,6 @@ too. The validation for this config will disallow this value being `Enabled` in
platforms that currently do not support it.

```yaml
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down Expand Up @@ -297,6 +312,48 @@ type AWSPlatformSpec struct {
CustomDNS string ``json:"customDNS,omitempty"`
}
```

4. The AWSPlatformStatus within the PlatformStatus field of the Infrastructure
ConfigResource (CR) is updated to contain all the DNS config required for the
in-cluster CoreDNS solution. This same CR is available to the user post a
successful cluster install, to configure their own DNS solution.

```go
type AWSPlatformStatus struct {
<snip>
// AWSClusterDNSConfig contains all the DNS config required to configure a custom DNS solution.
// +optional
AWSClusterDNSConfig *ClusterDNSConfig `json:"awsClusterDNSConfig,omitempty"`

<snip>

}

type ClusterDNSConfig struct {
// APIServerDNSConfig contains information to configure DNS for API Server.
// This field will be set only when the userConfiguredDNS feature is enabled.
APIServerDNSConfig []DNSConfig `json:"apiServerDNSConfig,omitempty"`

// InternalAPIServerDNSConfig contains information to configure DNS for the Internal API Server.
// This field will be set only when the userConfiguredDNS feature is enabled.
InternalAPIServerDNSConfig []DNSConfig `json:"internalAPIServerDNSConfig,omitempty"`

// IngressDNSConfig contains information to configure DNS for cluster services.
// This field will be set only when the userConfiguredDNS feature is enabled.
IngressDNSConfig []DNSConfig `json:"ingressDNSConfig,omitempty"`
}


type DNSConfig struct {
// recordType is the DNS record type.
RecordType string `json:"recordType"`

// lBIPAddress is the Load Balancer IP address for DNS config
LBIPAddress string `json:"lbIPAddress"`
}

```

### Implementation Details/Notes/Constraints [optional]


Expand Down

0 comments on commit c8d87d0

Please sign in to comment.