---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: apimons.apimon.otc-service.com
spec:
  group: apimon.otc-service.com
  names:
    kind: Apimon
    listKind: ApimonList
    plural: apimons
    singular: apimon
  scope: Namespaced
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        description: Apimon is the Schema for the apimons 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: Spec defines the desired state of Apimon
            type: object
            x-kubernetes-preserve-unknown-fields: true
            properties:
              apimon_image:
                description: Image to use
                type: string
              apimon_image_pull_policy:
                description: Pull policy for the APImon image
                type: string
              config_map_name:
                description: Configmap with the APImon configuration
                type: string
              secret_name:
                description: Secret name with the secure configs for APImon (merged with ones from configmap)
                type: string
              epmon_count:
                description: Count of EndpointMonitor pods
                type: integer
                format: int32
                minimum: 0
              scheduler_count:
                description: Count of Schedulers
                type: integer
                format: int32
                minimum: 0
                maximum: 1
              executor_count:
                description: Count of executors
                type: integer
                format: int32
                minimum: 0
          status:
            description: Status defines the observed state of Apimon
            type: object
            x-kubernetes-preserve-unknown-fields: true
        type: object
    served: true
    storage: true
    subresources:
      status: {}
