Skip to content

CrossNamespaceObjectReference: Fix MaxLength validation to k8s max 253 char #1108

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
4 changes: 2 additions & 2 deletions api/v1/reference_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ type CrossNamespaceObjectReference struct {
// Name of the referent
// If multiple resources are targeted `*` may be set.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=53
// +kubebuilder:validation:MaxLength=253
// +required
Name string `json:"name"`

// Namespace of the referent
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=53
// +kubebuilder:validation:MaxLength=253
// +kubebuilder:validation:Optional
// +optional
Namespace string `json:"namespace,omitempty"`
Expand Down
8 changes: 4 additions & 4 deletions config/crd/bases/notification.toolkit.fluxcd.io_alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,12 @@ spec:
description: |-
Name of the referent
If multiple resources are targeted `*` may be set.
maxLength: 53
maxLength: 253
minLength: 1
type: string
namespace:
description: Namespace of the referent
maxLength: 53
maxLength: 253
minLength: 1
type: string
required:
Expand Down Expand Up @@ -519,12 +519,12 @@ spec:
description: |-
Name of the referent
If multiple resources are targeted `*` may be set.
maxLength: 53
maxLength: 253
minLength: 1
type: string
namespace:
description: Namespace of the referent
maxLength: 53
maxLength: 253
minLength: 1
type: string
required:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ spec:
description: |-
Name of the referent
If multiple resources are targeted `*` may be set.
maxLength: 53
maxLength: 253
minLength: 1
type: string
namespace:
description: Namespace of the referent
maxLength: 53
maxLength: 253
minLength: 1
type: string
required:
Expand Down Expand Up @@ -536,12 +536,12 @@ spec:
description: |-
Name of the referent
If multiple resources are targeted `*` may be set.
maxLength: 53
maxLength: 253
minLength: 1
type: string
namespace:
description: Namespace of the referent
maxLength: 53
maxLength: 253
minLength: 1
type: string
required:
Expand Down