apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: vitesstoponodes.topo.vitess.io
spec:
  group: topo.vitess.io
  versions:
  - name: v1beta1
    served: true
    storage: true
    additionalPrinterColumns:
    - name: Key
      type: string
      description: The full key path
      jsonPath: .data.key
    schema:
      openAPIV3Schema:
        type: object
        required:
          - data
        properties:
          data:
            type: object
            required:
              - key
              - value
            properties:
              key:
                description: A file-path like key. Must be an absolute path. Must not end with a /.
                type: string
                pattern: '^\/.+[^\/]$'
              value:
                description: A base64 encoded value. Must be a base64 encoded string or empty string.
                type: string
                pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
              ephemeral:
                description: Whether or not the node is considered ephemeral. True for lock and election nodes.
                type: boolean
  scope: Namespaced
  names:
    plural: vitesstoponodes
    singular: vitesstoponode
    kind: VitessTopoNode
