apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: hostoperatorconfigs.toolchain.dev.openshift.com
spec:
  group: toolchain.dev.openshift.com
  names:
    kind: HostOperatorConfig
    listKind: HostOperatorConfigList
    plural: hostoperatorconfigs
    singular: hostoperatorconfig
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.automaticApproval.enabled
      name: AutomaticApproval
      type: boolean
    name: v1alpha1
    schema:
      openAPIV3Schema:
        description: HostOperatorConfig keeps all configuration parameters needed
          in host operator
        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: HostOperatorConfigSpec contains all configuration parameters
              of the host operator
            properties:
              automaticApproval:
                description: Keeps parameters necessary for automatic approval
                properties:
                  enabled:
                    description: Defines if the automatic approval is enabled or not
                    type: boolean
                  maxNumberOfUsers:
                    description: Defines the maximal number of users to be allowed
                      for automatic approval. When the number is reached, then the
                      automatic approval is stopped.
                    properties:
                      overall:
                        description: It is the maximal number of users provisioned
                          in the system overall - equals to max number of MasterUserRecords
                          in host cluster
                        type: integer
                      specificPerMemberCluster:
                        additionalProperties:
                          type: integer
                        description: Contains a map of maximal number of users provisioned
                          per member cluster mapped by the cluster name - equals to
                          max number of UserAccounts in member cluster
                        type: object
                        x-kubernetes-map-type: atomic
                    required:
                    - overall
                    type: object
                  resourceCapacityThreshold:
                    description: Contains threshold (in percentage of usage) that
                      defines when the automatic approval should be stopped
                    properties:
                      defaultThreshold:
                        description: It is the default capacity threshold (in percentage
                          of usage) to be used for all member clusters if no special
                          threshold is defined
                        type: integer
                      specificPerMemberCluster:
                        additionalProperties:
                          type: integer
                        description: Contains a map of specific capacity thresholds
                          (in percentage of usage) for particular member clusters
                          mapped by their names
                        type: object
                        x-kubernetes-map-type: atomic
                    required:
                    - defaultThreshold
                    type: object
                required:
                - enabled
                type: object
              deactivation:
                description: Keeps parameters concerned with user deactivation
                properties:
                  deactivatingNotificationDays:
                    default: 3
                    description: DeactivatingNotificationDays is the number of days
                      after a pre-deactivating notification is sent that actual deactivation
                      occurs.  If this parameter is set to zero, then there will be
                      no delay
                    type: integer
                type: object
            type: object
          status:
            description: HostOperatorConfigStatus defines the observed state of HostOperatorConfig
            type: object
        type: object
        x-kubernetes-preserve-unknown-fields: true
    served: true
    storage: true
    subresources:
      status: {}
