Conversation
Signed-off-by: Santosh Kaluskar <[email protected]>
api/v1beta1/bucket_types.go
Outdated
| // +kubebuilder:validation:MinLength=1 | ||
| // +kubebuilder:validation:MaxLength=63 | ||
| // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9_\-.\\\/]|\[[0-9]{1,5}\])+$` |
There was a problem hiding this comment.
The ignore field can have thousands of lines with special characters and UTF8, think of file paths written in Chinese.
There was a problem hiding this comment.
Thanks, Should the validation be removed from this Igonore?
There was a problem hiding this comment.
The validation pattern yes, the max length should be less than etcd entry max size (1MB).
There was a problem hiding this comment.
Would that be 5000? (<5120)
api/v1beta1/gitrepository_types.go
Outdated
|
|
||
| // The Git tag semver expression, takes precedence over Tag. | ||
| // +kubebuilder:validation:MaxLength=253 | ||
| // +kubebuilder:validation:Pattern=`^[\-._0-9]+$` |
There was a problem hiding this comment.
A semver expression usually contains special characters and alpha numeric ones, see https://github.com/Masterminds/semver
api/v1beta1/helmchart_types.go
Outdated
|
|
||
| // Name of the referent. | ||
| // +kubebuilder:validation:MinLength=1 | ||
| // +kubebuilder:validation:MaxLength=63 |
There was a problem hiding this comment.
| // +kubebuilder:validation:MaxLength=63 | |
| // +kubebuilder:validation:MaxLength=253 |
Kubernetes object name max length is 253, please use this value for all fields that references a Kube object by name.
api/v1beta2/artifact_types.go
Outdated
|
|
||
| // Revision is a human-readable identifier traceable in the origin source | ||
| // system. It can be a Git commit SHA, Git tag, a Helm chart version, etc. | ||
| // +kubebuilder:validation:MaxLength=63 |
There was a problem hiding this comment.
This breaks Flux, we use SHA256 for OCI and for Git we append the brach name to the Git SHA.
api/v1beta1/helmchart_types.go
Outdated
| // the typed referenced object at namespace level. | ||
| type LocalHelmChartSourceReference struct { | ||
| // APIVersion of the referent. | ||
| // +kubebuilder:validation:MaxLength=63 |
There was a problem hiding this comment.
| // +kubebuilder:validation:MaxLength=63 | |
| // +kubebuilder:validation:MaxLength=2048 |
Please change this in all objects with APIVersion fields.
api/v1beta2/gitrepository_types.go
Outdated
| // | ||
| // When GitRepositorySpec.GitImplementation is set to 'go-git', a shallow | ||
| // clone of the specified branch is performed. | ||
| // +kubebuilder:validation:MaxLength=63 |
There was a problem hiding this comment.
| // +kubebuilder:validation:MaxLength=63 | |
| // +kubebuilder:validation:MaxLength=244 |
api/v1beta2/helmchart_types.go
Outdated
| // +kubebuilder:validation:MaxLength=63 | ||
| // +kubebuilder:validation:Pattern=`^[\-._0-9]+$` |
There was a problem hiding this comment.
The version can be a semver expression as documented above
|
@Santosh1176 please run |
Thanks for the review and your time. I'll do as advised. |
Signed-off-by: Santosh Kaluskar <[email protected]>
Signed-off-by: Santosh Kaluskar [email protected]
This WIP is a part fix to #2993.
Request a review from @pjbgf.