Skip to content

Commit b79f45e

Browse files
authored
chore: remove deprecated cluster field in ServiceRef (#9502)
1 parent 1d67e4b commit b79f45e

7 files changed

Lines changed: 49 additions & 239 deletions

File tree

apis/apps/v1/types.go

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -66,30 +66,12 @@ type ServiceRef struct {
6666
// +optional
6767
Namespace string `json:"namespace,omitempty"`
6868

69-
// Specifies the name of the KubeBlocks Cluster being referenced.
70-
// This is used when services from another KubeBlocks Cluster are consumed.
71-
//
72-
// By default, the referenced KubeBlocks Cluster's `clusterDefinition.spec.connectionCredential`
73-
// will be utilized to bind to the current Component. This credential should include:
74-
// `endpoint`, `port`, `username`, and `password`.
75-
//
76-
// Note:
77-
//
78-
// - The `ServiceKind` and `ServiceVersion` specified in the service reference within the
79-
// ClusterDefinition are not validated when using this approach.
80-
// - If both `cluster` and `serviceDescriptor` are present, `cluster` will take precedence.
81-
//
82-
// Deprecated since v0.9 since `clusterDefinition.spec.connectionCredential` is deprecated,
83-
// use `clusterServiceSelector` instead.
84-
// This field is maintained for backward compatibility and its use is discouraged.
85-
// Existing usage should be updated to the current preferred approach to avoid compatibility issues in future releases.
86-
//
87-
// +kubebuilder:deprecatedversion:warning="This field has been deprecated since 0.9.0"
88-
// +optional
89-
Cluster string `json:"cluster,omitempty"`
90-
9169
// References a service provided by another KubeBlocks Cluster.
9270
// It specifies the ClusterService and the account credentials needed for access.
71+
// The `ServiceKind` and `ServiceVersion` specified in the service reference within the
72+
// ClusterDefinition are not validated when using this approach.
73+
//
74+
// If both `clusterServiceSelector` and `serviceDescriptor` are specified, the `clusterServiceSelector` takes precedence.
9375
//
9476
// +optional
9577
ClusterServiceSelector *ServiceRefClusterSelector `json:"clusterServiceSelector,omitempty"`
@@ -101,7 +83,7 @@ type ServiceRef struct {
10183
// The `serviceDescriptor.spec.serviceKind` and `serviceDescriptor.spec.serviceVersion` should match the serviceKind
10284
// and serviceVersion declared in the definition.
10385
//
104-
// If both `cluster` and `serviceDescriptor` are specified, the `cluster` takes precedence.
86+
// If both `clusterServiceSelector` and `serviceDescriptor` are specified, the `clusterServiceSelector` takes precedence.
10587
//
10688
// +optional
10789
ServiceDescriptor string `json:"serviceDescriptor,omitempty"`

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

Lines changed: 12 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -3957,34 +3957,15 @@ spec:
39573957
The example above includes ServiceRefs to an external Redis Sentinel service and a PostgreSQL Cluster.
39583958
items:
39593959
properties:
3960-
cluster:
3961-
description: |-
3962-
Specifies the name of the KubeBlocks Cluster being referenced.
3963-
This is used when services from another KubeBlocks Cluster are consumed.
3964-
3965-
3966-
By default, the referenced KubeBlocks Cluster's `clusterDefinition.spec.connectionCredential`
3967-
will be utilized to bind to the current Component. This credential should include:
3968-
`endpoint`, `port`, `username`, and `password`.
3969-
3970-
3971-
Note:
3972-
3973-
3974-
- The `ServiceKind` and `ServiceVersion` specified in the service reference within the
3975-
ClusterDefinition are not validated when using this approach.
3976-
- If both `cluster` and `serviceDescriptor` are present, `cluster` will take precedence.
3977-
3978-
3979-
Deprecated since v0.9 since `clusterDefinition.spec.connectionCredential` is deprecated,
3980-
use `clusterServiceSelector` instead.
3981-
This field is maintained for backward compatibility and its use is discouraged.
3982-
Existing usage should be updated to the current preferred approach to avoid compatibility issues in future releases.
3983-
type: string
39843960
clusterServiceSelector:
39853961
description: |-
39863962
References a service provided by another KubeBlocks Cluster.
39873963
It specifies the ClusterService and the account credentials needed for access.
3964+
The `ServiceKind` and `ServiceVersion` specified in the service reference within the
3965+
ClusterDefinition are not validated when using this approach.
3966+
3967+
3968+
If both `clusterServiceSelector` and `serviceDescriptor` are specified, the `clusterServiceSelector` takes precedence.
39883969
properties:
39893970
cluster:
39903971
description: The name of the Cluster being referenced.
@@ -4085,7 +4066,7 @@ spec:
40854066
and serviceVersion declared in the definition.
40864067

40874068

4088-
If both `cluster` and `serviceDescriptor` are specified, the `cluster` takes precedence.
4069+
If both `clusterServiceSelector` and `serviceDescriptor` are specified, the `clusterServiceSelector` takes precedence.
40894070
type: string
40904071
required:
40914072
- name
@@ -15060,34 +15041,15 @@ spec:
1506015041
The example above includes ServiceRefs to an external Redis Sentinel service and a PostgreSQL Cluster.
1506115042
items:
1506215043
properties:
15063-
cluster:
15064-
description: |-
15065-
Specifies the name of the KubeBlocks Cluster being referenced.
15066-
This is used when services from another KubeBlocks Cluster are consumed.
15067-
15068-
15069-
By default, the referenced KubeBlocks Cluster's `clusterDefinition.spec.connectionCredential`
15070-
will be utilized to bind to the current Component. This credential should include:
15071-
`endpoint`, `port`, `username`, and `password`.
15072-
15073-
15074-
Note:
15075-
15076-
15077-
- The `ServiceKind` and `ServiceVersion` specified in the service reference within the
15078-
ClusterDefinition are not validated when using this approach.
15079-
- If both `cluster` and `serviceDescriptor` are present, `cluster` will take precedence.
15080-
15081-
15082-
Deprecated since v0.9 since `clusterDefinition.spec.connectionCredential` is deprecated,
15083-
use `clusterServiceSelector` instead.
15084-
This field is maintained for backward compatibility and its use is discouraged.
15085-
Existing usage should be updated to the current preferred approach to avoid compatibility issues in future releases.
15086-
type: string
1508715044
clusterServiceSelector:
1508815045
description: |-
1508915046
References a service provided by another KubeBlocks Cluster.
1509015047
It specifies the ClusterService and the account credentials needed for access.
15048+
The `ServiceKind` and `ServiceVersion` specified in the service reference within the
15049+
ClusterDefinition are not validated when using this approach.
15050+
15051+
15052+
If both `clusterServiceSelector` and `serviceDescriptor` are specified, the `clusterServiceSelector` takes precedence.
1509115053
properties:
1509215054
cluster:
1509315055
description: The name of the Cluster being referenced.
@@ -15188,7 +15150,7 @@ spec:
1518815150
and serviceVersion declared in the definition.
1518915151

1519015152

15191-
If both `cluster` and `serviceDescriptor` are specified, the `cluster` takes precedence.
15153+
If both `clusterServiceSelector` and `serviceDescriptor` are specified, the `clusterServiceSelector` takes precedence.
1519215154
type: string
1519315155
required:
1519415156
- name

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

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3730,34 +3730,15 @@ spec:
37303730
The example above includes ServiceRefs to an external Redis Sentinel service and a PostgreSQL Cluster.
37313731
items:
37323732
properties:
3733-
cluster:
3734-
description: |-
3735-
Specifies the name of the KubeBlocks Cluster being referenced.
3736-
This is used when services from another KubeBlocks Cluster are consumed.
3737-
3738-
3739-
By default, the referenced KubeBlocks Cluster's `clusterDefinition.spec.connectionCredential`
3740-
will be utilized to bind to the current Component. This credential should include:
3741-
`endpoint`, `port`, `username`, and `password`.
3742-
3743-
3744-
Note:
3745-
3746-
3747-
- The `ServiceKind` and `ServiceVersion` specified in the service reference within the
3748-
ClusterDefinition are not validated when using this approach.
3749-
- If both `cluster` and `serviceDescriptor` are present, `cluster` will take precedence.
3750-
3751-
3752-
Deprecated since v0.9 since `clusterDefinition.spec.connectionCredential` is deprecated,
3753-
use `clusterServiceSelector` instead.
3754-
This field is maintained for backward compatibility and its use is discouraged.
3755-
Existing usage should be updated to the current preferred approach to avoid compatibility issues in future releases.
3756-
type: string
37573733
clusterServiceSelector:
37583734
description: |-
37593735
References a service provided by another KubeBlocks Cluster.
37603736
It specifies the ClusterService and the account credentials needed for access.
3737+
The `ServiceKind` and `ServiceVersion` specified in the service reference within the
3738+
ClusterDefinition are not validated when using this approach.
3739+
3740+
3741+
If both `clusterServiceSelector` and `serviceDescriptor` are specified, the `clusterServiceSelector` takes precedence.
37613742
properties:
37623743
cluster:
37633744
description: The name of the Cluster being referenced.
@@ -3858,7 +3839,7 @@ spec:
38583839
and serviceVersion declared in the definition.
38593840

38603841

3861-
If both `cluster` and `serviceDescriptor` are specified, the `cluster` takes precedence.
3842+
If both `clusterServiceSelector` and `serviceDescriptor` are specified, the `clusterServiceSelector` takes precedence.
38623843
type: string
38633844
required:
38643845
- name

deploy/helm/crds/apps.kubeblocks.io_clusters.yaml

Lines changed: 12 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -3957,34 +3957,15 @@ spec:
39573957
The example above includes ServiceRefs to an external Redis Sentinel service and a PostgreSQL Cluster.
39583958
items:
39593959
properties:
3960-
cluster:
3961-
description: |-
3962-
Specifies the name of the KubeBlocks Cluster being referenced.
3963-
This is used when services from another KubeBlocks Cluster are consumed.
3964-
3965-
3966-
By default, the referenced KubeBlocks Cluster's `clusterDefinition.spec.connectionCredential`
3967-
will be utilized to bind to the current Component. This credential should include:
3968-
`endpoint`, `port`, `username`, and `password`.
3969-
3970-
3971-
Note:
3972-
3973-
3974-
- The `ServiceKind` and `ServiceVersion` specified in the service reference within the
3975-
ClusterDefinition are not validated when using this approach.
3976-
- If both `cluster` and `serviceDescriptor` are present, `cluster` will take precedence.
3977-
3978-
3979-
Deprecated since v0.9 since `clusterDefinition.spec.connectionCredential` is deprecated,
3980-
use `clusterServiceSelector` instead.
3981-
This field is maintained for backward compatibility and its use is discouraged.
3982-
Existing usage should be updated to the current preferred approach to avoid compatibility issues in future releases.
3983-
type: string
39843960
clusterServiceSelector:
39853961
description: |-
39863962
References a service provided by another KubeBlocks Cluster.
39873963
It specifies the ClusterService and the account credentials needed for access.
3964+
The `ServiceKind` and `ServiceVersion` specified in the service reference within the
3965+
ClusterDefinition are not validated when using this approach.
3966+
3967+
3968+
If both `clusterServiceSelector` and `serviceDescriptor` are specified, the `clusterServiceSelector` takes precedence.
39883969
properties:
39893970
cluster:
39903971
description: The name of the Cluster being referenced.
@@ -4085,7 +4066,7 @@ spec:
40854066
and serviceVersion declared in the definition.
40864067

40874068

4088-
If both `cluster` and `serviceDescriptor` are specified, the `cluster` takes precedence.
4069+
If both `clusterServiceSelector` and `serviceDescriptor` are specified, the `clusterServiceSelector` takes precedence.
40894070
type: string
40904071
required:
40914072
- name
@@ -15060,34 +15041,15 @@ spec:
1506015041
The example above includes ServiceRefs to an external Redis Sentinel service and a PostgreSQL Cluster.
1506115042
items:
1506215043
properties:
15063-
cluster:
15064-
description: |-
15065-
Specifies the name of the KubeBlocks Cluster being referenced.
15066-
This is used when services from another KubeBlocks Cluster are consumed.
15067-
15068-
15069-
By default, the referenced KubeBlocks Cluster's `clusterDefinition.spec.connectionCredential`
15070-
will be utilized to bind to the current Component. This credential should include:
15071-
`endpoint`, `port`, `username`, and `password`.
15072-
15073-
15074-
Note:
15075-
15076-
15077-
- The `ServiceKind` and `ServiceVersion` specified in the service reference within the
15078-
ClusterDefinition are not validated when using this approach.
15079-
- If both `cluster` and `serviceDescriptor` are present, `cluster` will take precedence.
15080-
15081-
15082-
Deprecated since v0.9 since `clusterDefinition.spec.connectionCredential` is deprecated,
15083-
use `clusterServiceSelector` instead.
15084-
This field is maintained for backward compatibility and its use is discouraged.
15085-
Existing usage should be updated to the current preferred approach to avoid compatibility issues in future releases.
15086-
type: string
1508715044
clusterServiceSelector:
1508815045
description: |-
1508915046
References a service provided by another KubeBlocks Cluster.
1509015047
It specifies the ClusterService and the account credentials needed for access.
15048+
The `ServiceKind` and `ServiceVersion` specified in the service reference within the
15049+
ClusterDefinition are not validated when using this approach.
15050+
15051+
15052+
If both `clusterServiceSelector` and `serviceDescriptor` are specified, the `clusterServiceSelector` takes precedence.
1509115053
properties:
1509215054
cluster:
1509315055
description: The name of the Cluster being referenced.
@@ -15188,7 +15150,7 @@ spec:
1518815150
and serviceVersion declared in the definition.
1518915151

1519015152

15191-
If both `cluster` and `serviceDescriptor` are specified, the `cluster` takes precedence.
15153+
If both `clusterServiceSelector` and `serviceDescriptor` are specified, the `clusterServiceSelector` takes precedence.
1519215154
type: string
1519315155
required:
1519415156
- name

deploy/helm/crds/apps.kubeblocks.io_components.yaml

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3730,34 +3730,15 @@ spec:
37303730
The example above includes ServiceRefs to an external Redis Sentinel service and a PostgreSQL Cluster.
37313731
items:
37323732
properties:
3733-
cluster:
3734-
description: |-
3735-
Specifies the name of the KubeBlocks Cluster being referenced.
3736-
This is used when services from another KubeBlocks Cluster are consumed.
3737-
3738-
3739-
By default, the referenced KubeBlocks Cluster's `clusterDefinition.spec.connectionCredential`
3740-
will be utilized to bind to the current Component. This credential should include:
3741-
`endpoint`, `port`, `username`, and `password`.
3742-
3743-
3744-
Note:
3745-
3746-
3747-
- The `ServiceKind` and `ServiceVersion` specified in the service reference within the
3748-
ClusterDefinition are not validated when using this approach.
3749-
- If both `cluster` and `serviceDescriptor` are present, `cluster` will take precedence.
3750-
3751-
3752-
Deprecated since v0.9 since `clusterDefinition.spec.connectionCredential` is deprecated,
3753-
use `clusterServiceSelector` instead.
3754-
This field is maintained for backward compatibility and its use is discouraged.
3755-
Existing usage should be updated to the current preferred approach to avoid compatibility issues in future releases.
3756-
type: string
37573733
clusterServiceSelector:
37583734
description: |-
37593735
References a service provided by another KubeBlocks Cluster.
37603736
It specifies the ClusterService and the account credentials needed for access.
3737+
The `ServiceKind` and `ServiceVersion` specified in the service reference within the
3738+
ClusterDefinition are not validated when using this approach.
3739+
3740+
3741+
If both `clusterServiceSelector` and `serviceDescriptor` are specified, the `clusterServiceSelector` takes precedence.
37613742
properties:
37623743
cluster:
37633744
description: The name of the Cluster being referenced.
@@ -3858,7 +3839,7 @@ spec:
38583839
and serviceVersion declared in the definition.
38593840

38603841

3861-
If both `cluster` and `serviceDescriptor` are specified, the `cluster` takes precedence.
3842+
If both `clusterServiceSelector` and `serviceDescriptor` are specified, the `clusterServiceSelector` takes precedence.
38623843
type: string
38633844
required:
38643845
- name

0 commit comments

Comments
 (0)