---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.17.2
  name: infraapiconfigs.cloud.pingcap.com
spec:
  group: cloud.pingcap.com
  names:
    kind: InfraAPIConfig
    listKind: InfraAPIConfigList
    plural: infraapiconfigs
    singular: infraapiconfig
  preserveUnknownFields: false
  scope: Namespaced
  versions:
  - name: v1
    schema:
      openAPIV3Schema:
        description: InfraAPIConfig is the Schema for the infraapiconfigs 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
          audit:
            properties:
              sidecarCommand:
                items:
                  type: string
                type: array
              sidecarImage:
                type: string
            type: object
          centralCIDR:
            items:
              type: string
            type: array
          clusterMaxConcurrentReconciles:
            description: We use two controllers(aws, gcp) now, the actual total worker
              will be 2 * this value.
            type: integer
          configServiceUrl:
            type: string
          crossplaneController:
            properties:
              enableGroupVersionKinds:
                items:
                  properties:
                    frozenTimeDuration:
                      type: string
                    group:
                      type: string
                    kind:
                      type: string
                    unPausePollInterval:
                      type: string
                    version:
                      type: string
                  required:
                  - frozenTimeDuration
                  - group
                  - kind
                  - unPausePollInterval
                  - version
                  type: object
                type: array
            required:
            - enableGroupVersionKinds
            type: object
          dns:
            properties:
              publicHostedZoneDomain:
                type: string
              publicHostedZoneID:
                type: string
            required:
            - publicHostedZoneDomain
            - publicHostedZoneID
            type: object
          expFeatureGates:
            items:
              properties:
                command:
                  type: string
                featureGate:
                  properties:
                    all:
                      description: |-
                        If `All` is true, this feature gate will be enabled for all except DisabledTenants and DisabledProjects.
                        If `All` is false, this feature gate will be disabled for all except EnabledTenants and EnabledProjects.
                      type: boolean
                    disabledProjects:
                      description: Disable the feature for the specified projects.
                      items:
                        format: int64
                        type: integer
                      type: array
                    disabledTenants:
                      description: Disable the feature for the specified tenants.
                      items:
                        format: int64
                        type: integer
                      type: array
                    enabledProjects:
                      description: Enable the feature for the specified projects.
                      items:
                        format: int64
                        type: integer
                      type: array
                    enabledTenants:
                      description: Enable the feature for the specified tenants.
                      items:
                        format: int64
                        type: integer
                      type: array
                  required:
                  - all
                  - disabledProjects
                  - disabledTenants
                  - enabledProjects
                  - enabledTenants
                  type: object
                minSupportVersion:
                  type: string
                name:
                  type: string
              required:
              - command
              - featureGate
              - minSupportVersion
              - name
              type: object
            type: array
          featureGates:
            additionalProperties:
              properties:
                all:
                  description: |-
                    If `All` is true, this feature gate will be enabled for all except DisabledTenants and DisabledProjects.
                    If `All` is false, this feature gate will be disabled for all except EnabledTenants and EnabledProjects.
                  type: boolean
                disabledProjects:
                  description: Disable the feature for the specified projects.
                  items:
                    format: int64
                    type: integer
                  type: array
                disabledTenants:
                  description: Disable the feature for the specified tenants.
                  items:
                    format: int64
                    type: integer
                  type: array
                enabledProjects:
                  description: Enable the feature for the specified projects.
                  items:
                    format: int64
                    type: integer
                  type: array
                enabledTenants:
                  description: Enable the feature for the specified tenants.
                  items:
                    format: int64
                    type: integer
                  type: array
              required:
              - all
              - disabledProjects
              - disabledTenants
              - enabledProjects
              - enabledTenants
              type: object
            type: object
          gardener:
            description: copy from https://github.com/tidbcloud/dbaas/blob/af433fc6bbd814c7f1630947246673f21b22d587/central/config/config.go#L216
            properties:
              awsMasterCount:
                format: int32
                type: integer
              awsMasterType:
                type: string
              gardenBaseDomain:
                description: The base domain of gardener
                type: string
              gardenerProjectName:
                type: string
              gcpMasterCount:
                format: int32
                type: integer
              gcpMasterType:
                type: string
              kubeConfigPath:
                description: kubeconfig file for base cluster, ignore if in cluster
                type: string
              nodeImage:
                type: string
              storageNodeImage:
                type: string
            required:
            - awsMasterCount
            - awsMasterType
            - gardenBaseDomain
            - gardenerProjectName
            - gcpMasterCount
            - gcpMasterType
            - kubeConfigPath
            - nodeImage
            - storageNodeImage
            type: object
          hibernation:
            properties:
              checkIdleInterval:
                type: string
              dryRun:
                type: boolean
              idleTimeThreshold:
                type: string
            required:
            - checkIdleInterval
            - dryRun
            - idleTimeThreshold
            type: object
          identityImage:
            type: string
          import:
            properties:
              centralRoleARN:
                type: string
              skipBanMyBuckets:
                type: boolean
            required:
            - centralRoleARN
            - skipBanMyBuckets
            type: object
          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
          mixedDeployPDWithTiKV:
            properties:
              affectClusterCreatedAfter:
                format: date-time
                type: string
              affectNamespaceAllowList:
                items:
                  type: string
                type: array
              affectNamespaceBlockList:
                items:
                  type: string
                type: array
              affectTopology:
                properties:
                  lessEqualTiDBCount:
                    type: integer
                  lessEqualTiFlashCount:
                    type: integer
                  lessEqualTiKVCount:
                    type: integer
                  lessEqualTiKVInstanceCores:
                    type: integer
                required:
                - lessEqualTiDBCount
                - lessEqualTiFlashCount
                - lessEqualTiKVCount
                - lessEqualTiKVInstanceCores
                type: object
              enabled:
                type: boolean
            required:
            - affectClusterCreatedAfter
            - affectNamespaceAllowList
            - affectNamespaceBlockList
            - affectTopology
            - enabled
            type: object
          networkMaxConcurrentReconciles:
            type: integer
          observabilityAgentConfig:
            properties:
              auth0Audience:
                type: string
              auth0ClientID:
                type: string
              auth0ClientSecret:
                type: string
              auth0GetTokenURL:
                type: string
              createO11yInfraPath:
                type: string
              deleteO11yInfraPath:
                type: string
              effectiveRegion:
                items:
                  type: string
                type: array
              env:
                type: string
              getO11yInfraPath:
                type: string
              openAPIAddress:
                type: string
              pauseO11yInfraPath:
                type: string
              resumeO11yInfraPath:
                type: string
              version:
                type: integer
            required:
            - auth0Audience
            - auth0ClientID
            - auth0ClientSecret
            - auth0GetTokenURL
            - createO11yInfraPath
            - deleteO11yInfraPath
            - effectiveRegion
            - env
            - getO11yInfraPath
            - openAPIAddress
            - pauseO11yInfraPath
            - resumeO11yInfraPath
            - version
            type: object
          predicate:
            description: |-
              A label selector is a label query over a set of resources. The result of matchLabels and
              matchExpressions are ANDed. An empty label selector matches all objects. A null
              label selector matches no objects.
            properties:
              matchExpressions:
                description: matchExpressions is a list of label selector requirements.
                  The requirements are ANDed.
                items:
                  description: |-
                    A label selector requirement is a selector that contains values, a key, and an operator that
                    relates the key and values.
                  properties:
                    key:
                      description: key is the label key that the selector applies
                        to.
                      type: string
                    operator:
                      description: |-
                        operator represents a key's relationship to a set of values.
                        Valid operators are In, NotIn, Exists and DoesNotExist.
                      type: string
                    values:
                      description: |-
                        values is an array of string values. If the operator is In or NotIn,
                        the values array must be non-empty. If the operator is Exists or DoesNotExist,
                        the values array must be empty. This array is replaced during a strategic
                        merge patch.
                      items:
                        type: string
                      type: array
                      x-kubernetes-list-type: atomic
                  required:
                  - key
                  - operator
                  type: object
                type: array
                x-kubernetes-list-type: atomic
              matchLabels:
                additionalProperties:
                  type: string
                description: |-
                  matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
                  map is equivalent to an element of matchExpressions, whose key field is "key", the
                  operator is "In", and the values array contains only "value". The requirements are ANDed.
                type: object
            type: object
            x-kubernetes-map-type: atomic
          proxy:
            description: cluster-proxy config, only `auth0Audience` and `auth0Domain`
              used now
            properties:
              auth0Audience:
                type: string
              auth0Domain:
                type: string
              image:
                type: string
              loadBalancerSourceRanges:
                description: config.Global().ServerConfig.CentralCIDR in dbaas
                items:
                  type: string
                type: array
              saltSecret:
                type: string
            required:
            - auth0Audience
            - auth0Domain
            - image
            - loadBalancerSourceRanges
            - saltSecret
            type: object
          server:
            properties:
              manifestDirectoryPrefix:
                type: string
            required:
            - manifestDirectoryPrefix
            type: object
        required:
        - centralCIDR
        - clusterMaxConcurrentReconciles
        - configServiceUrl
        - crossplaneController
        - expFeatureGates
        - featureGates
        - gardener
        - hibernation
        - identityImage
        - import
        - mixedDeployPDWithTiKV
        - networkMaxConcurrentReconciles
        - observabilityAgentConfig
        - predicate
        - proxy
        - server
        type: object
    served: true
    storage: true
    subresources:
      status: {}
