# Copyright (c) 2018 Dell Inc., or its subsidiaries. All Rights Reserved.
#
# Licensed 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
#
# Find source at: https://github.com/pravega/zookeeper-operator

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: zookeeperclusters.zookeeper.pravega.io
spec:
  group: zookeeper.pravega.io
  names:
    kind: ZookeeperCluster
    listKind: ZookeeperClusterList
    plural: zookeeperclusters
    singular: zookeepercluster
    shortNames:
      - zk
  additionalPrinterColumns:
  - name: Replicas
    type: integer
    description: The number of ZooKeeper servers in the ensemble
    JSONPath: .spec.replicas
  - name: Ready Replicas
    type: integer
    description: The number of ZooKeeper servers in the ensemble that are in a Ready state
    JSONPath: .status.readyReplicas
  - name: Internal Endpoint
    type: string
    description: Client endpoint internal to cluster network
    JSONPath: .status.internalClientEndpoint
  - name: External Endpoint
    type: string
    description: Client endpoint external to cluster network via LoadBalancer
    JSONPath: .status.externalClientEndpoint
  - name: Age
    type: date
    JSONPath: .metadata.creationTimestamp
  scope: Namespaced
  version: v1beta1
  subresources:
    status: {}
