github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/deploy/helm/crds/apps.kubeblocks.io_componentresourceconstraints.yaml (about)

     1  apiVersion: apiextensions.k8s.io/v1
     2  kind: CustomResourceDefinition
     3  metadata:
     4    annotations:
     5      controller-gen.kubebuilder.io/version: v0.12.1
     6    labels:
     7      app.kubernetes.io/name: kubeblocks
     8    name: componentresourceconstraints.apps.kubeblocks.io
     9  spec:
    10    group: apps.kubeblocks.io
    11    names:
    12      categories:
    13      - kubeblocks
    14      - all
    15      kind: ComponentResourceConstraint
    16      listKind: ComponentResourceConstraintList
    17      plural: componentresourceconstraints
    18      shortNames:
    19      - crc
    20      singular: componentresourceconstraint
    21    scope: Cluster
    22    versions:
    23    - name: v1alpha1
    24      schema:
    25        openAPIV3Schema:
    26          description: ComponentResourceConstraint is the Schema for the componentresourceconstraints
    27            API
    28          properties:
    29            apiVersion:
    30              description: 'APIVersion defines the versioned schema of this representation
    31                of an object. Servers should convert recognized schemas to the latest
    32                internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
    33              type: string
    34            kind:
    35              description: 'Kind is a string value representing the REST resource this
    36                object represents. Servers may infer this from the endpoint the client
    37                submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
    38              type: string
    39            metadata:
    40              type: object
    41            spec:
    42              description: ComponentResourceConstraintSpec defines the desired state
    43                of ComponentResourceConstraint
    44              properties:
    45                rules:
    46                  description: Component resource constraint rules.
    47                  items:
    48                    properties:
    49                      cpu:
    50                        description: The constraint for vcpu cores.
    51                        properties:
    52                          max:
    53                            anyOf:
    54                            - type: integer
    55                            - type: string
    56                            description: The maximum count of vcpu cores, [Min, Max]
    57                              defines a range for valid vcpu cores, and the value in
    58                              this range must be multiple times of Step. It's useful
    59                              to define a large number of valid values without defining
    60                              them one by one. Please see the documentation for Step
    61                              for some examples. If Slots is specified, Max, Min, and
    62                              Step are ignored
    63                            pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
    64                            x-kubernetes-int-or-string: true
    65                          min:
    66                            anyOf:
    67                            - type: integer
    68                            - type: string
    69                            description: The minimum count of vcpu cores, [Min, Max]
    70                              defines a range for valid vcpu cores, and the value in
    71                              this range must be multiple times of Step. It's useful
    72                              to define a large number of valid values without defining
    73                              them one by one. Please see the documentation for Step
    74                              for some examples. If Slots is specified, Max, Min, and
    75                              Step are ignored
    76                            pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
    77                            x-kubernetes-int-or-string: true
    78                          slots:
    79                            description: The valid vcpu cores, it's useful if you want
    80                              to define valid vcpu cores explicitly. If Slots is specified,
    81                              Max, Min, and Step are ignored
    82                            items:
    83                              anyOf:
    84                              - type: integer
    85                              - type: string
    86                              pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
    87                              x-kubernetes-int-or-string: true
    88                            type: array
    89                          step:
    90                            anyOf:
    91                            - type: integer
    92                            - type: string
    93                            description: 'The minimum granularity of vcpu cores, [Min,
    94                              Max] defines a range for valid vcpu cores and the value
    95                              in this range must be multiple times of Step. For example:
    96                              1. Min is 2, Max is 8, Step is 2, and the valid vcpu core
    97                              is {2, 4, 6, 8}. 2. Min is 0.5, Max is 2, Step is 0.5,
    98                              and the valid vcpu core is {0.5, 1, 1.5, 2}.'
    99                            pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
   100                            x-kubernetes-int-or-string: true
   101                        type: object
   102                      memory:
   103                        description: The constraint for memory size.
   104                        properties:
   105                          maxPerCPU:
   106                            anyOf:
   107                            - type: integer
   108                            - type: string
   109                            description: 'The maximum size of memory per vcpu core,
   110                              [MinPerCPU, MaxPerCPU] defines a range for valid memory
   111                              size per vcpu core. It is useful on GCP as the ratio between
   112                              the CPU and memory may be a range. If SizePerCPU is specified,
   113                              MinPerCPU and MaxPerCPU are ignored. Reference: https://cloud.google.com/compute/docs/general-purpose-machines#custom_machine_types'
   114                            pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
   115                            x-kubernetes-int-or-string: true
   116                          minPerCPU:
   117                            anyOf:
   118                            - type: integer
   119                            - type: string
   120                            description: 'The minimum size of memory per vcpu core,
   121                              [MinPerCPU, MaxPerCPU] defines a range for valid memory
   122                              size per vcpu core. It is useful on GCP as the ratio between
   123                              the CPU and memory may be a range. If SizePerCPU is specified,
   124                              MinPerCPU and MaxPerCPU are ignored. Reference: https://cloud.google.com/compute/docs/general-purpose-machines#custom_machine_types'
   125                            pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
   126                            x-kubernetes-int-or-string: true
   127                          sizePerCPU:
   128                            anyOf:
   129                            - type: integer
   130                            - type: string
   131                            description: 'The size of memory per vcpu core. For example:
   132                              1Gi, 200Mi. If SizePerCPU is specified, MinPerCPU and
   133                              MaxPerCPU are ignore.'
   134                            pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
   135                            x-kubernetes-int-or-string: true
   136                        type: object
   137                      name:
   138                        description: The name of the constraint.
   139                        type: string
   140                      storage:
   141                        description: The constraint for storage size.
   142                        properties:
   143                          max:
   144                            anyOf:
   145                            - type: integer
   146                            - type: string
   147                            default: 10Ti
   148                            description: The maximum size of storage.
   149                            pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
   150                            x-kubernetes-int-or-string: true
   151                          min:
   152                            anyOf:
   153                            - type: integer
   154                            - type: string
   155                            default: 20Gi
   156                            description: The minimum size of storage.
   157                            pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
   158                            x-kubernetes-int-or-string: true
   159                        type: object
   160                    required:
   161                    - cpu
   162                    - memory
   163                    - name
   164                    type: object
   165                  type: array
   166                  x-kubernetes-list-map-keys:
   167                  - name
   168                  x-kubernetes-list-type: map
   169                selector:
   170                  description: selector is used to bind the resource constraint to cluster
   171                    definitions.
   172                  items:
   173                    properties:
   174                      clusterDefRef:
   175                        description: clusterDefRef is the name of the cluster definition.
   176                        type: string
   177                      components:
   178                        description: selector is used to bind the resource constraint
   179                          to components.
   180                        items:
   181                          properties:
   182                            componentDefRef:
   183                              description: componentDefRef is the name of the component
   184                                definition in the cluster definition.
   185                              type: string
   186                            rules:
   187                              description: rules are the constraint rules that will
   188                                be applied to the component.
   189                              items:
   190                                type: string
   191                              type: array
   192                          required:
   193                          - componentDefRef
   194                          - rules
   195                          type: object
   196                        type: array
   197                        x-kubernetes-list-map-keys:
   198                        - componentDefRef
   199                        x-kubernetes-list-type: map
   200                    required:
   201                    - clusterDefRef
   202                    - components
   203                    type: object
   204                  type: array
   205                  x-kubernetes-list-map-keys:
   206                  - clusterDefRef
   207                  x-kubernetes-list-type: map
   208              required:
   209              - rules
   210              type: object
   211          type: object
   212      served: true
   213      storage: true