Skip to content

Commit cf9b979

Browse files
committed
Add DNS config for API, API-Int and Ingress to AWSPlatformStatus
Add DNS record types and LB IP adresses for API, API-Int and Ingress to the AWSPlatformStatus when the userConfiguredDNS feature is enabled. These values would be used to configure the in-cluster DNS and after cluster install would be available to the user to configure their custom DNS solution.
1 parent 6913000 commit cf9b979

7 files changed

+372
-5
lines changed

config/v1/0000_10_config-operator_01_infrastructure-Default.crd.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,64 @@ spec:
459459
aws:
460460
description: AWS contains settings specific to the Amazon Web Services infrastructure provider.
461461
properties:
462+
awsClusterDNSConfig:
463+
description: AWSClusterDNSConfig contains all the DNS config required to configure a custom DNS solution. This field will be set only when the userConfiguredDNS feature is enabled.
464+
properties:
465+
apiServerDNSConfig:
466+
description: APIServerDNSConfig contains DNS configuration for the API Server.
467+
items:
468+
description: DNSConfig contains the LB IP and DNS Record type to configure a DNS entry.
469+
properties:
470+
lbIPAddress:
471+
description: lBIPAddress is the Load Balancer IP address for DNS config
472+
format: ip
473+
type: string
474+
recordType:
475+
description: recordType is the DNS record type.
476+
pattern: ^[A-Za-z]+$
477+
type: string
478+
required:
479+
- lbIPAddress
480+
- recordType
481+
type: object
482+
type: array
483+
ingressDNSConfig:
484+
description: IngressDNSConfig contains DNS configuration for cluster services.
485+
items:
486+
description: DNSConfig contains the LB IP and DNS Record type to configure a DNS entry.
487+
properties:
488+
lbIPAddress:
489+
description: lBIPAddress is the Load Balancer IP address for DNS config
490+
format: ip
491+
type: string
492+
recordType:
493+
description: recordType is the DNS record type.
494+
pattern: ^[A-Za-z]+$
495+
type: string
496+
required:
497+
- lbIPAddress
498+
- recordType
499+
type: object
500+
type: array
501+
internalAPIServerDNSConfig:
502+
description: InternalAPIServerDNSConfig contains DNS configuration for the Internal API Server.
503+
items:
504+
description: DNSConfig contains the LB IP and DNS Record type to configure a DNS entry.
505+
properties:
506+
lbIPAddress:
507+
description: lBIPAddress is the Load Balancer IP address for DNS config
508+
format: ip
509+
type: string
510+
recordType:
511+
description: recordType is the DNS record type.
512+
pattern: ^[A-Za-z]+$
513+
type: string
514+
required:
515+
- lbIPAddress
516+
- recordType
517+
type: object
518+
type: array
519+
type: object
462520
region:
463521
description: region holds the default AWS region for new AWS resources created by the cluster.
464522
type: string

