Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ tests:
cloudLoadBalancerConfig:
dnsType: PlatformDefault
type: AWS
expectedStatusError: "status.platformStatus.aws.cloudLoadBalancerConfig.dnsType: Invalid value: \"string\": dnsType is immutable"
expectedStatusError: "status.platformStatus.aws.cloudLoadBalancerConfig: Invalid value: \"object\": dnsType is immutable once set"
- name: Should not accept non-IP address values for Load Balancer IPs
initial: |
apiVersion: config.openshift.io/v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ tests:
cloudLoadBalancerConfig:
dnsType: PlatformDefault
type: AWS
expectedStatusError: "status.platformStatus.aws.cloudLoadBalancerConfig.dnsType: Invalid value: \"string\": dnsType is immutable"
expectedStatusError: "status.platformStatus.aws.cloudLoadBalancerConfig: Invalid value: \"object\": dnsType is immutable once set"
- name: Should not accept non-IP address values for Load Balancer IPs
initial: |
apiVersion: config.openshift.io/v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ tests:
dnsType: ClusterHosted
ipFamily: IPv4
type: Azure
- name: Should not allow changing the immutable dnsType field
- name: Should allow changing dnsType field for Azure platform
initial: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
Expand Down Expand Up @@ -140,7 +140,24 @@ tests:
cloudLoadBalancerConfig:
dnsType: PlatformDefault
type: Azure
expectedStatusError: "status.platformStatus.azure.cloudLoadBalancerConfig.dnsType: Invalid value: \"string\": dnsType is immutable"
expected: |
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
platformSpec:
type: Azure
azure: {}
status:
controlPlaneTopology: HighlyAvailable
cpuPartitioning: None
infrastructureTopology: HighlyAvailable
platform: Azure
platformStatus:
azure:
cloudLoadBalancerConfig:
dnsType: PlatformDefault
ipFamily: IPv4
type: Azure
- name: Should not accept non-IP address values for Load Balancer IPs
initial: |
apiVersion: config.openshift.io/v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ tests:
cloudLoadBalancerConfig:
dnsType: PlatformDefault
type: GCP
expectedStatusError: "status.platformStatus.gcp.cloudLoadBalancerConfig.dnsType: Invalid value: \"string\": dnsType is immutable"
expectedStatusError: "status.platformStatus.gcp.cloudLoadBalancerConfig: Invalid value: \"object\": dnsType is immutable once set"
- name: Should not accept non-IP address values for Load Balancer IPs
initial: |
apiVersion: config.openshift.io/v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ tests:
cloudLoadBalancerConfig:
dnsType: PlatformDefault
type: GCP
expectedStatusError: "status.platformStatus.gcp.cloudLoadBalancerConfig.dnsType: Invalid value: \"string\": dnsType is immutable"
expectedStatusError: "status.platformStatus.gcp.cloudLoadBalancerConfig: Invalid value: \"object\": dnsType is immutable once set"
- name: Should not accept non-IP address values for Load Balancer IPs
initial: |
apiVersion: config.openshift.io/v1
Expand Down
7 changes: 5 additions & 2 deletions config/v1/types_infrastructure.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,12 +553,14 @@ type AWSPlatformStatus struct {
// cloudLoadBalancerConfig holds configuration related to DNS and cloud
// load balancers. It allows configuration of in-cluster DNS as an alternative
// to the platform default DNS implementation.
// The value of cloudLoadBalancerConfig.dnsType is immutable after it has been set at install time.
// When using the ClusterHosted DNS type, Load Balancer IP addresses
// must be provided for the API and internal API load balancers as well as the
// ingress load balancer.
//
// +default={"dnsType": "PlatformDefault"}
// +kubebuilder:default={"dnsType": "PlatformDefault"}
// +kubebuilder:validation:XValidation:rule="has(oldSelf.dnsType) ? (oldSelf.dnsType == '' || self.dnsType == oldSelf.dnsType) : true",message="dnsType is immutable once set"
// +openshift:enable:FeatureGate=AWSClusterHostedDNSInstall
// +optional
// +nullable
Expand Down Expand Up @@ -640,6 +642,7 @@ type AzurePlatformStatus struct {
// When using the ClusterHosted DNS type, Load Balancer IP addresses
// must be provided for the API and internal API load balancers as well as the
// ingress load balancer.
// For Azure platform, cloudLoadBalancerConfig.dnsType can be updated after it has been set.
//
// +default={"dnsType": "PlatformDefault"}
// +kubebuilder:default={"dnsType": "PlatformDefault"}
Expand Down Expand Up @@ -781,12 +784,14 @@ type GCPPlatformStatus struct {
// cloudLoadBalancerConfig holds configuration related to DNS and cloud
// load balancers. It allows configuration of in-cluster DNS as an alternative
// to the platform default DNS implementation.
// The value of cloudLoadBalancerConfig.dnsType is immutable after it has been set at install time.
// When using the ClusterHosted DNS type, Load Balancer IP addresses
// must be provided for the API and internal API load balancers as well as the
// ingress load balancer.
//
// +default={"dnsType": "PlatformDefault"}
// +kubebuilder:default={"dnsType": "PlatformDefault"}
// +kubebuilder:validation:XValidation:rule="has(oldSelf.dnsType) ? (oldSelf.dnsType == '' || self.dnsType == oldSelf.dnsType) : true",message="dnsType is immutable once set"
// +openshift:enable:FeatureGate=GCPClusterHostedDNSInstall
// +optional
// +nullable
Expand Down Expand Up @@ -877,15 +882,13 @@ type CloudLoadBalancerConfig struct {
// It can be set to `ClusterHosted` to bypass the configuration of the cloud default DNS. In this mode,
// the cluster needs to provide a self-hosted DNS solution for the cluster's installation to succeed.
// The cluster's use of the cloud's Load Balancers is unaffected by this setting.
// The value is immutable after it has been set at install time.
// Currently, there is no way for the customer to add additional DNS entries into the cluster hosted DNS.
// Enabling this functionality allows the user to start their own DNS solution outside the cluster after
// installation is complete. The customer would be responsible for configuring this custom DNS solution,
// and it can be run in addition to the in-cluster DNS solution.
// +default="PlatformDefault"
// +kubebuilder:default:="PlatformDefault"
// +kubebuilder:validation:Enum="ClusterHosted";"PlatformDefault"
// +kubebuilder:validation:XValidation:rule="oldSelf == '' || self == oldSelf",message="dnsType is immutable"
// +optional
// +unionDiscriminator
DNSType DNSType `json:"dnsType,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,7 @@ spec:
cloudLoadBalancerConfig holds configuration related to DNS and cloud
load balancers. It allows configuration of in-cluster DNS as an alternative
to the platform default DNS implementation.
The value of cloudLoadBalancerConfig.dnsType is immutable after it has been set at install time.
When using the ClusterHosted DNS type, Load Balancer IP addresses
must be provided for the API and internal API load balancers as well as the
ingress load balancer.
Expand Down Expand Up @@ -1336,7 +1337,6 @@ spec:
It can be set to `ClusterHosted` to bypass the configuration of the cloud default DNS. In this mode,
the cluster needs to provide a self-hosted DNS solution for the cluster's installation to succeed.
The cluster's use of the cloud's Load Balancers is unaffected by this setting.
The value is immutable after it has been set at install time.
Currently, there is no way for the customer to add additional DNS entries into the cluster hosted DNS.
Enabling this functionality allows the user to start their own DNS solution outside the cluster after
installation is complete. The customer would be responsible for configuring this custom DNS solution,
Expand All @@ -1345,15 +1345,15 @@ spec:
- ClusterHosted
- PlatformDefault
type: string
x-kubernetes-validations:
- message: dnsType is immutable
rule: oldSelf == '' || self == oldSelf
type: object
x-kubernetes-validations:
- message: clusterHosted is permitted only when dnsType is
ClusterHosted
rule: 'has(self.dnsType) && self.dnsType != ''ClusterHosted''
? !has(self.clusterHosted) : true'
- message: dnsType is immutable once set
rule: 'has(oldSelf.dnsType) ? (oldSelf.dnsType == '''' ||
self.dnsType == oldSelf.dnsType) : true'
ipFamily:
default: IPv4
description: |-
Expand Down Expand Up @@ -1466,6 +1466,7 @@ spec:
When using the ClusterHosted DNS type, Load Balancer IP addresses
must be provided for the API and internal API load balancers as well as the
ingress load balancer.
For Azure platform, cloudLoadBalancerConfig.dnsType can be updated after it has been set.
properties:
clusterHosted:
description: |-
Expand Down Expand Up @@ -1541,7 +1542,6 @@ spec:
It can be set to `ClusterHosted` to bypass the configuration of the cloud default DNS. In this mode,
the cluster needs to provide a self-hosted DNS solution for the cluster's installation to succeed.
The cluster's use of the cloud's Load Balancers is unaffected by this setting.
The value is immutable after it has been set at install time.
Currently, there is no way for the customer to add additional DNS entries into the cluster hosted DNS.
Enabling this functionality allows the user to start their own DNS solution outside the cluster after
installation is complete. The customer would be responsible for configuring this custom DNS solution,
Expand All @@ -1550,9 +1550,6 @@ spec:
- ClusterHosted
- PlatformDefault
type: string
x-kubernetes-validations:
- message: dnsType is immutable
rule: oldSelf == '' || self == oldSelf
type: object
x-kubernetes-validations:
- message: clusterHosted is permitted only when dnsType is
Expand Down Expand Up @@ -1839,6 +1836,7 @@ spec:
cloudLoadBalancerConfig holds configuration related to DNS and cloud
load balancers. It allows configuration of in-cluster DNS as an alternative
to the platform default DNS implementation.
The value of cloudLoadBalancerConfig.dnsType is immutable after it has been set at install time.
When using the ClusterHosted DNS type, Load Balancer IP addresses
must be provided for the API and internal API load balancers as well as the
ingress load balancer.
Expand Down Expand Up @@ -1918,7 +1916,6 @@ spec:
It can be set to `ClusterHosted` to bypass the configuration of the cloud default DNS. In this mode,
the cluster needs to provide a self-hosted DNS solution for the cluster's installation to succeed.
The cluster's use of the cloud's Load Balancers is unaffected by this setting.
The value is immutable after it has been set at install time.
Currently, there is no way for the customer to add additional DNS entries into the cluster hosted DNS.
Enabling this functionality allows the user to start their own DNS solution outside the cluster after
installation is complete. The customer would be responsible for configuring this custom DNS solution,
Expand All @@ -1927,15 +1924,15 @@ spec:
- ClusterHosted
- PlatformDefault
type: string
x-kubernetes-validations:
- message: dnsType is immutable
rule: oldSelf == '' || self == oldSelf
type: object
x-kubernetes-validations:
- message: clusterHosted is permitted only when dnsType is
ClusterHosted
rule: 'has(self.dnsType) && self.dnsType != ''ClusterHosted''
? !has(self.clusterHosted) : true'
- message: dnsType is immutable once set
rule: 'has(oldSelf.dnsType) ? (oldSelf.dnsType == '''' ||
self.dnsType == oldSelf.dnsType) : true'
projectID:
description: resourceGroupName is the Project ID for new GCP
resources created for the cluster.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1501,6 +1501,7 @@ spec:
cloudLoadBalancerConfig holds configuration related to DNS and cloud
load balancers. It allows configuration of in-cluster DNS as an alternative
to the platform default DNS implementation.
The value of cloudLoadBalancerConfig.dnsType is immutable after it has been set at install time.
When using the ClusterHosted DNS type, Load Balancer IP addresses
must be provided for the API and internal API load balancers as well as the
ingress load balancer.
Expand Down Expand Up @@ -1580,7 +1581,6 @@ spec:
It can be set to `ClusterHosted` to bypass the configuration of the cloud default DNS. In this mode,
the cluster needs to provide a self-hosted DNS solution for the cluster's installation to succeed.
The cluster's use of the cloud's Load Balancers is unaffected by this setting.
The value is immutable after it has been set at install time.
Currently, there is no way for the customer to add additional DNS entries into the cluster hosted DNS.
Enabling this functionality allows the user to start their own DNS solution outside the cluster after
installation is complete. The customer would be responsible for configuring this custom DNS solution,
Expand All @@ -1589,15 +1589,15 @@ spec:
- ClusterHosted
- PlatformDefault
type: string
x-kubernetes-validations:
- message: dnsType is immutable
rule: oldSelf == '' || self == oldSelf
type: object
x-kubernetes-validations:
- message: clusterHosted is permitted only when dnsType is
ClusterHosted
rule: 'has(self.dnsType) && self.dnsType != ''ClusterHosted''
? !has(self.clusterHosted) : true'
- message: dnsType is immutable once set
rule: 'has(oldSelf.dnsType) ? (oldSelf.dnsType == '''' ||
self.dnsType == oldSelf.dnsType) : true'
projectID:
description: resourceGroupName is the Project ID for new GCP
resources created for the cluster.
Expand Down
Loading