diff --git a/enhancements/installer/aws-custom-dns.md b/enhancements/installer/cloud-custom-dns.md similarity index 91% rename from enhancements/installer/aws-custom-dns.md rename to enhancements/installer/cloud-custom-dns.md index f7de151d717..f0555641820 100644 --- a/enhancements/installer/aws-custom-dns.md +++ b/enhancements/installer/cloud-custom-dns.md @@ -1,5 +1,5 @@ --- -title: custom-dns +title: cloud-custom-dns authors: - "@sadasu" reviewers: @@ -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 @@ -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: @@ -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 { + + // AWSClusterDNSConfig contains all the DNS config required to configure a custom DNS solution. + // +optional + AWSClusterDNSConfig *ClusterDNSConfig `json:"awsClusterDNSConfig,omitempty"` + + + +} + +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]