config/v1/0000_10_config-operator_01_infrastructure-TechPreviewNoUpgrade.crd.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,64 @@ spec:
466466
aws:
467467
description: AWS contains settings specific to the Amazon Web Services infrastructure provider.
468468
properties:
469+
awsClusterDNSConfig:
470+
description: AWSClusterDNSConfig contains all the DNS config required to configure a custom DNS solution. This field will be set only when the userConfiguredDNS feature is enabled.
471+
properties:
472+
apiServerDNSConfig:
473+
description: APIServerDNSConfig contains DNS configuration for the API Server.
474+
items:
475+
description: DNSConfig contains the LB IP and DNS Record type to configure a DNS entry.
476+
properties:
477+
lbIPAddress:
478+
description: lBIPAddress is the Load Balancer IP address for DNS config
479+
format: ip
480+
type: string
481+
recordType:
482+
description: recordType is the DNS record type.
483+
pattern: ^[A-Za-z]+$
484+
type: string
485+
required:
486+
- lbIPAddress
487+
- recordType
488+
type: object
489+
type: array
490+
ingressDNSConfig:
491+
description: IngressDNSConfig contains DNS configuration for cluster services.
492+
items:
493+
description: DNSConfig contains the LB IP and DNS Record type to configure a DNS entry.
494+
properties:
495+
lbIPAddress:
496+
description: lBIPAddress is the Load Balancer IP address for DNS config
497+
format: ip
498+
type: string
499+
recordType:
500+
description: recordType is the DNS record type.
501+
pattern: ^[A-Za-z]+$
502+
type: string
503+
required:
504+
- lbIPAddress
505+
- recordType
506+
type: object
507+
type: array
508+
internalAPIServerDNSConfig:
509+
description: InternalAPIServerDNSConfig contains DNS configuration for the Internal API Server.
510+
items:
511+
description: DNSConfig contains the LB IP and DNS Record type to configure a DNS entry.
512+
properties:
513+
lbIPAddress:
514+
description: lBIPAddress is the Load Balancer IP address for DNS config
515+
format: ip
516+
type: string
517+
recordType:
518+
description: recordType is the DNS record type.
519+
pattern: ^[A-Za-z]+$
520+
type: string
521+
required:
522+
- lbIPAddress
523+
- recordType
524+
type: object
525+
type: array
526+
type: object
469527
region:
470528
description: region holds the default AWS region for new AWS resources created by the cluster.
471529
type: string

config/v1/types_infrastructure.go

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,11 @@ type AWSPlatformStatus struct {
435435
// +kubebuilder:validation:MaxItems=25
436436
// +optional
437437
ResourceTags []AWSResourceTag `json:"resourceTags,omitempty"`
438+
439+
// AWSClusterDNSConfig contains all the DNS config required to configure a custom DNS solution.
440+
// This field will be set only when the userConfiguredDNS feature is enabled.
441+
// +optional
442+
AWSClusterDNSConfig *ClusterDNSConfig `json:"awsClusterDNSConfig,omitempty"`
438443
}
439444

440445
// AWSResourceTag is a tag to apply to AWS resources created for the cluster.
@@ -457,6 +462,32 @@ type AWSResourceTag struct {
457462
Value string `json:"value"`
458463
}
459464

465+
type ClusterDNSConfig struct {
466+
// APIServerDNSConfig contains DNS configuration for the API Server.
467+
// +optional
468+
APIServerDNSConfig []DNSConfig `json:"apiServerDNSConfig,omitempty"`
469+
470+
// InternalAPIServerDNSConfig contains DNS configuration for the Internal API Server.
471+
// +optional
472+
InternalAPIServerDNSConfig []DNSConfig `json:"internalAPIServerDNSConfig,omitempty"`
473+
474+
// IngressDNSConfig contains DNS configuration for cluster services.
475+
// +optional
476+
IngressDNSConfig []DNSConfig `json:"ingressDNSConfig,omitempty"`
477+
}
478+
479+
// DNSConfig contains the LB IP and DNS Record type to configure a DNS entry.
480+
type DNSConfig struct {
481+
// recordType is the DNS record type.
482+
// +kubebuilder:validation:Required
483+
// +kubebuilder:validation:Pattern=`^[A-Za-z]+$`
484+
RecordType string `json:"recordType"`
485+
// lBIPAddress is the Load Balancer IP address for DNS config
486+
// +kubebuilder:validation:Required
487+
// +kubebuilder:validation:Format=ip
488+
LBIPAddress string `json:"lbIPAddress"`
489+
}
490+
460491
// AzurePlatformSpec holds the desired state of the Azure infrastructure provider.
461492
// This only includes fields that can be modified in the cluster.
462493
type AzurePlatformSpec struct{}

config/v1/zz_generated.deepcopy.go

Lines changed: 52 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/v1/zz_generated.swagger_doc_generated.go

Lines changed: 25 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)