Skip to content

Commit d9e8c27

Browse files
committed
Merge branch 'main' into support/migrate-config-manager-to-kbagent
2 parents d230240 + eeb11cc commit d9e8c27

35 files changed

+361
-164
lines changed

apis/apps/v1/cluster_types.go

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,20 @@ type ClusterComponentSpec struct {
355355
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
356356

357357
// Specifies a list of PersistentVolumeClaim templates that represent the storage requirements for the Component.
358-
// Each template specifies the desired characteristics of a persistent volume, such as storage class,
359-
// size, and access modes.
360-
// These templates are used to dynamically provision persistent volumes for the Component.
358+
//
359+
// Each template defines the desired characteristics of a persistent volume, such as storage class,
360+
// size, and access modes, used for dynamic provisioning.
361+
//
362+
// PVC Adoption Mechanism:
363+
// KubeBlocks supports adopting existing PVCs (static provisioning) if they meet the following criteria
364+
// before the Cluster is created:
365+
// 1. Naming: The PVC name must follow the KubeBlocks naming convention:
366+
// $(vct-name)-$(pod-name) (e.g., "data-mycluster-mysql-0").
367+
// 2. Labeling: The PVC must carry the label "app.kubernetes.io/managed-by=kubeblocks".
368+
// 3. Ownership: The PVC must not have any existing controller reference.
369+
//
370+
// If these conditions are met, KubeBlocks will automatically take over the PVCs and
371+
// set the Component (or its controlled resources) as the owner/controller reference.
361372
//
362373
// +patchMergeKey=name
363374
// +patchStrategy=merge,retainKeys

apis/apps/v1/componentdefinition_types.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1825,7 +1825,6 @@ type Action struct {
18251825
//
18261826
// This field cannot be updated.
18271827
//
1828-
// +kubebuilder:validation:Maximum=60
18291828
// +kubebuilder:default=0
18301829
// +optional
18311830
TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"`

apis/apps/v1/types.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,8 +500,10 @@ type ProvisionSecretRef struct {
500500

501501
// The namespace where the secret is located.
502502
//
503-
// +kubebuilder:validation:Required
504-
Namespace string `json:"namespace"`
503+
// If not specified, the secret is assumed to be in the same namespace as the cluster.
504+
//
505+
// +optional
506+
Namespace string `json:"namespace,omitempty"`
505507

506508
// The key in the secret data that contains the password.
507509
//

config/crd/bases/apps.kubeblocks.io_clusters.yaml

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,6 @@ spec:
734734

735735
This field cannot be updated.
736736
format: int32
737-
maximum: 60
738737
type: integer
739738
type: object
740739
restartOnChange:
@@ -4455,7 +4454,11 @@ spec:
44554454
description: The unique identifier of the secret.
44564455
type: string
44574456
namespace:
4458-
description: The namespace where the secret is located.
4457+
description: |-
4458+
The namespace where the secret is located.
4459+
4460+
4461+
If not specified, the secret is assumed to be in the same namespace as the cluster.
44594462
type: string
44604463
password:
44614464
default: password
@@ -4464,7 +4467,6 @@ spec:
44644467
type: string
44654468
required:
44664469
- name
4467-
- namespace
44684470
type: object
44694471
required:
44704472
- name
@@ -4483,9 +4485,23 @@ spec:
44834485
volumeClaimTemplates:
44844486
description: |-
44854487
Specifies a list of PersistentVolumeClaim templates that represent the storage requirements for the Component.
4486-
Each template specifies the desired characteristics of a persistent volume, such as storage class,
4487-
size, and access modes.
4488-
These templates are used to dynamically provision persistent volumes for the Component.
4488+
4489+
4490+
Each template defines the desired characteristics of a persistent volume, such as storage class,
4491+
size, and access modes, used for dynamic provisioning.
4492+
4493+
4494+
PVC Adoption Mechanism:
4495+
KubeBlocks supports adopting existing PVCs (static provisioning) if they meet the following criteria
4496+
before the Cluster is created:
4497+
1. Naming: The PVC name must follow the KubeBlocks naming convention:
4498+
$(vct-name)-$(pod-name) (e.g., "data-mycluster-mysql-0").
4499+
2. Labeling: The PVC must carry the label "app.kubernetes.io/managed-by=kubeblocks".
4500+
3. Ownership: The PVC must not have any existing controller reference.
4501+
4502+
4503+
If these conditions are met, KubeBlocks will automatically take over the PVCs and
4504+
set the Component (or its controlled resources) as the owner/controller reference.
44894505
items:
44904506
properties:
44914507
annotations:
@@ -12058,7 +12074,6 @@ spec:
1205812074

1205912075
This field cannot be updated.
1206012076
format: int32
12061-
maximum: 60
1206212077
type: integer
1206312078
type: object
1206412079
restartOnChange:
@@ -15815,8 +15830,11 @@ spec:
1581515830
description: The unique identifier of the secret.
1581615831
type: string
1581715832
namespace:
15818-
description: The namespace where the secret is
15819-
located.
15833+
description: |-
15834+
The namespace where the secret is located.
15835+
15836+
15837+
If not specified, the secret is assumed to be in the same namespace as the cluster.
1582015838
type: string
1582115839
password:
1582215840
default: password
@@ -15825,7 +15843,6 @@ spec:
1582515843
type: string
1582615844
required:
1582715845
- name
15828-
- namespace
1582915846
type: object
1583015847
required:
1583115848
- name
@@ -15844,9 +15861,23 @@ spec:
1584415861
volumeClaimTemplates:
1584515862
description: |-
1584615863
Specifies a list of PersistentVolumeClaim templates that represent the storage requirements for the Component.
15847-
Each template specifies the desired characteristics of a persistent volume, such as storage class,
15848-
size, and access modes.
15849-
These templates are used to dynamically provision persistent volumes for the Component.
15864+
15865+
15866+
Each template defines the desired characteristics of a persistent volume, such as storage class,
15867+
size, and access modes, used for dynamic provisioning.
15868+
15869+
15870+
PVC Adoption Mechanism:
15871+
KubeBlocks supports adopting existing PVCs (static provisioning) if they meet the following criteria
15872+
before the Cluster is created:
15873+
1. Naming: The PVC name must follow the KubeBlocks naming convention:
15874+
$(vct-name)-$(pod-name) (e.g., "data-mycluster-mysql-0").
15875+
2. Labeling: The PVC must carry the label "app.kubernetes.io/managed-by=kubeblocks".
15876+
3. Ownership: The PVC must not have any existing controller reference.
15877+
15878+
15879+
If these conditions are met, KubeBlocks will automatically take over the PVCs and
15880+
set the Component (or its controlled resources) as the owner/controller reference.
1585015881
items:
1585115882
properties:
1585215883
annotations:

config/crd/bases/apps.kubeblocks.io_componentdefinitions.yaml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4711,7 +4711,6 @@ spec:
47114711

47124712
This field cannot be updated.
47134713
format: int32
4714-
maximum: 60
47154714
type: integer
47164715
type: object
47174716
restartOnFileChange:
@@ -5307,7 +5306,6 @@ spec:
53075306

53085307
This field cannot be updated.
53095308
format: int32
5310-
maximum: 60
53115309
type: integer
53125310
type: object
53135311
availableProbe:
@@ -5768,7 +5766,6 @@ spec:
57685766

57695767
This field cannot be updated.
57705768
format: int32
5771-
maximum: 60
57725769
type: integer
57735770
type: object
57745771
dataDump:
@@ -6226,7 +6223,6 @@ spec:
62266223

62276224
This field cannot be updated.
62286225
format: int32
6229-
maximum: 60
62306226
type: integer
62316227
type: object
62326228
dataLoad:
@@ -6677,7 +6673,6 @@ spec:
66776673

66786674
This field cannot be updated.
66796675
format: int32
6680-
maximum: 60
66816676
type: integer
66826677
type: object
66836678
memberJoin:
@@ -7127,7 +7122,6 @@ spec:
71277122

71287123
This field cannot be updated.
71297124
format: int32
7130-
maximum: 60
71317125
type: integer
71327126
type: object
71337127
memberLeave:
@@ -7579,7 +7573,6 @@ spec:
75797573

75807574
This field cannot be updated.
75817575
format: int32
7582-
maximum: 60
75837576
type: integer
75847577
type: object
75857578
postProvision:
@@ -8024,7 +8017,6 @@ spec:
80248017

80258018
This field cannot be updated.
80268019
format: int32
8027-
maximum: 60
80288020
type: integer
80298021
type: object
80308022
preTerminate:
@@ -8469,7 +8461,6 @@ spec:
84698461

84708462
This field cannot be updated.
84718463
format: int32
8472-
maximum: 60
84738464
type: integer
84748465
type: object
84758466
readonly:
@@ -8914,7 +8905,6 @@ spec:
89148905

89158906
This field cannot be updated.
89168907
format: int32
8917-
maximum: 60
89188908
type: integer
89198909
type: object
89208910
readwrite:
@@ -9361,7 +9351,6 @@ spec:
93619351

93629352
This field cannot be updated.
93639353
format: int32
9364-
maximum: 60
93659354
type: integer
93669355
type: object
93679356
reconfigure:
@@ -9798,7 +9787,6 @@ spec:
97989787

97999788
This field cannot be updated.
98009789
format: int32
9801-
maximum: 60
98029790
type: integer
98039791
type: object
98049792
roleProbe:
@@ -10278,7 +10266,6 @@ spec:
1027810266

1027910267
This field cannot be updated.
1028010268
format: int32
10281-
maximum: 60
1028210269
type: integer
1028310270
type: object
1028410271
switchover:
@@ -10734,7 +10721,6 @@ spec:
1073410721

1073510722
This field cannot be updated.
1073610723
format: int32
10737-
maximum: 60
1073810724
type: integer
1073910725
type: object
1074010726
type: object
@@ -18976,7 +18962,6 @@ spec:
1897618962

1897718963
This field cannot be updated.
1897818964
format: int32
18979-
maximum: 60
1898018965
type: integer
1898118966
type: object
1898218967
restartOnFileChange:

config/crd/bases/apps.kubeblocks.io_components.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,6 @@ spec:
605605

606606
This field cannot be updated.
607607
format: int32
608-
maximum: 60
609608
type: integer
610609
type: object
611610
restartOnChange:
@@ -4653,7 +4652,11 @@ spec:
46534652
description: The unique identifier of the secret.
46544653
type: string
46554654
namespace:
4656-
description: The namespace where the secret is located.
4655+
description: |-
4656+
The namespace where the secret is located.
4657+
4658+
4659+
If not specified, the secret is assumed to be in the same namespace as the cluster.
46574660
type: string
46584661
password:
46594662
default: password
@@ -4662,7 +4665,6 @@ spec:
46624665
type: string
46634666
required:
46644667
- name
4665-
- namespace
46664668
type: object
46674669
required:
46684670
- name

config/crd/bases/apps.kubeblocks.io_rollouts.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,6 @@ spec:
587587

588588
This field cannot be updated.
589589
format: int32
590-
maximum: 60
591590
type: integer
592591
type: object
593592
prev:
@@ -1043,7 +1042,6 @@ spec:
10431042

10441043
This field cannot be updated.
10451044
format: int32
1046-
maximum: 60
10471045
type: integer
10481046
type: object
10491047
type: object
@@ -3980,7 +3978,6 @@ spec:
39803978

39813979
This field cannot be updated.
39823980
format: int32
3983-
maximum: 60
39843981
type: integer
39853982
type: object
39863983
prev:
@@ -4436,7 +4433,6 @@ spec:
44364433

44374434
This field cannot be updated.
44384435
format: int32
4439-
maximum: 60
44404436
type: integer
44414437
type: object
44424438
type: object

config/crd/bases/apps.kubeblocks.io_shardingdefinitions.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,6 @@ spec:
509509
510510
This field cannot be updated.
511511
format: int32
512-
maximum: 60
513512
type: integer
514513
type: object
515514
preTerminate:
@@ -954,7 +953,6 @@ spec:
954953
955954
This field cannot be updated.
956955
format: int32
957-
maximum: 60
958956
type: integer
959957
type: object
960958
shardAdd:
@@ -1391,7 +1389,6 @@ spec:
13911389
13921390
This field cannot be updated.
13931391
format: int32
1394-
maximum: 60
13951392
type: integer
13961393
type: object
13971394
shardRemove:
@@ -1828,7 +1825,6 @@ spec:
18281825
18291826
This field cannot be updated.
18301827
format: int32
1831-
maximum: 60
18321828
type: integer
18331829
type: object
18341830
type: object

config/crd/bases/apps.kubeblocks.io_sidecardefinitions.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,6 @@ spec:
542542
543543
This field cannot be updated.
544544
format: int32
545-
maximum: 60
546545
type: integer
547546
type: object
548547
restartOnFileChange:
@@ -2404,7 +2403,6 @@ spec:
24042403
24052404
This field cannot be updated.
24062405
format: int32
2407-
maximum: 60
24082406
type: integer
24092407
type: object
24102408
restartOnFileChange:

config/crd/bases/parameters.kubeblocks.io_componentparameters.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,6 @@ spec:
606606
607607
This field cannot be updated.
608608
format: int32
609-
maximum: 60
610609
type: integer
611610
type: object
612611
restartOnFileChange:

0 commit comments

Comments
 (0)