Skip to content

Commit

Permalink
Add DNS config for API, API-Int and Ingress to AWSPlatformStatus
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sadasu committed Feb 10, 2023
1 parent 61d9718 commit c1fa499
Show file tree
Hide file tree
Showing 7 changed files with 301 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,60 @@ spec:
aws:
description: AWS contains settings specific to the Amazon Web Services infrastructure provider.
properties:
apiServerDNSConfig:
description: APIServerDNSConfig contains DNS configuration for the API Server. This field will be set only when the userConfiguredDNS feature is enabled.
items:
description: DNSConfig contains the LB IP and DNS Record type to configure a DNS entry.
properties:
lbIPAddress:
description: lBIPAddress is the Load Balancer IP address for DNS config
format: ip
type: string
recordType:
description: recordType is the DNS record type.
pattern: ^[A-Za-z]+$
type: string
required:
- lbIPAddress
- recordType
type: object
type: array
ingressDNSConfig:
description: IngressDNSConfig contains DNS configuration for cluster services. This field will be set only when the userConfiguredDNS feature is enabled.
items:
description: DNSConfig contains the LB IP and DNS Record type to configure a DNS entry.
properties:
lbIPAddress:
description: lBIPAddress is the Load Balancer IP address for DNS config
format: ip
type: string
recordType:
description: recordType is the DNS record type.
pattern: ^[A-Za-z]+$
type: string
required:
- lbIPAddress
- recordType
type: object
type: array
internalAPIServerDNSConfig:
description: InternalAPIServerDNSConfig contains DNS configuration for the Internal API Server. This field will be set only when the userConfiguredDNS feature is enabled.
items:
description: DNSConfig contains the LB IP and DNS Record type to configure a DNS entry.
properties:
lbIPAddress:
description: lBIPAddress is the Load Balancer IP address for DNS config
format: ip
type: string
recordType:
description: recordType is the DNS record type.
pattern: ^[A-Za-z]+$
type: string
required:
- lbIPAddress
- recordType
type: object
type: array
region:
description: region holds the default AWS region for new AWS resources created by the cluster.
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,60 @@ spec:
aws:
description: AWS contains settings specific to the Amazon Web Services infrastructure provider.
properties:
apiServerDNSConfig:
description: APIServerDNSConfig contains DNS configuration for the API Server. This field will be set only when the userConfiguredDNS feature is enabled.
items:
description: DNSConfig contains the LB IP and DNS Record type to configure a DNS entry.
properties:
lbIPAddress:
description: lBIPAddress is the Load Balancer IP address for DNS config
format: ip
type: string
recordType:
description: recordType is the DNS record type.
pattern: ^[A-Za-z]+$
type: string
required:
- lbIPAddress
- recordType
type: object
type: array
ingressDNSConfig:
description: IngressDNSConfig contains DNS configuration for cluster services. This field will be set only when the userConfiguredDNS feature is enabled.
items:
description: DNSConfig contains the LB IP and DNS Record type to configure a DNS entry.
properties:
lbIPAddress:
description: lBIPAddress is the Load Balancer IP address for DNS config
format: ip
type: string
recordType:
description: recordType is the DNS record type.
pattern: ^[A-Za-z]+$
type: string
required:
- lbIPAddress
- recordType
type: object
type: array
internalAPIServerDNSConfig:
description: InternalAPIServerDNSConfig contains DNS configuration for the Internal API Server. This field will be set only when the userConfiguredDNS feature is enabled.
items:
description: DNSConfig contains the LB IP and DNS Record type to configure a DNS entry.
properties:
lbIPAddress:
description: lBIPAddress is the Load Balancer IP address for DNS config
format: ip
type: string
recordType:
description: recordType is the DNS record type.
pattern: ^[A-Za-z]+$
type: string
required:
- lbIPAddress
- recordType
type: object
type: array
region:
description: region holds the default AWS region for new AWS resources created by the cluster.
type: string
Expand Down
27 changes: 27 additions & 0 deletions config/v1/types_infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,21 @@ type AWSPlatformStatus struct {
// +kubebuilder:validation:MaxItems=25
// +optional
ResourceTags []AWSResourceTag `json:"resourceTags,omitempty"`

// APIServerDNSConfig contains DNS configuration for the API Server.
// This field will be set only when the userConfiguredDNS feature is enabled.
// +optional
APIServerDNSConfig []DNSConfig `json:"apiServerDNSConfig,omitempty"`

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

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

// AWSResourceTag is a tag to apply to AWS resources created for the cluster.
Expand All @@ -455,6 +470,18 @@ type AWSResourceTag struct {
Value string `json:"value"`
}

// DNSConfig contains the LB IP and DNS Record type to configure a DNS entry.
type DNSConfig struct {
// recordType is the DNS record type.
// +kubebuilder:validation:Required
// +kubebuilder:validation:Pattern=`^[A-Za-z]+$`
RecordType string `json:"recordType"`
// lBIPAddress is the Load Balancer IP address for DNS config
// +kubebuilder:validation:Required
// +kubebuilder:validation:Format=ip
LBIPAddress string `json:"lbIPAddress"`
}

// AzurePlatformSpec holds the desired state of the Azure infrastructure provider.
// This only includes fields that can be modified in the cluster.
type AzurePlatformSpec struct{}
Expand Down
31 changes: 31 additions & 0 deletions config/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 17 additions & 4 deletions config/v1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 74 additions & 1 deletion openapi/generated_openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c1fa499

Please sign in to comment.