kind: CustomResourceDefinition
spec:
  group: zookeeper.stackable.tech
  names:
    kind: ZookeeperZnode
    plural: zookeeperznodes
    singular: zookeeperznode
    shortNames:
      - zno
      - znode
  scope: Namespaced
  versions:
    - name: v1alpha1
      schema:
        openAPIV3Schema:
          type: object
          title: ZookeeperZnode
          required:
            - spec
          properties:
            spec:
              type: object
              properties:
                clusterRef:
                  type: object
                  default:
                    name: null
                    namespace: null
                  properties:
                    name:
                      type: string
                      nullable: true
                      description: The name of the cluster
                    namespace:
                      type: string
                      nullable: true
                      description: >-
                        The namespace of the cluster


                        This field is optional, and will default to the
                        namespace of the referring object.
                  description: The reference to the ZookeeperCluster that this ZNode belongs to.
                objectOverrides:
                  type: array
                  items:
                    type: object
                    x-kubernetes-preserve-unknown-fields: true
                  default: []
                  description: |-
                    A list of generic Kubernetes objects, which are merged into the objects that the operator
                    creates.

                    List entries are arbitrary YAML objects, which need to be valid Kubernetes objects.

                    Read the [Object overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#object-overrides)
                    for more information.
              description: |-
                A claim for a single ZooKeeper ZNode tree (filesystem node).

                A ConfigMap will automatically be created with the same name, containing the connection string in the field `ZOOKEEPER`.
                Each ZookeeperZnode gets an isolated ZNode chroot, which the `ZOOKEEPER` automatically contains.
                All data inside of this chroot will be deleted when the corresponding `ZookeeperZnode` is.

                `ZookeeperZnode` is *not* designed to manage the contents of this ZNode. Instead, it should be used to create a chroot
                for an installation of an application to work inside. Initializing the contents is the responsibility of the application.

                You can learn more about this in the
                [Isolating clients with ZNodes usage guide](https://docs.stackable.tech/home/nightly/zookeeper/usage_guide/isolating_clients_with_znodes).
            status:
              type: object
              nullable: true
              properties:
                znodePath:
                  type: string
                  nullable: true
                  description: >-
                    The absolute ZNode allocated to the ZookeeperZnode. This
                    will typically be set by the operator.


                    This can be set explicitly by an administrator, such as when
                    restoring from a backup.
          description: A claim for a single ZooKeeper ZNode tree (filesystem node).
      served: true
      storage: true
      subresources:
        status: {}
metadata:
  name: zookeeperznodes.zookeeper.stackable.tech
apiVersion: apiextensions.k8s.io/v1
