You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"description": "domain is a DNS name serviced by the ingress controller and is used to configure multiple features:\n\n* For the LoadBalancerService endpoint publishing strategy, domain is\n used to configure DNS records. See endpointPublishingStrategy.\n\n* When using a generated default certificate, the certificate will be valid\n for domain and its subdomains. See defaultCertificate.\n\n* The value is published to individual Route statuses so that end-users\n know where to target external DNS records.\n\ndomain must be unique among all IngressControllers, and cannot be updated.\n\nIf empty, defaults to ingress.config.openshift.io/cluster .spec.domain.",
30467
+
"description": "domain is a DNS name serviced by the ingress controller and is used to configure multiple features:\n\n* For the LoadBalancerService endpoint publishing strategy, domain is\n used to configure DNS records. See endpointPublishingStrategy.\n\n* When using a generated default certificate, the certificate will be valid\n for domain and its subdomains. See defaultCertificate.\n\n* The value is published to individual Route statuses so that end-users\n know where to target external DNS records.\n\ndomain must be unique among all IngressControllers, and cannot be updated.\n\nIf empty, defaults to ingress.config.openshift.io/cluster .spec.domain.\n\nThe domain value must be a valid DNS name. It must consist of lowercase alphanumeric characters, '-' or '.', and each label must start and end with an alphanumeric character and not exceed 63 characters. Maximum length of a valid DNS domain is 253 characters.\n\nThe implementation may add a prefix such as \"router-default.\" to the domain when constructing the router canonical hostname. To ensure the resulting hostname does not exceed the DNS maximum length of 253 characters, the domain length is additionally validated at the IngressController object level. For the maximum length of the domain value itself, the shortest possible variant of the prefix and the ingress controller name was considered for example \"router-a.\"",
Copy file name to clipboardExpand all lines: operator/v1/tests/ingresscontrollers.operator.openshift.io/AAA_ungated.yaml
+149Lines changed: 149 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -563,3 +563,152 @@ tests:
563
563
tuningOptions:
564
564
connectTimeout: "4 s"
565
565
expectedError: "IngressController.operator.openshift.io \"default\" is invalid: spec.tuningOptions.connectTimeout: Invalid value: \"4 s\": spec.tuningOptions.connectTimeout in body should match '^(0|([0-9]+(\\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+)$'"
566
+
- name: Should be able to create an IngressController with valid domain
@@ -68,6 +69,22 @@ type IngressControllerSpec struct {
68
69
//
69
70
// If empty, defaults to ingress.config.openshift.io/cluster .spec.domain.
70
71
//
72
+
// The domain value must be a valid DNS name. It must consist of lowercase
73
+
// alphanumeric characters, '-' or '.', and each label must start and end
74
+
// with an alphanumeric character and not exceed 63 characters. Maximum
75
+
// length of a valid DNS domain is 253 characters.
76
+
//
77
+
// The implementation may add a prefix such as "router-default." to the domain
78
+
// when constructing the router canonical hostname. To ensure the resulting
79
+
// hostname does not exceed the DNS maximum length of 253 characters,
80
+
// the domain length is additionally validated at the IngressController object
81
+
// level. For the maximum length of the domain value itself, the shortest
82
+
// possible variant of the prefix and the ingress controller name was considered
83
+
// for example "router-a."
84
+
//
85
+
// +kubebuilder:validation:MaxLength=244
86
+
// +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="domain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character"
87
+
// +kubebuilder:validation:XValidation:rule="self.split('.').all(label, size(label) <= 63)",message="each DNS label must not exceed 63 characters"
Copy file name to clipboardExpand all lines: operator/v1/zz_generated.featuregated-crd-manifests/ingresscontrollers.operator.openshift.io/AAA_ungated.yaml
+25Lines changed: 25 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -165,7 +165,27 @@ spec:
165
165
updated.
166
166
167
167
If empty, defaults to ingress.config.openshift.io/cluster .spec.domain.
168
+
169
+
The domain value must be a valid DNS name. It must consist of lowercase
170
+
alphanumeric characters, '-' or '.', and each label must start and end
171
+
with an alphanumeric character and not exceed 63 characters. Maximum
172
+
length of a valid DNS domain is 253 characters.
173
+
174
+
The implementation may add a prefix such as "router-default." to the domain
175
+
when constructing the router canonical hostname. To ensure the resulting
176
+
hostname does not exceed the DNS maximum length of 253 characters,
177
+
the domain length is additionally validated at the IngressController object
178
+
level. For the maximum length of the domain value itself, the shortest
179
+
possible variant of the prefix and the ingress controller name was considered
180
+
for example "router-a."
181
+
maxLength: 244
168
182
type: string
183
+
x-kubernetes-validations:
184
+
- message: domain must consist of lower case alphanumeric characters,
185
+
'-'or '.', and must start and end with an alphanumeric character
0 commit comments