@@ -49,7 +49,7 @@ const (
4949type GitRepositorySpec struct {
5050 // URL specifies the Git repository URL, it can be an HTTP/S or SSH address.
5151 // +kubebuilder:validation:MinLength=1
52- // +kubebuilder:validation:MaxLength=253
52+ // +kubebuilder:validation:MaxLength=2048
5353 // +kubebuilder:validation:Pattern="^(http|https|ssh)://.*$"
5454 // +required
5555 URL string `json:"url"`
@@ -85,7 +85,7 @@ type GitRepositorySpec struct {
8585 // Ignore overrides the set of excluded patterns in the .sourceignore format
8686 // (which is the same as .gitignore). If not provided, a default will be used,
8787 // consult the documentation for your version to find out what those are.
88- // +kubebuilder:validation:MaxLength=253
88+ // +kubebuilder:validation:MaxLength=5119
8989 // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9_\-.\\\/]|\[[0-9]{1,5}\])+$`
9090 // +optional
9191 Ignore * string `json:"ignore,omitempty"`
@@ -161,7 +161,7 @@ type GitRepositoryRef struct {
161161 //
162162 // When GitRepositorySpec.GitImplementation is set to 'go-git', a shallow
163163 // clone of the specified branch is performed.
164- // +kubebuilder:validation:MaxLength=63
164+ // +kubebuilder:validation:MaxLength=244
165165 // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9_\-.\\\/]|\[[0-9]{1,5}\])+$`
166166 // +optional
167167 Branch string `json:"branch,omitempty"`
@@ -174,7 +174,7 @@ type GitRepositoryRef struct {
174174
175175 // SemVer tag expression to check out, takes precedence over Tag.
176176 // +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-]+)*))? $`
178178 // +optional
179179 SemVer string `json:"semver,omitempty"`
180180
@@ -183,8 +183,7 @@ type GitRepositoryRef struct {
183183 // When GitRepositorySpec.GitImplementation is set to 'go-git', this can be
184184 // combined with Branch to shallow clone the branch, in which the commit is
185185 // 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}$`
188187 // +optional
189188 Commit string `json:"commit,omitempty"`
190189}
@@ -215,7 +214,7 @@ type GitRepositoryStatus struct {
215214 // URL is the dynamic fetch link for the latest Artifact.
216215 // It is provided on a "best effort" basis, and using the precise
217216 // GitRepositoryStatus.Artifact data is recommended.
218- // +kubebuilder:validation:MaxLength=253
217+ // +kubebuilder:validation:MaxLength=2048
219218 // +kubebuilder:validation:Pattern="^(http|https|ssh)://.*$"
220219 // +optional
221220 URL string `json:"url,omitempty"`
@@ -293,7 +292,7 @@ type GitRepository struct {
293292 metav1.ObjectMeta `json:"metadata,omitempty"`
294293
295294 // +kubebuilder:validation:required
296- Spec GitRepositorySpec `json:"spec,omitempty "`
295+ Spec GitRepositorySpec `json:"spec"`
297296 // +kubebuilder:default={"observedGeneration":-1}
298297 Status GitRepositoryStatus `json:"status,omitempty"`
299298}
0 commit comments