From 56640e95c9ecfd984eb6a80134991e4cc1cc3b98 Mon Sep 17 00:00:00 2001 From: Brent Barbachem Date: Thu, 28 Sep 2023 10:02:39 -0400 Subject: [PATCH] Add configuration options for custom DNS work. The work relates to the enhancement https://github.com/openshift/enhancements/pull/1468. The AWS, Azure, and GCP platform status structs are updated to include custom DNS options. The internal and external load balancer ip addresses as well as the types of dns records make up the base of the data.y --- ...01_infrastructure-CustomNoUpgrade.crd.yaml | 117 ++++++++++ ...perator_01_infrastructure-Default.crd.yaml | 117 ++++++++++ ...frastructure-TechPreviewNoUpgrade.crd.yaml | 117 ++++++++++ config/v1/feature_gates.go | 30 +++ config/v1/types_feature.go | 3 + config/v1/types_infrastructure.go | 49 +++- config/v1/zz_generated.deepcopy.go | 50 ++++ .../v1/zz_generated.swagger_doc_generated.go | 21 ++ .../generated_openapi/zz_generated.openapi.go | 221 +++++++++++++++++- openapi/openapi.json | 122 ++++++++++ 10 files changed, 838 insertions(+), 9 deletions(-) diff --git a/config/v1/0000_10_config-operator_01_infrastructure-CustomNoUpgrade.crd.yaml b/config/v1/0000_10_config-operator_01_infrastructure-CustomNoUpgrade.crd.yaml index 1b96b19c7ee..7f28005ef5b 100644 --- a/config/v1/0000_10_config-operator_01_infrastructure-CustomNoUpgrade.crd.yaml +++ b/config/v1/0000_10_config-operator_01_infrastructure-CustomNoUpgrade.crd.yaml @@ -466,6 +466,45 @@ spec: aws: description: AWS contains settings specific to the Amazon Web Services infrastructure provider. properties: + apiServerDNSConfig: + description: APIServerDNSConfig contains information to configure DNS for API Server. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array + ingressDNSConfig: + description: IngressDNSConfig contains information to configure DNS for cluster services. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array + internalAPIServerDNSConfig: + description: InternalAPIServerDNSConfig contains information to configure DNS for the Internal API Server. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array region: description: region holds the default AWS region for new AWS resources created by the cluster. type: string @@ -511,6 +550,19 @@ spec: azure: description: Azure contains settings specific to the Azure infrastructure provider. properties: + apiServerDNSConfig: + description: APIServerDNSConfig contains information to configure DNS for API Server. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array armEndpoint: description: armEndpoint specifies a URL to use for resource management in non-soverign clouds such as Azure Stack. type: string @@ -524,6 +576,32 @@ spec: - AzureGermanCloud - AzureStackCloud type: string + ingressDNSConfig: + description: IngressDNSConfig contains information to configure DNS for cluster services. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array + internalAPIServerDNSConfig: + description: InternalAPIServerDNSConfig contains information to configure DNS for the Internal API Server. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array networkResourceGroupName: description: networkResourceGroupName is the Resource Group for network resources like the Virtual Network and Subnets used by the cluster. If empty, the value is same as ResourceGroupName. type: string @@ -640,6 +718,45 @@ spec: gcp: description: GCP contains settings specific to the Google Cloud Platform infrastructure provider. properties: + apiServerDNSConfig: + description: APIServerDNSConfig contains information to configure DNS for API Server. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array + ingressDNSConfig: + description: IngressDNSConfig contains information to configure DNS for cluster services. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array + internalAPIServerDNSConfig: + description: InternalAPIServerDNSConfig contains information to configure DNS for the Internal API Server. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array projectID: description: resourceGroupName is the Project ID for new GCP resources created for the cluster. type: string diff --git a/config/v1/0000_10_config-operator_01_infrastructure-Default.crd.yaml b/config/v1/0000_10_config-operator_01_infrastructure-Default.crd.yaml index 8e580630984..332b12e6524 100644 --- a/config/v1/0000_10_config-operator_01_infrastructure-Default.crd.yaml +++ b/config/v1/0000_10_config-operator_01_infrastructure-Default.crd.yaml @@ -466,6 +466,45 @@ spec: aws: description: AWS contains settings specific to the Amazon Web Services infrastructure provider. properties: + apiServerDNSConfig: + description: APIServerDNSConfig contains information to configure DNS for API Server. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array + ingressDNSConfig: + description: IngressDNSConfig contains information to configure DNS for cluster services. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array + internalAPIServerDNSConfig: + description: InternalAPIServerDNSConfig contains information to configure DNS for the Internal API Server. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array region: description: region holds the default AWS region for new AWS resources created by the cluster. type: string @@ -511,6 +550,19 @@ spec: azure: description: Azure contains settings specific to the Azure infrastructure provider. properties: + apiServerDNSConfig: + description: APIServerDNSConfig contains information to configure DNS for API Server. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array armEndpoint: description: armEndpoint specifies a URL to use for resource management in non-soverign clouds such as Azure Stack. type: string @@ -524,6 +576,32 @@ spec: - AzureGermanCloud - AzureStackCloud type: string + ingressDNSConfig: + description: IngressDNSConfig contains information to configure DNS for cluster services. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array + internalAPIServerDNSConfig: + description: InternalAPIServerDNSConfig contains information to configure DNS for the Internal API Server. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array networkResourceGroupName: description: networkResourceGroupName is the Resource Group for network resources like the Virtual Network and Subnets used by the cluster. If empty, the value is same as ResourceGroupName. type: string @@ -624,6 +702,45 @@ spec: gcp: description: GCP contains settings specific to the Google Cloud Platform infrastructure provider. properties: + apiServerDNSConfig: + description: APIServerDNSConfig contains information to configure DNS for API Server. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array + ingressDNSConfig: + description: IngressDNSConfig contains information to configure DNS for cluster services. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array + internalAPIServerDNSConfig: + description: InternalAPIServerDNSConfig contains information to configure DNS for the Internal API Server. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array projectID: description: resourceGroupName is the Project ID for new GCP resources created for the cluster. type: string diff --git a/config/v1/0000_10_config-operator_01_infrastructure-TechPreviewNoUpgrade.crd.yaml b/config/v1/0000_10_config-operator_01_infrastructure-TechPreviewNoUpgrade.crd.yaml index 1b84d0ae6fe..d4c4833b9dd 100644 --- a/config/v1/0000_10_config-operator_01_infrastructure-TechPreviewNoUpgrade.crd.yaml +++ b/config/v1/0000_10_config-operator_01_infrastructure-TechPreviewNoUpgrade.crd.yaml @@ -466,6 +466,45 @@ spec: aws: description: AWS contains settings specific to the Amazon Web Services infrastructure provider. properties: + apiServerDNSConfig: + description: APIServerDNSConfig contains information to configure DNS for API Server. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array + ingressDNSConfig: + description: IngressDNSConfig contains information to configure DNS for cluster services. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array + internalAPIServerDNSConfig: + description: InternalAPIServerDNSConfig contains information to configure DNS for the Internal API Server. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array region: description: region holds the default AWS region for new AWS resources created by the cluster. type: string @@ -511,6 +550,19 @@ spec: azure: description: Azure contains settings specific to the Azure infrastructure provider. properties: + apiServerDNSConfig: + description: APIServerDNSConfig contains information to configure DNS for API Server. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array armEndpoint: description: armEndpoint specifies a URL to use for resource management in non-soverign clouds such as Azure Stack. type: string @@ -524,6 +576,32 @@ spec: - AzureGermanCloud - AzureStackCloud type: string + ingressDNSConfig: + description: IngressDNSConfig contains information to configure DNS for cluster services. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array + internalAPIServerDNSConfig: + description: InternalAPIServerDNSConfig contains information to configure DNS for the Internal API Server. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array networkResourceGroupName: description: networkResourceGroupName is the Resource Group for network resources like the Virtual Network and Subnets used by the cluster. If empty, the value is same as ResourceGroupName. type: string @@ -640,6 +718,45 @@ spec: gcp: description: GCP contains settings specific to the Google Cloud Platform infrastructure provider. properties: + apiServerDNSConfig: + description: APIServerDNSConfig contains information to configure DNS for API Server. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array + ingressDNSConfig: + description: IngressDNSConfig contains information to configure DNS for cluster services. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array + internalAPIServerDNSConfig: + description: InternalAPIServerDNSConfig contains information to configure DNS for the Internal API Server. This field will be set only when the userConfiguredDNS feature is enabled. + items: + description: DNSConfig store the load balancer ip addresses and the type of DNS record. + properties: + lbIPAddress: + description: LBIPAddress is the Load Balancer IP address for DNS config + type: string + recordType: + description: RecordType is the DNS record type. + type: string + type: object + type: array projectID: description: resourceGroupName is the Project ID for new GCP resources created for the cluster. type: string diff --git a/config/v1/feature_gates.go b/config/v1/feature_gates.go index 1aa6b41ce1f..b0099ab6d56 100644 --- a/config/v1/feature_gates.go +++ b/config/v1/feature_gates.go @@ -301,4 +301,34 @@ var ( ResponsiblePerson: "msluiter", OwningProduct: ocpSpecific, } + + FeatureGateCustomDNSAWS = FeatureGateName("CustomDNSAWS") + customDNSAWS = FeatureGateDescription{ + FeatureGateAttributes: FeatureGateAttributes{ + Name: FeatureGateCustomDNSAWS, + }, + OwningJiraComponent: "installer", + ResponsiblePerson: "barbacbd", + OwningProduct: ocpSpecific, + } + + FeatureGateCustomDNSAZ = FeatureGateName("CustomDNSAZ") + customDNSAZ = FeatureGateDescription{ + FeatureGateAttributes: FeatureGateAttributes{ + Name: FeatureGateCustomDNSAZ, + }, + OwningJiraComponent: "installer", + ResponsiblePerson: "barbacbd", + OwningProduct: ocpSpecific, + } + + FeatureGateCustomDNSGCP = FeatureGateName("CustomDNSGCP") + customDNSGCP = FeatureGateDescription{ + FeatureGateAttributes: FeatureGateAttributes{ + Name: FeatureGateCustomDNSGCP, + }, + OwningJiraComponent: "installer", + ResponsiblePerson: "barbacbd", + OwningProduct: ocpSpecific, + } ) diff --git a/config/v1/types_feature.go b/config/v1/types_feature.go index 47ebe18b42d..b497a234eac 100644 --- a/config/v1/types_feature.go +++ b/config/v1/types_feature.go @@ -182,6 +182,9 @@ var FeatureSets = map[FeatureSet]*FeatureGateEnabledDisabled{ with(routeExternalCertificate). with(automatedEtcdBackup). without(machineAPIOperatorDisableMachineHealthCheckController). + with(customDNSAWS). + with(customDNSAZ). + with(customDNSGCP). with(adminNetworkPolicy). toFeatures(defaultFeatures), LatencySensitive: newDefaultFeatures(). diff --git a/config/v1/types_infrastructure.go b/config/v1/types_infrastructure.go index 18d36519d15..5695a32d5a9 100644 --- a/config/v1/types_infrastructure.go +++ b/config/v1/types_infrastructure.go @@ -431,6 +431,31 @@ type PlatformStatus struct { External *ExternalPlatformStatus `json:"external,omitempty"` } +// DNSConfig store the load balancer ip addresses and the type of DNS record. +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"` +} + +// ClusterDNSConfig store the DNS configuration data related to internal and external API servers as +// well as ingress. +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"` +} + // AWSServiceEndpoint store the configuration of a custom url to // override existing defaults of AWS Services. type AWSServiceEndpoint struct { @@ -461,6 +486,10 @@ type AWSPlatformSpec struct { // AWSPlatformStatus holds the current status of the Amazon Web Services infrastructure provider. type AWSPlatformStatus struct { + // ClusterDNSConfig contains all the DNS configuration required to configure a custom DNS solution. + // +optional + ClusterDNSConfig `json:",inline"` + // region holds the default AWS region for new AWS resources created by the cluster. Region string `json:"region"` @@ -506,6 +535,10 @@ type AzurePlatformSpec struct{} // AzurePlatformStatus holds the current status of the Azure infrastructure provider. // +kubebuilder:validation:XValidation:rule="!has(oldSelf.resourceTags) && !has(self.resourceTags) || has(oldSelf.resourceTags) && has(self.resourceTags)",message="resourceTags may only be configured during installation" type AzurePlatformStatus struct { + // ClusterDNSConfig contains all the DNS configuration required to configure a custom DNS solution. + // +optional + ClusterDNSConfig `json:",inline"` + // resourceGroupName is the Resource Group for new Azure resources created for the cluster. ResourceGroupName string `json:"resourceGroupName"` @@ -582,6 +615,10 @@ type GCPPlatformSpec struct{} // +openshift:validation:FeatureSetAwareXValidation:featureSet=CustomNoUpgrade;TechPreviewNoUpgrade,rule="!has(oldSelf.resourceLabels) && !has(self.resourceLabels) || has(oldSelf.resourceLabels) && has(self.resourceLabels)",message="resourceLabels may only be configured during installation" // +openshift:validation:FeatureSetAwareXValidation:featureSet=CustomNoUpgrade;TechPreviewNoUpgrade,rule="!has(oldSelf.resourceTags) && !has(self.resourceTags) || has(oldSelf.resourceTags) && has(self.resourceTags)",message="resourceTags may only be configured during installation" type GCPPlatformStatus struct { + // ClusterDNSConfig contains all the DNS configuration required to configure a custom DNS solution. + // +optional + ClusterDNSConfig `json:",inline"` + // resourceGroupName is the Project ID for new GCP resources created for the cluster. ProjectID string `json:"projectID"` @@ -1209,13 +1246,13 @@ type IBMCloudPlatformStatus struct { // for the cluster's base domain DNSInstanceCRN string `json:"dnsInstanceCRN,omitempty"` - // serviceEndpoints is a list of custom endpoints which will override the default - // service endpoints of an IBM Cloud service. These endpoints are consumed by + // serviceEndpoints is a list of custom endpoints which will override the default + // service endpoints of an IBM Cloud service. These endpoints are consumed by // components within the cluster to reach the respective IBM Cloud Services. - // +listType=map - // +listMapKey=name - // +optional - ServiceEndpoints []IBMCloudServiceEndpoint `json:"serviceEndpoints,omitempty"` + // +listType=map + // +listMapKey=name + // +optional + ServiceEndpoints []IBMCloudServiceEndpoint `json:"serviceEndpoints,omitempty"` } // KubevirtPlatformSpec holds the desired state of the kubevirt infrastructure provider. diff --git a/config/v1/zz_generated.deepcopy.go b/config/v1/zz_generated.deepcopy.go index 63b9f050d00..0b69c871d95 100644 --- a/config/v1/zz_generated.deepcopy.go +++ b/config/v1/zz_generated.deepcopy.go @@ -235,6 +235,7 @@ func (in *AWSPlatformSpec) DeepCopy() *AWSPlatformSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AWSPlatformStatus) DeepCopyInto(out *AWSPlatformStatus) { *out = *in + in.ClusterDNSConfig.DeepCopyInto(&out.ClusterDNSConfig) if in.ServiceEndpoints != nil { in, out := &in.ServiceEndpoints, &out.ServiceEndpoints *out = make([]AWSServiceEndpoint, len(*in)) @@ -571,6 +572,7 @@ func (in *AzurePlatformSpec) DeepCopy() *AzurePlatformSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AzurePlatformStatus) DeepCopyInto(out *AzurePlatformStatus) { *out = *in + in.ClusterDNSConfig.DeepCopyInto(&out.ClusterDNSConfig) if in.ResourceTags != nil { in, out := &in.ResourceTags, &out.ResourceTags *out = make([]AzureResourceTag, len(*in)) @@ -912,6 +914,37 @@ func (in *ClusterCondition) DeepCopy() *ClusterCondition { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterDNSConfig) DeepCopyInto(out *ClusterDNSConfig) { + *out = *in + if in.APIServerDNSConfig != nil { + in, out := &in.APIServerDNSConfig, &out.APIServerDNSConfig + *out = make([]DNSConfig, len(*in)) + copy(*out, *in) + } + if in.InternalAPIServerDNSConfig != nil { + in, out := &in.InternalAPIServerDNSConfig, &out.InternalAPIServerDNSConfig + *out = make([]DNSConfig, len(*in)) + copy(*out, *in) + } + if in.IngressDNSConfig != nil { + in, out := &in.IngressDNSConfig, &out.IngressDNSConfig + *out = make([]DNSConfig, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDNSConfig. +func (in *ClusterDNSConfig) DeepCopy() *ClusterDNSConfig { + if in == nil { + return nil + } + out := new(ClusterDNSConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterNetworkEntry) DeepCopyInto(out *ClusterNetworkEntry) { *out = *in @@ -1579,6 +1612,22 @@ func (in *DNS) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DNSConfig) DeepCopyInto(out *DNSConfig) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSConfig. +func (in *DNSConfig) DeepCopy() *DNSConfig { + if in == nil { + return nil + } + out := new(DNSConfig) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DNSList) DeepCopyInto(out *DNSList) { *out = *in @@ -2137,6 +2186,7 @@ func (in *GCPPlatformSpec) DeepCopy() *GCPPlatformSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GCPPlatformStatus) DeepCopyInto(out *GCPPlatformStatus) { *out = *in + in.ClusterDNSConfig.DeepCopyInto(&out.ClusterDNSConfig) if in.ResourceLabels != nil { in, out := &in.ResourceLabels, &out.ResourceLabels *out = make([]GCPResourceLabel, len(*in)) diff --git a/config/v1/zz_generated.swagger_doc_generated.go b/config/v1/zz_generated.swagger_doc_generated.go index 048c37b16fc..705bb9096af 100644 --- a/config/v1/zz_generated.swagger_doc_generated.go +++ b/config/v1/zz_generated.swagger_doc_generated.go @@ -1192,6 +1192,27 @@ func (CloudControllerManagerStatus) SwaggerDoc() map[string]string { return map_CloudControllerManagerStatus } +var map_ClusterDNSConfig = map[string]string{ + "": "ClusterDNSConfig store the DNS configuration data related to internal and external API servers as well as ingress.", + "apiServerDNSConfig": "APIServerDNSConfig contains information to configure DNS for API Server. This field will be set only when the userConfiguredDNS feature is enabled.", + "internalAPIServerDNSConfig": "InternalAPIServerDNSConfig contains information to configure DNS for the Internal API Server. This field will be set only when the userConfiguredDNS feature is enabled.", + "ingressDNSConfig": "IngressDNSConfig contains information to configure DNS for cluster services. This field will be set only when the userConfiguredDNS feature is enabled.", +} + +func (ClusterDNSConfig) SwaggerDoc() map[string]string { + return map_ClusterDNSConfig +} + +var map_DNSConfig = map[string]string{ + "": "DNSConfig store the load balancer ip addresses and the type of DNS record.", + "recordType": "RecordType is the DNS record type.", + "lbIPAddress": "LBIPAddress is the Load Balancer IP address for DNS config", +} + +func (DNSConfig) SwaggerDoc() map[string]string { + return map_DNSConfig +} + var map_EquinixMetalPlatformSpec = map[string]string{ "": "EquinixMetalPlatformSpec holds the desired state of the Equinix Metal infrastructure provider. This only includes fields that can be modified in the cluster.", } diff --git a/openapi/generated_openapi/zz_generated.openapi.go b/openapi/generated_openapi/zz_generated.openapi.go index 080881954da..646e8d1d8ef 100644 --- a/openapi/generated_openapi/zz_generated.openapi.go +++ b/openapi/generated_openapi/zz_generated.openapi.go @@ -183,6 +183,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/openshift/api/config/v1.ClientConnectionOverrides": schema_openshift_api_config_v1_ClientConnectionOverrides(ref), "github.com/openshift/api/config/v1.CloudControllerManagerStatus": schema_openshift_api_config_v1_CloudControllerManagerStatus(ref), "github.com/openshift/api/config/v1.ClusterCondition": schema_openshift_api_config_v1_ClusterCondition(ref), + "github.com/openshift/api/config/v1.ClusterDNSConfig": schema_openshift_api_config_v1_ClusterDNSConfig(ref), "github.com/openshift/api/config/v1.ClusterNetworkEntry": schema_openshift_api_config_v1_ClusterNetworkEntry(ref), "github.com/openshift/api/config/v1.ClusterOperator": schema_openshift_api_config_v1_ClusterOperator(ref), "github.com/openshift/api/config/v1.ClusterOperatorList": schema_openshift_api_config_v1_ClusterOperatorList(ref), @@ -210,6 +211,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/openshift/api/config/v1.CustomFeatureGates": schema_openshift_api_config_v1_CustomFeatureGates(ref), "github.com/openshift/api/config/v1.CustomTLSProfile": schema_openshift_api_config_v1_CustomTLSProfile(ref), "github.com/openshift/api/config/v1.DNS": schema_openshift_api_config_v1_DNS(ref), + "github.com/openshift/api/config/v1.DNSConfig": schema_openshift_api_config_v1_DNSConfig(ref), "github.com/openshift/api/config/v1.DNSList": schema_openshift_api_config_v1_DNSList(ref), "github.com/openshift/api/config/v1.DNSPlatformSpec": schema_openshift_api_config_v1_DNSPlatformSpec(ref), "github.com/openshift/api/config/v1.DNSSpec": schema_openshift_api_config_v1_DNSSpec(ref), @@ -8407,6 +8409,48 @@ func schema_openshift_api_config_v1_AWSPlatformStatus(ref common.ReferenceCallba Description: "AWSPlatformStatus holds the current status of the Amazon Web Services infrastructure provider.", Type: []string{"object"}, Properties: map[string]spec.Schema{ + "apiServerDNSConfig": { + SchemaProps: spec.SchemaProps{ + Description: "APIServerDNSConfig contains information to configure DNS for API Server. This field will be set only when the userConfiguredDNS feature is enabled.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1.DNSConfig"), + }, + }, + }, + }, + }, + "internalAPIServerDNSConfig": { + SchemaProps: spec.SchemaProps{ + Description: "InternalAPIServerDNSConfig contains information to configure DNS for the Internal API Server. This field will be set only when the userConfiguredDNS feature is enabled.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1.DNSConfig"), + }, + }, + }, + }, + }, + "ingressDNSConfig": { + SchemaProps: spec.SchemaProps{ + Description: "IngressDNSConfig contains information to configure DNS for cluster services. This field will be set only when the userConfiguredDNS feature is enabled.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1.DNSConfig"), + }, + }, + }, + }, + }, "region": { SchemaProps: spec.SchemaProps{ Description: "region holds the default AWS region for new AWS resources created by the cluster.", @@ -8448,7 +8492,7 @@ func schema_openshift_api_config_v1_AWSPlatformStatus(ref common.ReferenceCallba }, }, Dependencies: []string{ - "github.com/openshift/api/config/v1.AWSResourceTag", "github.com/openshift/api/config/v1.AWSServiceEndpoint"}, + "github.com/openshift/api/config/v1.AWSResourceTag", "github.com/openshift/api/config/v1.AWSServiceEndpoint", "github.com/openshift/api/config/v1.DNSConfig"}, } } @@ -9060,6 +9104,48 @@ func schema_openshift_api_config_v1_AzurePlatformStatus(ref common.ReferenceCall Description: "AzurePlatformStatus holds the current status of the Azure infrastructure provider.", Type: []string{"object"}, Properties: map[string]spec.Schema{ + "apiServerDNSConfig": { + SchemaProps: spec.SchemaProps{ + Description: "APIServerDNSConfig contains information to configure DNS for API Server. This field will be set only when the userConfiguredDNS feature is enabled.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1.DNSConfig"), + }, + }, + }, + }, + }, + "internalAPIServerDNSConfig": { + SchemaProps: spec.SchemaProps{ + Description: "InternalAPIServerDNSConfig contains information to configure DNS for the Internal API Server. This field will be set only when the userConfiguredDNS feature is enabled.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1.DNSConfig"), + }, + }, + }, + }, + }, + "ingressDNSConfig": { + SchemaProps: spec.SchemaProps{ + Description: "IngressDNSConfig contains information to configure DNS for cluster services. This field will be set only when the userConfiguredDNS feature is enabled.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1.DNSConfig"), + }, + }, + }, + }, + }, "resourceGroupName": { SchemaProps: spec.SchemaProps{ Description: "resourceGroupName is the Resource Group for new Azure resources created for the cluster.", @@ -9108,7 +9194,7 @@ func schema_openshift_api_config_v1_AzurePlatformStatus(ref common.ReferenceCall }, }, Dependencies: []string{ - "github.com/openshift/api/config/v1.AzureResourceTag"}, + "github.com/openshift/api/config/v1.AzureResourceTag", "github.com/openshift/api/config/v1.DNSConfig"}, } } @@ -9684,6 +9770,63 @@ func schema_openshift_api_config_v1_ClusterCondition(ref common.ReferenceCallbac } } +func schema_openshift_api_config_v1_ClusterDNSConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterDNSConfig store the DNS configuration data related to internal and external API servers as well as ingress.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "apiServerDNSConfig": { + SchemaProps: spec.SchemaProps{ + Description: "APIServerDNSConfig contains information to configure DNS for API Server. This field will be set only when the userConfiguredDNS feature is enabled.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1.DNSConfig"), + }, + }, + }, + }, + }, + "internalAPIServerDNSConfig": { + SchemaProps: spec.SchemaProps{ + Description: "InternalAPIServerDNSConfig contains information to configure DNS for the Internal API Server. This field will be set only when the userConfiguredDNS feature is enabled.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1.DNSConfig"), + }, + }, + }, + }, + }, + "ingressDNSConfig": { + SchemaProps: spec.SchemaProps{ + Description: "IngressDNSConfig contains information to configure DNS for cluster services. This field will be set only when the userConfiguredDNS feature is enabled.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1.DNSConfig"), + }, + }, + }, + }, + }, + }, + }, + }, + Dependencies: []string{ + "github.com/openshift/api/config/v1.DNSConfig"}, + } +} + func schema_openshift_api_config_v1_ClusterNetworkEntry(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -10994,6 +11137,36 @@ func schema_openshift_api_config_v1_DNS(ref common.ReferenceCallback) common.Ope } } +func schema_openshift_api_config_v1_DNSConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "DNSConfig store the load balancer ip addresses and the type of DNS record.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "recordType": { + SchemaProps: spec.SchemaProps{ + Description: "RecordType is the DNS record type.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "lbIPAddress": { + SchemaProps: spec.SchemaProps{ + Description: "LBIPAddress is the Load Balancer IP address for DNS config", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"recordType", "lbIPAddress"}, + }, + }, + } +} + func schema_openshift_api_config_v1_DNSList(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -11926,6 +12099,48 @@ func schema_openshift_api_config_v1_GCPPlatformStatus(ref common.ReferenceCallba Description: "GCPPlatformStatus holds the current status of the Google Cloud Platform infrastructure provider.", Type: []string{"object"}, Properties: map[string]spec.Schema{ + "apiServerDNSConfig": { + SchemaProps: spec.SchemaProps{ + Description: "APIServerDNSConfig contains information to configure DNS for API Server. This field will be set only when the userConfiguredDNS feature is enabled.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1.DNSConfig"), + }, + }, + }, + }, + }, + "internalAPIServerDNSConfig": { + SchemaProps: spec.SchemaProps{ + Description: "InternalAPIServerDNSConfig contains information to configure DNS for the Internal API Server. This field will be set only when the userConfiguredDNS feature is enabled.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1.DNSConfig"), + }, + }, + }, + }, + }, + "ingressDNSConfig": { + SchemaProps: spec.SchemaProps{ + Description: "IngressDNSConfig contains information to configure DNS for cluster services. This field will be set only when the userConfiguredDNS feature is enabled.", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/openshift/api/config/v1.DNSConfig"), + }, + }, + }, + }, + }, "projectID": { SchemaProps: spec.SchemaProps{ Description: "resourceGroupName is the Project ID for new GCP resources created for the cluster.", @@ -11991,7 +12206,7 @@ func schema_openshift_api_config_v1_GCPPlatformStatus(ref common.ReferenceCallba }, }, Dependencies: []string{ - "github.com/openshift/api/config/v1.GCPResourceLabel", "github.com/openshift/api/config/v1.GCPResourceTag"}, + "github.com/openshift/api/config/v1.DNSConfig", "github.com/openshift/api/config/v1.GCPResourceLabel", "github.com/openshift/api/config/v1.GCPResourceTag"}, } } diff --git a/openapi/openapi.json b/openapi/openapi.json index 6e85cae1c21..5601f75cf18 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -4170,6 +4170,30 @@ "region" ], "properties": { + "apiServerDNSConfig": { + "description": "APIServerDNSConfig contains information to configure DNS for API Server. This field will be set only when the userConfiguredDNS feature is enabled.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.config.v1.DNSConfig" + } + }, + "ingressDNSConfig": { + "description": "IngressDNSConfig contains information to configure DNS for cluster services. This field will be set only when the userConfiguredDNS feature is enabled.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.config.v1.DNSConfig" + } + }, + "internalAPIServerDNSConfig": { + "description": "InternalAPIServerDNSConfig contains information to configure DNS for the Internal API Server. This field will be set only when the userConfiguredDNS feature is enabled.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.config.v1.DNSConfig" + } + }, "region": { "description": "region holds the default AWS region for new AWS resources created by the cluster.", "type": "string", @@ -4563,6 +4587,14 @@ "resourceGroupName" ], "properties": { + "apiServerDNSConfig": { + "description": "APIServerDNSConfig contains information to configure DNS for API Server. This field will be set only when the userConfiguredDNS feature is enabled.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.config.v1.DNSConfig" + } + }, "armEndpoint": { "description": "armEndpoint specifies a URL to use for resource management in non-soverign clouds such as Azure Stack.", "type": "string" @@ -4571,6 +4603,22 @@ "description": "cloudName is the name of the Azure cloud environment which can be used to configure the Azure SDK with the appropriate Azure API endpoints. If empty, the value is equal to `AzurePublicCloud`.", "type": "string" }, + "ingressDNSConfig": { + "description": "IngressDNSConfig contains information to configure DNS for cluster services. This field will be set only when the userConfiguredDNS feature is enabled.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.config.v1.DNSConfig" + } + }, + "internalAPIServerDNSConfig": { + "description": "InternalAPIServerDNSConfig contains information to configure DNS for the Internal API Server. This field will be set only when the userConfiguredDNS feature is enabled.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.config.v1.DNSConfig" + } + }, "networkResourceGroupName": { "description": "networkResourceGroupName is the Resource Group for network resources like the Virtual Network and Subnets used by the cluster. If empty, the value is same as ResourceGroupName.", "type": "string" @@ -4931,6 +4979,36 @@ } } }, + "com.github.openshift.api.config.v1.ClusterDNSConfig": { + "description": "ClusterDNSConfig store the DNS configuration data related to internal and external API servers as well as ingress.", + "type": "object", + "properties": { + "apiServerDNSConfig": { + "description": "APIServerDNSConfig contains information to configure DNS for API Server. This field will be set only when the userConfiguredDNS feature is enabled.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.config.v1.DNSConfig" + } + }, + "ingressDNSConfig": { + "description": "IngressDNSConfig contains information to configure DNS for cluster services. This field will be set only when the userConfiguredDNS feature is enabled.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.config.v1.DNSConfig" + } + }, + "internalAPIServerDNSConfig": { + "description": "InternalAPIServerDNSConfig contains information to configure DNS for the Internal API Server. This field will be set only when the userConfiguredDNS feature is enabled.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.config.v1.DNSConfig" + } + } + } + }, "com.github.openshift.api.config.v1.ClusterNetworkEntry": { "description": "ClusterNetworkEntry is a contiguous block of IP addresses from which pod IPs are allocated.", "type": "object", @@ -5712,6 +5790,26 @@ } } }, + "com.github.openshift.api.config.v1.DNSConfig": { + "description": "DNSConfig store the load balancer ip addresses and the type of DNS record.", + "type": "object", + "required": [ + "recordType", + "lbIPAddress" + ], + "properties": { + "lbIPAddress": { + "description": "LBIPAddress is the Load Balancer IP address for DNS config", + "type": "string", + "default": "" + }, + "recordType": { + "description": "RecordType is the DNS record type.", + "type": "string", + "default": "" + } + } + }, "com.github.openshift.api.config.v1.DNSList": { "description": "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "type": "object", @@ -6247,6 +6345,30 @@ "region" ], "properties": { + "apiServerDNSConfig": { + "description": "APIServerDNSConfig contains information to configure DNS for API Server. This field will be set only when the userConfiguredDNS feature is enabled.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.config.v1.DNSConfig" + } + }, + "ingressDNSConfig": { + "description": "IngressDNSConfig contains information to configure DNS for cluster services. This field will be set only when the userConfiguredDNS feature is enabled.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.config.v1.DNSConfig" + } + }, + "internalAPIServerDNSConfig": { + "description": "InternalAPIServerDNSConfig contains information to configure DNS for the Internal API Server. This field will be set only when the userConfiguredDNS feature is enabled.", + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.config.v1.DNSConfig" + } + }, "projectID": { "description": "resourceGroupName is the Project ID for new GCP resources created for the cluster.", "type": "string",