HoustonPutman commented on a change in pull request #358: URL: https://github.com/apache/solr-operator/pull/358#discussion_r741135806
########## File path: config/crd/bases/solr.apache.org_solrbackups.yaml ########## @@ -1053,9 +1053,12 @@ spec: type: object repositoryName: description: The name of the repository to use for the backup. Defaults to "legacy_local_repository" if not specified (the auto-configured repository for legacy singleton volumes). + pattern: '[a-zA-Z0-9]([-_a-zA-Z0-9]*[a-zA-Z0-9])?' type: string solrCloud: description: A reference to the SolrCloud to create a backup for + minLength: 63 Review comment: nah, I actually meant maxLength here (because kubernetes resource names cannot go beyond 63 characters: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names) Good find! ########## File path: api/v1beta1/solrcloud_types.go ########## @@ -385,6 +385,8 @@ type SolrBackupRestoreOptions struct { type SolrBackupRepository struct { // A name used to identify this local storage profile. Values should follow RFC-1123. (See here for more details: // https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names) + // + // +kubebuilder:validation:Pattern:=[a-zA-Z0-9]([-_a-zA-Z0-9]*[a-zA-Z0-9])? Review comment: So this is just a name for the backup repository, it is pretty independent from the name of the SolrCloud (which has limitations given by Kubernetes, which I linked below). I used the same regex, but changed it to allow capital letters and underscores, since we don't need to be as strict with the names of the repositories (as far as I know). Is there any limitation in Solr for the name of backup repositories? If so we should definitely change this to match. ########## File path: helm/solr-operator/crds/crds.yaml ########## @@ -1053,9 +1053,12 @@ spec: type: object repositoryName: description: The name of the repository to use for the backup. Defaults to "legacy_local_repository" if not specified (the auto-configured repository for legacy singleton volumes). + pattern: '[a-zA-Z0-9]([-_a-zA-Z0-9]*[a-zA-Z0-9])?' type: string solrCloud: description: A reference to the SolrCloud to create a backup for + minLength: 63 + pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?' Review comment: So yeah, just to be very clear, I'm just following the guidelines for [kubernetes resource names](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names). This field is a reference to SolrCloud resources, so there is no way that giving a string that has a length > 63, or doesn't match that regex, is going to be successful (because we will never be able to find a SolrCloud in kubernetes with the given name). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org