-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapps.kubeblocks.io_clusters.yaml
2520 lines (2520 loc) · 155 KB
/
apps.kubeblocks.io_clusters.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.1
labels:
app.kubernetes.io/name: kubeblocks
name: clusters.apps.kubeblocks.io
spec:
group: apps.kubeblocks.io
names:
categories:
- kubeblocks
- all
kind: Cluster
listKind: ClusterList
plural: clusters
singular: cluster
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: ClusterDefinition referenced by cluster.
jsonPath: .spec.clusterDefinitionRef
name: CLUSTER-DEFINITION
type: string
- description: Cluster Application Version.
jsonPath: .spec.clusterVersionRef
name: VERSION
type: string
- description: Cluster termination policy.
jsonPath: .spec.terminationPolicy
name: TERMINATION-POLICY
type: string
- description: Cluster Status.
jsonPath: .status.phase
name: STATUS
type: string
- jsonPath: .metadata.creationTimestamp
name: AGE
type: date
name: v1alpha1
schema:
openAPIV3Schema:
description: Cluster is the Schema for the clusters 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: ClusterSpec defines the desired state of Cluster.
properties:
affinity:
description: affinity is a group of affinity scheduling rules.
properties:
nodeLabels:
additionalProperties:
type: string
description: nodeLabels describes that pods must be scheduled
to the nodes with the specified node labels.
type: object
podAntiAffinity:
default: Preferred
description: podAntiAffinity describes the anti-affinity level
of pods within a component. Preferred means try spread pods
by `TopologyKeys`. Required means must spread pods by `TopologyKeys`.
enum:
- Preferred
- Required
type: string
tenancy:
default: SharedNode
description: tenancy describes how pods are distributed across
node. SharedNode means multiple pods may share the same node.
DedicatedNode means each pod runs on their own dedicated node.
enum:
- SharedNode
- DedicatedNode
type: string
topologyKeys:
description: topologyKey is the key of node labels. Nodes that
have a label with this key and identical values are considered
to be in the same topology. It's used as the topology domain
for pod anti-affinity and pod spread constraint. Some well-known
label keys, such as "kubernetes.io/hostname" and "topology.kubernetes.io/zone"
are often used as TopologyKey, as well as any other custom label
key.
items:
type: string
type: array
x-kubernetes-list-type: set
type: object
availabilityPolicy:
description: availabilityPolicy describes the availability policy,
including zone, node, and none.
enum:
- zone
- node
- none
type: string
backup:
description: cluster backup configuration.
properties:
cronExpression:
description: the cron expression for schedule, the timezone is
in UTC. see https://en.wikipedia.org/wiki/Cron.
type: string
enabled:
default: false
description: enabled defines whether to enable automated backup.
type: boolean
method:
description: backup method name to use, that is defined in backupPolicy.
type: string
pitrEnabled:
default: false
description: pitrEnabled defines whether to enable point-in-time
recovery.
type: boolean
repoName:
description: repoName is the name of the backupRepo, if not set,
will use the default backupRepo.
type: string
retentionPeriod:
default: 7d
description: "retentionPeriod determines a duration up to which
the backup should be kept. controller will remove all backups
that are older than the RetentionPeriod. For example, RetentionPeriod
of `30d` will keep only the backups of last 30 days. Sample
duration format: - years: \t2y - months: \t6mo - days: \t\t30d
- hours: \t12h - minutes: \t30m You can also combine the above
durations. For example: 30d12h30m"
type: string
startingDeadlineMinutes:
description: startingDeadlineMinutes defines the deadline in minutes
for starting the backup job if it misses scheduled time for
any reason.
format: int64
maximum: 1440
minimum: 0
type: integer
type: object
clusterDefinitionRef:
description: Cluster referencing ClusterDefinition name. This is an
immutable attribute. If ClusterDefRef is not specified, ComponentDef
must be specified for each Component in ComponentSpecs.
maxLength: 63
pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$
type: string
x-kubernetes-validations:
- message: clusterDefinitionRef is immutable
rule: self == oldSelf
clusterVersionRef:
description: Cluster referencing ClusterVersion name.
maxLength: 63
pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$
type: string
componentSpecs:
description: List of componentSpec which is used to define the components
that make up a cluster. ComponentSpecs and ShardingSpecs cannot
both be empty at the same time.
items:
description: ClusterComponentSpec defines the cluster component
spec. //(TODO) +kubebuilder:validation:XValidation:rule="!has(oldSelf.componentDefRef)
|| has(self.componentDefRef)", message="componentDefRef is required
once set" //(TODO) +kubebuilder:validation:XValidation:rule="!has(oldSelf.componentDef)
|| has(self.componentDef)", message="componentDef is required
once set"
properties:
affinity:
description: affinity describes affinities specified by users.
properties:
nodeLabels:
additionalProperties:
type: string
description: nodeLabels describes that pods must be scheduled
to the nodes with the specified node labels.
type: object
podAntiAffinity:
default: Preferred
description: podAntiAffinity describes the anti-affinity
level of pods within a component. Preferred means try
spread pods by `TopologyKeys`. Required means must spread
pods by `TopologyKeys`.
enum:
- Preferred
- Required
type: string
tenancy:
default: SharedNode
description: tenancy describes how pods are distributed
across node. SharedNode means multiple pods may share
the same node. DedicatedNode means each pod runs on their
own dedicated node.
enum:
- SharedNode
- DedicatedNode
type: string
topologyKeys:
description: topologyKey is the key of node labels. Nodes
that have a label with this key and identical values are
considered to be in the same topology. It's used as the
topology domain for pod anti-affinity and pod spread constraint.
Some well-known label keys, such as "kubernetes.io/hostname"
and "topology.kubernetes.io/zone" are often used as TopologyKey,
as well as any other custom label key.
items:
type: string
type: array
x-kubernetes-list-type: set
type: object
classDefRef:
description: classDefRef references the class defined in ComponentClassDefinition.
properties:
class:
description: Class refers to the name of the class that
is defined in the ComponentClassDefinition.
type: string
name:
description: Name refers to the name of the ComponentClassDefinition.
maxLength: 63
pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$
type: string
required:
- class
type: object
componentDef:
description: componentDef references the name of the ComponentDefinition.
If both componentDefRef and componentDef are provided, the
componentDef will take precedence over componentDefRef. //(TODO)
+kubebuilder:validation:XValidation:rule="self == oldSelf",message="componentDef
is immutable"
maxLength: 22
pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$
type: string
componentDefRef:
description: componentDefRef references componentDef defined
in ClusterDefinition spec. Need to comply with IANA Service
Naming rule. //(TODO) +kubebuilder:validation:XValidation:rule="self
== oldSelf",message="componentDefRef is immutable"
maxLength: 22
pattern: ^[a-z]([a-z0-9\-]*[a-z0-9])?$
type: string
enabledLogs:
description: enabledLogs indicates which log file takes effect
in the database cluster. element is the log type which is
defined in cluster definition logConfig.name, and will set
relative variables about this log type in database kernel.
items:
type: string
type: array
x-kubernetes-list-type: set
instances:
description: Instances defines the list of instance to be deleted
priorly If the RsmTransformPolicy is specified as ToPod,the
list of instances will be used.
items:
type: string
type: array
issuer:
description: issuer defines provider context for TLS certs.
required when TLS enabled
properties:
name:
default: KubeBlocks
description: 'Name of issuer. Options supported: - KubeBlocks
- Certificates signed by KubeBlocks Operator. - UserProvided
- User provided own CA-signed certificates.'
enum:
- KubeBlocks
- UserProvided
type: string
secretRef:
description: secretRef. TLS certs Secret reference required
when from is UserProvided
properties:
ca:
description: CA cert key in Secret
type: string
cert:
description: Cert key in Secret
type: string
key:
description: Key of TLS private key in Secret
type: string
name:
description: Name of the Secret
type: string
required:
- ca
- cert
- key
- name
type: object
required:
- name
type: object
monitor:
default: false
description: monitor is a switch to enable monitoring and is
set as false by default. KubeBlocks provides an extension
mechanism to support component level monitoring, which will
scrape metrics auto or manually from servers in component
and export metrics to Time Series Database.
type: boolean
name:
description: name defines cluster's component name, this name
is also part of Service DNS name, so this name will comply
with IANA Service Naming rule. When ClusterComponentSpec is
referenced as a template, name is optional. Otherwise, it
is required. //(TODO) +kubebuilder:validation:XValidation:rule="self
== oldSelf",message="name is immutable"
maxLength: 22
pattern: ^[a-z]([a-z0-9\-]*[a-z0-9])?$
type: string
nodes:
description: Nodes defines the list of nodes that pods can schedule
If the RsmTransformPolicy is specified as ToPod,the list of
nodes will be used. If the list of nodes is empty, no specific
node will be assigned. However, if the list of node is filled,
all pods will be evenly scheduled across the nodes in the
list.
items:
description: "NodeName is a type that holds a api.Node's Name
identifier. Being a type captures intent and helps make
sure that the node name is not confused with similar concepts
(the hostname, the cloud provider id, the cloud provider
name etc) \n To clarify the various types: \n - Node.Name
is the Name field of the Node in the API. This should be
stored in a NodeName. Unfortunately, because Name is part
of ObjectMeta, we can't store it as a NodeName at the API
level. \n - Hostname is the hostname of the local machine
(from uname -n). However, some components allow the user
to pass in a --hostname-override flag, which will override
this in most places. In the absence of anything more meaningful,
kubelet will use Hostname as the Node.Name when it creates
the Node. \n * The cloudproviders have the own names: GCE
has InstanceName, AWS has InstanceId. \n For GCE, InstanceName
is the Name of an Instance object in the GCE API. On GCE,
Instance.Name becomes the Hostname, and thus it makes sense
also to use it as the Node.Name. But that is GCE specific,
and it is up to the cloudprovider how to do this mapping.
\n For AWS, the InstanceID is not yet suitable for use as
a Node.Name, so we actually use the PrivateDnsName for the
Node.Name. And this is _not_ always the same as the hostname:
if we are using a custom DHCP domain it won't be."
type: string
type: array
replicas:
default: 1
description: Component replicas.
format: int32
minimum: 0
type: integer
resources:
description: Resources requests and limits of workload.
properties:
claims:
description: "Claims lists the names of resources, defined
in spec.resourceClaims, that are used by this container.
\n This is an alpha field and requires enabling the DynamicResourceAllocation
feature gate. \n This field is immutable. It can only
be set for containers."
items:
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
properties:
name:
description: Name must match the name of one entry
in pod.spec.resourceClaims of the Pod where this
field is used. It makes that resource available
inside a container.
type: string
required:
- name
type: object
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Limits describes the maximum amount of compute
resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
requests:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Requests describes the minimum amount of compute
resources required. If Requests is omitted for a container,
it defaults to Limits if that is explicitly specified,
otherwise to an implementation-defined value. Requests
cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
type: object
x-kubernetes-preserve-unknown-fields: true
rsmTransformPolicy:
default: ToSts
description: 'RsmTransformPolicy defines the policy generate
sts using rsm. ToSts: rsm transforms to statefulSet ToPod:
rsm transforms to pods'
enum:
- ToPod
- ToSts
type: string
serviceAccountName:
description: serviceAccountName is the name of the ServiceAccount
that running component depends on.
type: string
serviceRefs:
description: 'serviceRefs define service references for the
current component. Based on the referenced services, they
can be categorized into two types: Service provided by external
sources: These services are provided by external sources and
are not managed by KubeBlocks. They can be Kubernetes-based
or non-Kubernetes services. For external services, you need
to provide an additional ServiceDescriptor object to establish
the service binding. Service provided by other KubeBlocks
clusters: These services are provided by other KubeBlocks
clusters. You can bind to these services by specifying the
name of the hosting cluster. Each type of service reference
requires specific configurations and bindings to establish
the connection and interaction with the respective services.
It should be noted that the ServiceRef has cluster-level semantic
consistency, meaning that within the same Cluster, service
references with the same ServiceRef.Name are considered to
be the same service. It is only allowed to bind to the same
Cluster or ServiceDescriptor.'
items:
properties:
cluster:
description: 'When referencing a service provided by other
KubeBlocks cluster, you need to provide the name of
the Cluster being referenced. By default, when other
KubeBlocks Cluster are referenced, the ClusterDefinition.spec.connectionCredential
secret corresponding to the referenced Cluster will
be used to bind to the current component. Currently,
if a KubeBlocks cluster is to be referenced, the connection
credential secret should include and correspond to the
following fields: endpoint, port, username, and password.
Under this referencing approach, the ServiceKind and
ServiceVersion of service reference declaration defined
in the ClusterDefinition will not be validated. If both
Cluster and ServiceDescriptor are specified, the Cluster
takes precedence.'
type: string
name:
description: name of the service reference declaration.
references the serviceRefDeclaration name defined in
clusterDefinition.componentDefs[*].serviceRefDeclarations[*].name
type: string
namespace:
description: namespace defines the namespace of the referenced
Cluster or the namespace of the referenced ServiceDescriptor
object. If not set, the referenced Cluster and ServiceDescriptor
will be searched in the namespace of the current cluster
by default.
type: string
serviceDescriptor:
description: serviceDescriptor defines the service descriptor
of the service provided by external sources. When referencing
a service provided by external sources, you need to
provide the ServiceDescriptor object name to establish
the service binding. And serviceDescriptor is the name
of the ServiceDescriptor object, furthermore, the ServiceDescriptor.spec.serviceKind
and ServiceDescriptor.spec.serviceVersion should match
clusterDefinition.componentDefs[*].serviceRefDeclarations[*].serviceRefDeclarationSpecs[*].serviceKind
and the regular expression defines in clusterDefinition.componentDefs[*].serviceRefDeclarations[*].serviceRefDeclarationSpecs[*].serviceVersion.
If both Cluster and ServiceDescriptor are specified,
the Cluster takes precedence.
type: string
required:
- name
type: object
type: array
services:
description: Services expose endpoints that can be accessed
by clients.
items:
properties:
annotations:
additionalProperties:
type: string
description: 'If ServiceType is LoadBalancer, cloud provider
related parameters can be put here More info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer.'
type: object
name:
description: Service name
maxLength: 15
type: string
serviceType:
default: ClusterIP
description: 'serviceType determines how the Service is
exposed. Valid options are ClusterIP, NodePort, and
LoadBalancer. "ClusterIP" allocates a cluster-internal
IP address for load-balancing to endpoints. Endpoints
are determined by the selector or if that is not specified,
they are determined by manual construction of an Endpoints
object or EndpointSlice objects. If clusterIP is "None",
no virtual IP is allocated and the endpoints are published
as a set of endpoints rather than a virtual IP. "NodePort"
builds on ClusterIP and allocates a port on every node
which routes to the same endpoints as the clusterIP.
"LoadBalancer" builds on NodePort and creates an external
load-balancer (if supported in the current cloud) which
routes to the same endpoints as the clusterIP. More
info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types.'
enum:
- ClusterIP
- NodePort
- LoadBalancer
type: string
x-kubernetes-preserve-unknown-fields: true
required:
- name
type: object
type: array
switchPolicy:
description: switchPolicy defines the strategy for switchover
and failover when workloadType is Replication.
properties:
type:
default: Noop
description: 'clusterSwitchPolicy defines type of the switchPolicy
when workloadType is Replication. MaximumAvailability:
[WIP] when the primary is active, do switch if the synchronization
delay = 0 in the user-defined lagProbe data delay detection
logic, otherwise do not switch. The primary is down, switch
immediately. It will be available in future versions.
MaximumDataProtection: [WIP] when the primary is active,
do switch if synchronization delay = 0 in the user-defined
lagProbe data lag detection logic, otherwise do not switch.
If the primary is down, if it can be judged that the primary
and secondary data are consistent, then do the switch,
otherwise do not switch. It will be available in future
versions. Noop: KubeBlocks will not perform high-availability
switching on components. Users need to implement HA by
themselves or integrate open source HA solution.'
enum:
- Noop
type: string
type: object
tls:
description: Enables or disables TLS certs.
type: boolean
tolerations:
description: Component tolerations will override ClusterSpec.Tolerations
if specified.
items:
description: The pod this Toleration is attached to tolerates
any taint that matches the triple <key,value,effect> using
the matching operator <operator>.
properties:
effect:
description: Effect indicates the taint effect to match.
Empty means match all taint effects. When specified,
allowed values are NoSchedule, PreferNoSchedule and
NoExecute.
type: string
key:
description: Key is the taint key that the toleration
applies to. Empty means match all taint keys. If the
key is empty, operator must be Exists; this combination
means to match all values and all keys.
type: string
operator:
description: Operator represents a key's relationship
to the value. Valid operators are Exists and Equal.
Defaults to Equal. Exists is equivalent to wildcard
for value, so that a pod can tolerate all taints of
a particular category.
type: string
tolerationSeconds:
description: TolerationSeconds represents the period of
time the toleration (which must be of effect NoExecute,
otherwise this field is ignored) tolerates the taint.
By default, it is not set, which means tolerate the
taint forever (do not evict). Zero and negative values
will be treated as 0 (evict immediately) by the system.
format: int64
type: integer
value:
description: Value is the taint value the toleration matches
to. If the operator is Exists, the value should be empty,
otherwise just a regular string.
type: string
type: object
type: array
x-kubernetes-preserve-unknown-fields: true
updateStrategy:
description: updateStrategy defines the update strategy for
the component. Not supported.
enum:
- Serial
- BestEffortParallel
- Parallel
type: string
userResourceRefs:
description: userResourceRefs defines the user-defined volumes.
properties:
configMapRefs:
description: configMapRefs defines the user-defined configmaps.
items:
properties:
asVolumeFrom:
description: asVolumeFrom defines the list of containers
where volumeMounts will be injected into.
items:
type: string
type: array
x-kubernetes-list-type: set
configMap:
description: configMap defines the configmap volume
source.
properties:
defaultMode:
description: 'defaultMode is optional: mode bits
used to set permissions on created files by
default. Must be an octal value between 0000
and 0777 or a decimal value between 0 and 511.
YAML accepts both octal and decimal values,
JSON requires decimal values for mode bits.
Defaults to 0644. Directories within the path
are not affected by this setting. This might
be in conflict with other options that affect
the file mode, like fsGroup, and the result
can be other mode bits set.'
format: int32
type: integer
items:
description: items if unspecified, each key-value
pair in the Data field of the referenced ConfigMap
will be projected into the volume as a file
whose name is the key and content is the value.
If specified, the listed keys will be projected
into the specified paths, and unlisted keys
will not be present. If a key is specified which
is not present in the ConfigMap, the volume
setup will error unless it is marked optional.
Paths must be relative and may not contain the
'..' path or start with '..'.
items:
description: Maps a string key to a path within
a volume.
properties:
key:
description: key is the key to project.
type: string
mode:
description: 'mode is Optional: mode bits
used to set permissions on this file.
Must be an octal value between 0000 and
0777 or a decimal value between 0 and
511. YAML accepts both octal and decimal
values, JSON requires decimal values for
mode bits. If not specified, the volume
defaultMode will be used. This might be
in conflict with other options that affect
the file mode, like fsGroup, and the result
can be other mode bits set.'
format: int32
type: integer
path:
description: path is the relative path of
the file to map the key to. May not be
an absolute path. May not contain the
path element '..'. May not start with
the string '..'.
type: string
required:
- key
- path
type: object
type: array
name:
description: 'Name of the referent. More info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
TODO: Add other useful fields. apiVersion, kind,
uid?'
type: string
optional:
description: optional specify whether the ConfigMap
or its keys must be defined
type: boolean
type: object
x-kubernetes-map-type: atomic
mountPoint:
description: mountPath is the path at which to mount
the volume.
maxLength: 256
pattern: ^/[a-z]([a-z0-9\-]*[a-z0-9])?$
type: string
name:
description: name is the name of the referenced the
Configmap/Secret object.
maxLength: 63
pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$
type: string
subPath:
description: subPath is a relative file path within
the volume to mount.
type: string
required:
- configMap
- mountPoint
- name
type: object
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
secretRefs:
description: secretRefs defines the user-defined secrets.
items:
properties:
asVolumeFrom:
description: asVolumeFrom defines the list of containers
where volumeMounts will be injected into.
items:
type: string
type: array
x-kubernetes-list-type: set
mountPoint:
description: mountPath is the path at which to mount
the volume.
maxLength: 256
pattern: ^/[a-z]([a-z0-9\-]*[a-z0-9])?$
type: string
name:
description: name is the name of the referenced the
Configmap/Secret object.
maxLength: 63
pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$
type: string
secret:
description: secret defines the secret volume source.
properties:
defaultMode:
description: 'defaultMode is Optional: mode bits
used to set permissions on created files by
default. Must be an octal value between 0000
and 0777 or a decimal value between 0 and 511.
YAML accepts both octal and decimal values,
JSON requires decimal values for mode bits.
Defaults to 0644. Directories within the path
are not affected by this setting. This might
be in conflict with other options that affect
the file mode, like fsGroup, and the result
can be other mode bits set.'
format: int32
type: integer
items:
description: items If unspecified, each key-value
pair in the Data field of the referenced Secret
will be projected into the volume as a file
whose name is the key and content is the value.
If specified, the listed keys will be projected
into the specified paths, and unlisted keys
will not be present. If a key is specified which
is not present in the Secret, the volume setup
will error unless it is marked optional. Paths
must be relative and may not contain the '..'
path or start with '..'.
items:
description: Maps a string key to a path within
a volume.
properties:
key:
description: key is the key to project.
type: string
mode:
description: 'mode is Optional: mode bits
used to set permissions on this file.
Must be an octal value between 0000 and
0777 or a decimal value between 0 and
511. YAML accepts both octal and decimal
values, JSON requires decimal values for
mode bits. If not specified, the volume
defaultMode will be used. This might be
in conflict with other options that affect
the file mode, like fsGroup, and the result
can be other mode bits set.'
format: int32
type: integer
path:
description: path is the relative path of
the file to map the key to. May not be
an absolute path. May not contain the
path element '..'. May not start with
the string '..'.
type: string
required:
- key
- path
type: object
type: array
optional:
description: optional field specify whether the
Secret or its keys must be defined
type: boolean
secretName:
description: 'secretName is the name of the secret
in the pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret'
type: string
type: object
subPath:
description: subPath is a relative file path within
the volume to mount.
type: string
required:
- mountPoint
- name
- secret
type: object
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
type: object
volumeClaimTemplates:
description: volumeClaimTemplates information for statefulset.spec.volumeClaimTemplates.
items:
properties:
name:
description: Reference `ClusterDefinition.spec.componentDefs.containers.volumeMounts.name`.
type: string
spec:
description: spec defines the desired characteristics
of a volume requested by a pod author.
properties:
accessModes:
description: 'accessModes contains the desired access
modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1.'
items:
type: string
type: array
x-kubernetes-preserve-unknown-fields: true
resources:
description: 'resources represents the minimum resources
the volume should have. If RecoverVolumeExpansionFailure
feature is enabled users are allowed to specify
resource requirements that are lower than previous
value but must still be higher than capacity recorded
in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources.'
properties:
claims:
description: "Claims lists the names of resources,
defined in spec.resourceClaims, that are used
by this container. \n This is an alpha field
and requires enabling the DynamicResourceAllocation
feature gate. \n This field is immutable. It
can only be set for containers."
items:
description: ResourceClaim references one entry
in PodSpec.ResourceClaims.
properties:
name:
description: Name must match the name of
one entry in pod.spec.resourceClaims of
the Pod where this field is used. It makes
that resource available inside a container.
type: string
required:
- name
type: object
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Limits describes the maximum amount
of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
requests:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Requests describes the minimum amount
of compute resources required. If Requests is
omitted for a container, it defaults to Limits
if that is explicitly specified, otherwise to
an implementation-defined value. Requests cannot
exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
type: object
x-kubernetes-preserve-unknown-fields: true
storageClassName:
description: 'storageClassName is the name of the
StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1.'
type: string
volumeMode:
description: volumeMode defines what type of volume
is required by the claim.
type: string
type: object
required:
- name
type: object
type: array
required:
- replicas
type: object
x-kubernetes-validations:
- message: either componentDefRef or componentDef should be provided
rule: has(self.componentDefRef) || has(self.componentDef)
maxItems: 128
minItems: 1
type: array
x-kubernetes-validations:
- message: duplicated component
rule: self.all(x, size(self.filter(c, c.name == x.name)) == 1)
- message: two kinds of definition API can not be used simultaneously
rule: self.all(x, size(self.filter(c, has(c.componentDef))) == 0)
|| self.all(x, size(self.filter(c, has(c.componentDef))) == size(self))
monitor:
description: monitor specifies the configuration of monitor
properties:
monitoringInterval:
anyOf:
- type: integer
- type: string
description: monitoringInterval specifies interval of monitoring,
no monitor if set to 0
x-kubernetes-int-or-string: true
type: object
network:
description: network specifies the configuration of network
properties:
hostNetworkAccessible:
default: false
description: hostNetworkAccessible specifies whether host network
is accessible. It defaults to false
type: boolean
publiclyAccessible:
default: false
description: publiclyAccessible specifies whether it is publicly
accessible. It defaults to false
type: boolean
type: object
replicas:
description: replicas specifies the replicas of the first componentSpec,
if the replicas of the first componentSpec is specified, this value
will be ignored.
format: int32
type: integer
resources:
description: resources specifies the resources of the first componentSpec,
if the resources of the first componentSpec is specified, this value
will be ignored.
properties:
cpu:
anyOf:
- type: integer
- type: string
description: 'cpu resource needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
memory:
anyOf:
- type: integer
- type: string
description: 'memory resource needed, more info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
services:
description: services defines the services to access a cluster.
items:
description: ClusterService defines the service of a cluster.
properties:
annotations:
additionalProperties:
type: string
description: 'If ServiceType is LoadBalancer, cloud provider
related parameters can be put here More info: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer.'