@@ -49,7 +49,7 @@ const (
49
49
type GitRepositorySpec struct {
50
50
// URL specifies the Git repository URL, it can be an HTTP/S or SSH address.
51
51
// +kubebuilder:validation:MinLength=1
52
- // +kubebuilder:validation:MaxLength=253
52
+ // +kubebuilder:validation:MaxLength=2048
53
53
// +kubebuilder:validation:Pattern="^(http|https|ssh)://.*$"
54
54
// +required
55
55
URL string `json:"url"`
@@ -85,7 +85,7 @@ type GitRepositorySpec struct {
85
85
// Ignore overrides the set of excluded patterns in the .sourceignore format
86
86
// (which is the same as .gitignore). If not provided, a default will be used,
87
87
// consult the documentation for your version to find out what those are.
88
- // +kubebuilder:validation:MaxLength=253
88
+ // +kubebuilder:validation:MaxLength=5119
89
89
// +kubebuilder:validation:Pattern=`^([a-zA-Z0-9_\-.\\\/]|\[[0-9]{1,5}\])+$`
90
90
// +optional
91
91
Ignore * string `json:"ignore,omitempty"`
@@ -161,7 +161,7 @@ type GitRepositoryRef struct {
161
161
//
162
162
// When GitRepositorySpec.GitImplementation is set to 'go-git', a shallow
163
163
// clone of the specified branch is performed.
164
- // +kubebuilder:validation:MaxLength=63
164
+ // +kubebuilder:validation:MaxLength=244
165
165
// +kubebuilder:validation:Pattern=`^([a-zA-Z0-9_\-.\\\/]|\[[0-9]{1,5}\])+$`
166
166
// +optional
167
167
Branch string `json:"branch,omitempty"`
@@ -174,7 +174,7 @@ type GitRepositoryRef struct {
174
174
175
175
// SemVer tag expression to check out, takes precedence over Tag.
176
176
// +kubebuilder:validation:MaxLength=63
177
- // +kubebuilder:validation:Pattern=`^[\-._0 -9]+ $`
177
+ // +kubebuilder:validation:Pattern=`^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1 -9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))? $`
178
178
// +optional
179
179
SemVer string `json:"semver,omitempty"`
180
180
@@ -183,8 +183,7 @@ type GitRepositoryRef struct {
183
183
// When GitRepositorySpec.GitImplementation is set to 'go-git', this can be
184
184
// combined with Branch to shallow clone the branch, in which the commit is
185
185
// expected to exist.
186
- // +kubebuilder:validation:MaxLength=250
187
- // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9_\-.\\\/]|\[[0-9]{1,5}\])+$`
186
+ // +kubebuilder:validation:Pattern=`^[A-Za-z0-9]{65}$`
188
187
// +optional
189
188
Commit string `json:"commit,omitempty"`
190
189
}
@@ -215,7 +214,7 @@ type GitRepositoryStatus struct {
215
214
// URL is the dynamic fetch link for the latest Artifact.
216
215
// It is provided on a "best effort" basis, and using the precise
217
216
// GitRepositoryStatus.Artifact data is recommended.
218
- // +kubebuilder:validation:MaxLength=253
217
+ // +kubebuilder:validation:MaxLength=2048
219
218
// +kubebuilder:validation:Pattern="^(http|https|ssh)://.*$"
220
219
// +optional
221
220
URL string `json:"url,omitempty"`
@@ -293,7 +292,7 @@ type GitRepository struct {
293
292
metav1.ObjectMeta `json:"metadata,omitempty"`
294
293
295
294
// +kubebuilder:validation:required
296
- Spec GitRepositorySpec `json:"spec,omitempty "`
295
+ Spec GitRepositorySpec `json:"spec"`
297
296
// +kubebuilder:default={"observedGeneration":-1}
298
297
Status GitRepositoryStatus `json:"status,omitempty"`
299
298
}
0 commit comments