Skip to content

Commit

Permalink
Bug 2039256: kubebuilder validation format hostname is not RFC compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
candita committed Feb 3, 2022
1 parent d747270 commit be5cc87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions config/v1/0000_10_config-operator_01_ingress.crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
hostname:
description: hostname is the hostname that should be used by the route.
type: string
format: hostname
pattern: ^([a-zA-Z0-9\p{S}\p{L}]((-?[a-zA-Z0-9\p{S}\p{L}]{0,62})?)|([a-zA-Z0-9\p{S}\p{L}](([a-zA-Z0-9-\p{S}\p{L}]{0,61}[a-zA-Z0-9\p{S}\p{L}])?)(\.)){1,}([a-zA-Z0-9-\p{L}]){2,63})$
name:
description: "name is the logical name of the route to customize. \n The namespace and name of this componentRoute must match a corresponding entry in the list of status.componentRoutes if the route is to be customized."
type: string
Expand Down Expand Up @@ -228,11 +228,11 @@ spec:
items:
description: Hostname is an alias for hostname string validation.
type: string
format: hostname
pattern: ^([a-zA-Z0-9\p{S}\p{L}]((-?[a-zA-Z0-9\p{S}\p{L}]{0,62})?)|([a-zA-Z0-9\p{S}\p{L}](([a-zA-Z0-9-\p{S}\p{L}]{0,61}[a-zA-Z0-9\p{S}\p{L}])?)(\.)){1,}([a-zA-Z0-9-\p{L}]){2,63})$
defaultHostname:
description: defaultHostname is the hostname of this route prior to customization.
type: string
format: hostname
pattern: ^([a-zA-Z0-9\p{S}\p{L}]((-?[a-zA-Z0-9\p{S}\p{L}]{0,62})?)|([a-zA-Z0-9\p{S}\p{L}](([a-zA-Z0-9-\p{S}\p{L}]{0,61}[a-zA-Z0-9\p{S}\p{L}])?)(\.)){1,}([a-zA-Z0-9-\p{L}]){2,63})$
name:
description: "name is the logical name of the route to customize. It does not have to be the actual name of a route resource but it cannot be renamed. \n The namespace and name of this componentRoute must match a corresponding entry in the list of spec.componentRoutes if the route is to be customized."
type: string
Expand Down
2 changes: 1 addition & 1 deletion config/v1/types_ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ type IngressSpec struct {
type ConsumingUser string

// Hostname is an alias for hostname string validation.
// +kubebuilder:validation:Format=hostname
// +kubebuilder:validation:Pattern="^([a-zA-Z0-9\\p{S}\\p{L}]((-?[a-zA-Z0-9\\p{S}\\p{L}]{0,62})?)|([a-zA-Z0-9\\p{S}\\p{L}](([a-zA-Z0-9-\\p{S}\\p{L}]{0,61}[a-zA-Z0-9\\p{S}\\p{L}])?)(\\.)){1,}([a-zA-Z0-9-\\p{L}]){2,63})$"
type Hostname string

type IngressStatus struct {
Expand Down

0 comments on commit be5cc87

Please sign in to comment.