###############################################################################
# Licensed Materials - Property of IBM
# (C) Copyright IBM Corporation 2019, 2020 All Rights Reserved
# US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
###############################################################################

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: clusterservicestatuses.clusterhealth.ibm.com
  labels:
    app.kubernetes.io/instance: ibm-healthcheck-operator
    app.kubernetes.io/managed-by: ibm-healthcheck-operator
    app.kubernetes.io/name: ibm-healthcheck-operator
spec:
  group: clusterhealth.ibm.com
  versions:
    - name: v1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            status:
              type: object
              properties:
                currentState:
                  type: string
                restartCount:
                  type: integer
                statusDependencies:
                  type: array
                  items: {
                    type: string
                  }
                podFailureStatus:
                  type: object
      additionalPrinterColumns:
      -
        name: Service Name
        type: string
        description: The name of the service
        jsonPath: .metadata.labels.clusterhealth\.ibm\.com/service-name
      -
        name: Service Version
        type: string
        description: The version of the service
        jsonPath: .metadata.labels.clusterhealth\.ibm\.com/service-version
      -
        name: Status
        type: string
        description: The current status of the service
        jsonPath: .status.currentState                        
  scope: Cluster
  names:
    kind: ClusterServiceStatus
    singular: clusterservicestatus
    plural: clusterservicestatuses
    shortNames:
    - css
