github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/pkg/cli/testing/testdata/class.yaml (about) 1 apiVersion: apps.kubeblocks.io/v1alpha1 2 kind: ComponentClassDefinition 3 metadata: 4 name: kb.classes.default.apecloud-mysql.mysql 5 labels: 6 class.kubeblocks.io/provider: kubeblocks 7 apps.kubeblocks.io/component-def-ref: mysql 8 clusterdefinition.kubeblocks.io/name: apecloud-mysql 9 spec: 10 groups: 11 - # class schema template, you can set default resource values here 12 template: | 13 cpu: "{{ .cpu }}" 14 memory: "{{ .memory }}Gi" 15 # class schema template variables 16 vars: [ cpu, memory] 17 series: 18 - # class name generator, you can reference variables in class schema template 19 # it's also ok to define static class name in following class definitions 20 namingTemplate: "general-{{ .cpu }}c{{ .memory }}g" 21 22 # class definitions, we support two kinds of class definitions: 23 # 1. define arguments for class schema variables, class schema will be dynamically generated 24 # 2. statically define complete class schema 25 classes: 26 - args: [ "1", "1"] 27 - args: [ "2", "2"] 28 - args: [ "2", "4"] 29 - args: [ "2", "8"] 30 - args: [ "4", "16"] 31 - args: [ "8", "32"] 32 - args: [ "16", "64"] 33 - args: [ "32", "128"] 34 - args: [ "64", "256"] 35 - args: [ "128", "512"] 36 37 - template: | 38 cpu: "{{ .cpu }}" 39 memory: "{{ .memory }}Gi" 40 vars: [ cpu, memory] 41 series: 42 - namingTemplate: "mo-{{ .cpu }}c{{ .memory }}g" 43 classes: 44 - args: [ "2", "16"] 45 - args: [ "4", "32"] 46 - args: [ "8", "64"] 47 - args: [ "12", "96"] 48 - args: [ "24", "192"] 49 - args: [ "48", "384"] 50 - args: [ "2", "32"] 51 - args: [ "4", "64"] 52 - args: [ "8", "128"] 53 - args: [ "16", "256"] 54 - args: [ "32", "512"] 55 - args: [ "48", "768"] 56 - args: [ "64", "1024"] 57 - args: [ "128", "2048"]