# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.4.1
  creationTimestamp: null
  name: solrcollections.solr.bloomberg.com
spec:
  group: solr.bloomberg.com
  names:
    kind: SolrCollection
    listKind: SolrCollectionList
    plural: solrcollections
    singular: solrcollection
  scope: Namespaced
  versions:
  - name: v1beta1
    schema:
      openAPIV3Schema:
        description: SolrCollection is the Schema for the solrcollections API
        properties:
          apiVersion:
            description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
            type: string
          kind:
            description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: SolrCollectionSpec defines the desired state of SolrCollection
            properties:
              autoAddReplicas:
                description: When set to true, enables automatic addition of replicas when the number of active replicas falls below the value set for replicationFactor
                type: boolean
              collection:
                description: The name of the collection to perform the action on
                type: string
              collectionConfigName:
                description: Define a configset to use for the collection. Use '_default' if you don't have a custom configset
                type: string
              maxShardsPerNode:
                description: Max shards per node
                format: int64
                type: integer
              numShards:
                description: The num of shards to create, used if RouteName is compositeId
                format: int64
                type: integer
              replicationFactor:
                description: The replication factor to be used
                format: int64
                type: integer
              routerField:
                description: If this parameter is specified, the router will look at the value of the field in an input document to compute the hash and identify a shard instead of looking at the uniqueKey field. If the field specified is null in the document, the document will be rejected.
                type: string
              routerName:
                description: The router name that will be used. The router defines how documents will be distributed
                enum:
                - implicit
                - compositeId
                type: string
              shards:
                description: A comma separated list of shard names, e.g., shard-x,shard-y,shard-z. This is a required parameter when the router.name is implicit
                type: string
              solrCloud:
                description: A reference to the SolrCloud to create a collection for
                type: string
            required:
            - collection
            - collectionConfigName
            - solrCloud
            type: object
          status:
            description: SolrCollectionStatus defines the observed state of SolrCollection
            properties:
              created:
                description: Whether the collection has been created or not
                type: boolean
              createdTime:
                description: Time the collection was created
                format: date-time
                type: string
              inProgressCreation:
                description: Set the status of the collection creation process
                type: boolean
            type: object
        type: object
    served: true
    storage: true
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []
