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 366aaa6
Showing 1 changed file with 66 additions and 9 deletions.
@@ -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 @@ -284,19 +299,61 @@ Infrastructure CR. Here is the update for platform AWS.
// AWSPlatformSpec holds the desired state of the Amazon Web Services infrastructure provider.
// This only includes fields that can be modified in the cluster.
type AWSPlatformSpec struct {
// serviceEndpoints list contains custom endpoints which will override default
// service endpoint of AWS Services.
// There must be only one ServiceEndpoint for a service.
// +optional
ServiceEndpoints []AWSServiceEndpoint `json:"serviceEndpoints,omitempty"`
// serviceEndpoints list contains custom endpoints which will override default
// service endpoint of AWS Services.
// There must be only one ServiceEndpoint for a service.
// +optional
ServiceEndpoints []AWSServiceEndpoint `json:"serviceEndpoints,omitempty"`

// customDNS indicates if the customer is providing their own DNS
// solution inplace of the default provided by the underlying platform.
// Its value is set by the Installer and can have 2 possible values:
// "Enabled" and "Disabled" with "Disabled" being the default.
// Its value is set by the Installer and can have 2 possible values:
// "Enabled" and "Disabled" with "Disabled" being the default.
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 366aaa6

Please sign in to comment.