Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HOSTEDCP-2120: Enable EnsureCustomLabels e2e test #5549

Merged
merged 3 commits into from
Feb 5, 2025
Merged
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 @@ -24,9 +24,6 @@
{
"name": "OpenStack"
},
{
"name": "HCPPodsLabels"
}
],
"enabled": [
# We enable all OCP feature gates only so the CRD contains the fields.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
{
"name": "OpenStack"
},
{
"name": "HCPPodsLabels"
}
],
"version": ""
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
{
"name": "OpenStack"
},
{
"name": "HCPPodsLabels"
}
],
"enabled": [
# We enable all OCP feature gates only so the CRD contains the fields.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
{
"name": "OpenStack"
},
{
"name": "HCPPodsLabels"
}
],
"version": ""
}
Expand Down
1 change: 0 additions & 1 deletion api/hypershift/v1beta1/hostedcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,6 @@ type HostedClusterSpec struct {
// TODO: key/value validations break cost budget for <=4.17. We should figure why and enable it back.
// +kubebuilder:validation:MaxProperties=20
// +optional
// +openshift:enable:FeatureGate=HCPPodsLabels
sjenning marked this conversation as resolved.
Show resolved Hide resolved
Labels map[string]string `json:"labels,omitempty"`
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ hostedclusters.hypershift.openshift.io:
- AutoNodeKarpenter
- DynamicResourceAllocation
- ExternalOIDC
- HCPPodsLabels
- ImageStreamImportMode
- NetworkDiagnosticsConfig
- OpenStack
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2358,6 +2358,19 @@ spec:
rule: self == oldSelf
- message: issuerURL must be a valid absolute URL
rule: isURL(self)
labels:
additionalProperties:
type: string
description: |-
labels when specified, define what custom labels are added to the hcp pods.
Changing this day 2 will cause a rollout of all hcp pods.
Duplicate keys are not supported. If duplicate keys are defined, only the last key/value pair is preserved.
Valid values are those in https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set

-kubebuilder:validation:XValidation:rule=`self.all(key, size(key) <= 317 && key.matches('^(([A-Za-z0-9]+(\\.[A-Za-z0-9]+)?)*[A-Za-z0-9]\\/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$'))`, message="label key must have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/)"
-kubebuilder:validation:XValidation:rule=`self.all(key, size(self[key]) <= 63 && self[key].matches('^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$'))`, message="label value must be 63 characters or less (can be empty), consist of alphanumeric characters, dashes (-), underscores (_) or dots (.), and begin and end with an alphanumeric character"
maxProperties: 20
type: object
networking:
default:
clusterNetwork:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2354,6 +2354,19 @@ spec:
rule: self == oldSelf
- message: issuerURL must be a valid absolute URL
rule: isURL(self)
labels:
additionalProperties:
type: string
description: |-
labels when specified, define what custom labels are added to the hcp pods.
Changing this day 2 will cause a rollout of all hcp pods.
Duplicate keys are not supported. If duplicate keys are defined, only the last key/value pair is preserved.
Valid values are those in https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set

-kubebuilder:validation:XValidation:rule=`self.all(key, size(key) <= 317 && key.matches('^(([A-Za-z0-9]+(\\.[A-Za-z0-9]+)?)*[A-Za-z0-9]\\/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$'))`, message="label key must have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/)"
-kubebuilder:validation:XValidation:rule=`self.all(key, size(self[key]) <= 63 && self[key].matches('^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$'))`, message="label value must be 63 characters or less (can be empty), consist of alphanumeric characters, dashes (-), underscores (_) or dots (.), and begin and end with an alphanumeric character"
maxProperties: 20
type: object
networking:
default:
clusterNetwork:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2399,6 +2399,19 @@ spec:
rule: self == oldSelf
- message: issuerURL must be a valid absolute URL
rule: isURL(self)
labels:
additionalProperties:
type: string
description: |-
labels when specified, define what custom labels are added to the hcp pods.
Changing this day 2 will cause a rollout of all hcp pods.
Duplicate keys are not supported. If duplicate keys are defined, only the last key/value pair is preserved.
Valid values are those in https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set

-kubebuilder:validation:XValidation:rule=`self.all(key, size(key) <= 317 && key.matches('^(([A-Za-z0-9]+(\\.[A-Za-z0-9]+)?)*[A-Za-z0-9]\\/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$'))`, message="label key must have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/)"
-kubebuilder:validation:XValidation:rule=`self.all(key, size(self[key]) <= 63 && self[key].matches('^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$'))`, message="label value must be 63 characters or less (can be empty), consist of alphanumeric characters, dashes (-), underscores (_) or dots (.), and begin and end with an alphanumeric character"
maxProperties: 20
type: object
networking:
default:
clusterNetwork:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2375,6 +2375,19 @@ spec:
rule: self == oldSelf
- message: issuerURL must be a valid absolute URL
rule: isURL(self)
labels:
additionalProperties:
type: string
description: |-
labels when specified, define what custom labels are added to the hcp pods.
Changing this day 2 will cause a rollout of all hcp pods.
Duplicate keys are not supported. If duplicate keys are defined, only the last key/value pair is preserved.
Valid values are those in https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set

-kubebuilder:validation:XValidation:rule=`self.all(key, size(key) <= 317 && key.matches('^(([A-Za-z0-9]+(\\.[A-Za-z0-9]+)?)*[A-Za-z0-9]\\/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$'))`, message="label key must have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/)"
-kubebuilder:validation:XValidation:rule=`self.all(key, size(self[key]) <= 63 && self[key].matches('^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$'))`, message="label value must be 63 characters or less (can be empty), consist of alphanumeric characters, dashes (-), underscores (_) or dots (.), and begin and end with an alphanumeric character"
maxProperties: 20
type: object
networking:
default:
clusterNetwork:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2596,6 +2596,19 @@ spec:
rule: self == oldSelf
- message: issuerURL must be a valid absolute URL
rule: isURL(self)
labels:
additionalProperties:
type: string
description: |-
labels when specified, define what custom labels are added to the hcp pods.
Changing this day 2 will cause a rollout of all hcp pods.
Duplicate keys are not supported. If duplicate keys are defined, only the last key/value pair is preserved.
Valid values are those in https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set

-kubebuilder:validation:XValidation:rule=`self.all(key, size(key) <= 317 && key.matches('^(([A-Za-z0-9]+(\\.[A-Za-z0-9]+)?)*[A-Za-z0-9]\\/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$'))`, message="label key must have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/)"
-kubebuilder:validation:XValidation:rule=`self.all(key, size(self[key]) <= 63 && self[key].matches('^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$'))`, message="label value must be 63 characters or less (can be empty), consist of alphanumeric characters, dashes (-), underscores (_) or dots (.), and begin and end with an alphanumeric character"
maxProperties: 20
type: object
networking:
default:
clusterNetwork:
Expand Down
Loading