Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: deprecate and remove fields for connector #585

Merged
merged 3 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apis/risingwave/v1alpha1/risingwave_scale_view_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type RisingWaveScaleViewTargetRef struct {
Name string `json:"name"`

// Component name. Must be one of meta, frontend, compute, and compactor.
// +kubebuilder:validation:Enum=meta;frontend;compute;compactor;connector
// +kubebuilder:validation:Enum=meta;frontend;compute;compactor
Component string `json:"component"`

// UID of the target RisingWave object. Should be set by the mutating webhook.
Expand Down
18 changes: 0 additions & 18 deletions apis/risingwave/v1alpha1/risingwave_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ type RisingWaveGlobalReplicas struct {
// +optional
// +kubebuilder:validation:Minimum=0
Compactor int32 `json:"compactor,omitempty"`

// Replicas of connector component. Replicas specified here is in a default group (with empty name '').
// +optional
// +kubebuilder:validation:Minimum=0
Connector int32 `json:"connector,omitempty"`
}

// RisingWaveComponentsSpec is the spec for RisingWave components.
Expand All @@ -71,9 +66,6 @@ type RisingWaveComponentsSpec struct {

// Compactor contains configuration of the compactor component.
Compactor RisingWaveComponent `json:"compactor,omitempty"`

// Connector contains configuration of the connector component.
Connector RisingWaveComponent `json:"connector,omitempty"`
}

// RisingWaveSpec is the overall spec.
Expand Down Expand Up @@ -112,13 +104,6 @@ type RisingWaveSpec struct {
// +kubebuilder:default=false
EnableStandaloneMode *bool `json:"enableStandaloneMode,omitempty"`

// Flag to control whether to use the embedded connector (recommended). If embedded connector is enabled,
// the dedicated connectors won't be deployed and used anymore and the corresponding fields will be ignored.
// The dedicated connector will be deprecated soon because of its error proneness.
// +optional
// +kubebuilder:default=false
EnableEmbeddedConnector *bool `json:"enableEmbeddedConnector,omitempty"`

// Image for RisingWave component.
Image string `json:"image"`

Expand Down Expand Up @@ -184,9 +169,6 @@ type RisingWaveComponentsReplicasStatus struct {
// Running status of compactor.
Compactor ComponentReplicasStatus `json:"compactor"`

// Running status of connector.
Connector ComponentReplicasStatus `json:"connector"`

// Running status of standalone component.
Standalone ComponentReplicasStatus `json:"standalone"`
}
Expand Down
7 changes: 0 additions & 7 deletions apis/risingwave/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7,275 changes: 0 additions & 7,275 deletions config/crd/bases/risingwave.risingwavelabs.com_risingwaves.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ spec:
- frontend
- compute
- compactor
- connector
type: string
name:
description: Name of the RisingWave object.
Expand Down
7,276 changes: 0 additions & 7,276 deletions config/risingwave-operator-test.yaml

Large diffs are not rendered by default.

7,276 changes: 0 additions & 7,276 deletions config/risingwave-operator.yaml

Large diffs are not rendered by default.

66 changes: 0 additions & 66 deletions docs/general/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -605,20 +605,6 @@ spec.components will be ignored. Standalone mode can be turned on/off dynamicall
</tr>
<tr>
<td>
<code>enableEmbeddedConnector</code><br/>
<em>
bool
</em>
</td>
<td>
<em>(Optional)</em>
<p>Flag to control whether to use the embedded connector (recommended). If embedded connector is enabled,
the dedicated connectors won&rsquo;t be deployed and used anymore and the corresponding fields will be ignored.
The dedicated connector will be deprecated soon because of its error proneness.</p>
</td>
</tr>
<tr>
<td>
<code>image</code><br/>
<em>
string
Expand Down Expand Up @@ -976,19 +962,6 @@ ComponentReplicasStatus
</tr>
<tr>
<td>
<code>connector</code><br/>
<em>
<a href="#risingwave.risingwavelabs.com/v1alpha1.ComponentReplicasStatus">
ComponentReplicasStatus
</a>
</em>
</td>
<td>
<p>Running status of connector.</p>
</td>
</tr>
<tr>
<td>
<code>standalone</code><br/>
<em>
<a href="#risingwave.risingwavelabs.com/v1alpha1.ComponentReplicasStatus">
Expand Down Expand Up @@ -1083,19 +1056,6 @@ RisingWaveComponent
<p>Compactor contains configuration of the compactor component.</p>
</td>
</tr>
<tr>
<td>
<code>connector</code><br/>
<em>
<a href="#risingwave.risingwavelabs.com/v1alpha1.RisingWaveComponent">
RisingWaveComponent
</a>
</em>
</td>
<td>
<p>Connector contains configuration of the connector component.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="risingwave.risingwavelabs.com/v1alpha1.RisingWaveCondition">RisingWaveCondition
Expand Down Expand Up @@ -1420,18 +1380,6 @@ int32
<p>Replicas of compactor component. Replicas specified here is in a default group (with empty name &ldquo;).</p>
</td>
</tr>
<tr>
<td>
<code>connector</code><br/>
<em>
int32
</em>
</td>
<td>
<em>(Optional)</em>
<p>Replicas of connector component. Replicas specified here is in a default group (with empty name &ldquo;).</p>
</td>
</tr>
</tbody>
</table>
<h3 id="risingwave.risingwavelabs.com/v1alpha1.RisingWaveHuaweiCloudOBSCredentials">RisingWaveHuaweiCloudOBSCredentials
Expand Down Expand Up @@ -4210,20 +4158,6 @@ spec.components will be ignored. Standalone mode can be turned on/off dynamicall
</tr>
<tr>
<td>
<code>enableEmbeddedConnector</code><br/>
<em>
bool
</em>
</td>
<td>
<em>(Optional)</em>
<p>Flag to control whether to use the embedded connector (recommended). If embedded connector is enabled,
the dedicated connectors won&rsquo;t be deployed and used anymore and the corresponding fields will be ignored.
The dedicated connector will be deprecated soon because of its error proneness.</p>
</td>
</tr>
<tr>
<td>
<code>image</code><br/>
<em>
string
Expand Down
16 changes: 1 addition & 15 deletions docs/manifests/stable/persistent/minio/risingwave.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -269,18 +269,4 @@ spec:
memory: 32Gi # Memory limit will be set to `RW_TOTAL_MEMORY_BYTES`
requests:
cpu: 8
memory: 32Gi
# Please comment out the following if you do not need connector node
connector:
nodeGroups:
- replicas: 1
name: ''
template:
spec:
resources:
limits:
cpu: 4
memory: 8Gi
requests:
cpu: 4
memory: 8Gi
memory: 32Gi
16 changes: 1 addition & 15 deletions docs/manifests/stable/persistent/s3/risingwave.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,18 +186,4 @@ spec:
memory: 32Gi # Memory limit will be set to `RW_TOTAL_MEMORY_BYTES`
requests:
cpu: 8
memory: 32Gi
# Please comment out the following if you do not need connector node
connector:
nodeGroups:
- replicas: 1
name: ''
template:
spec:
resources:
limits:
cpu: 4
memory: 8Gi
requests:
cpu: 4
memory: 8Gi
memory: 32Gi
3 changes: 0 additions & 3 deletions pkg/consts/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ const (
ComponentFrontend = "frontend"
ComponentCompute = "compute"
ComponentCompactor = "compactor"
ComponentConnector = "connector"
ComponentStandalone = "standalone"
ComponentConfig = "config"
)
Expand Down Expand Up @@ -130,6 +129,4 @@ const (
FrontendMetricsPort int32 = 8080
CompactorServicePort int32 = 6660
CompactorMetricsPort int32 = 1260
ConnectorServicePort int32 = 50051
ConnectorMetricsPort int32 = 50052
)
15 changes: 0 additions & 15 deletions pkg/controller/risingwave_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ const (
RisingWaveAction_SyncCompactorCloneSets = manager.RisingWaveAction_SyncCompactorCloneSets
RisingWaveAction_WaitBeforeCompactorDeploymentsReady = manager.RisingWaveAction_WaitBeforeCompactorDeploymentsReady
RisingWaveAction_WaitBeforeCompactorCloneSetsReady = manager.RisingWaveAction_WaitBeforeCompactorCloneSetsReady
RisingWaveAction_SyncConnectorService = manager.RisingWaveAction_SyncConnectorService
RisingWaveAction_SyncConnectorDeployments = manager.RisingWaveAction_SyncConnectorDeployments
RisingWaveAction_SyncConnectorCloneSets = manager.RisingWaveAction_SyncConnectorCloneSets
RisingWaveAction_WaitBeforeConnectorDeploymentsReady = manager.RisingWaveAction_WaitBeforeConnectorDeploymentsReady
RisingWaveAction_WaitBeforeConnectorCloneSetsReady = manager.RisingWaveAction_WaitBeforeConnectorCloneSetsReady
RisingWaveAction_SyncConfigConfigMap = manager.RisingWaveAction_SyncConfigConfigMap
RisingWaveAction_CollectRunningStatisticsAndSyncStatus = manager.RisingWaveAction_CollectRunningStatisticsAndSyncStatus
RisingWaveAction_SyncServiceMonitor = manager.RisingWaveAction_SyncServiceMonitor
Expand Down Expand Up @@ -313,27 +308,17 @@ func (c *RisingWaveController) reactiveWorkflow(risingwaveManger *object.RisingW
mgr.SyncFrontendDeployments(),
ctrlkit.If(c.openKruiseAvailable, mgr.SyncFrontendCloneSets()),
),
// Sync only when embedded connector is disabled.
ctrlkit.If(!risingwaveManger.IsEmbeddedConnectorEnabled(),
ctrlkit.ParallelJoin(
mgr.SyncConnectorService(),
mgr.SyncConnectorDeployments(),
ctrlkit.If(c.openKruiseAvailable, mgr.SyncConnectorCloneSets()),
),
),
)
otherOpenKruiseComponentsReadyBarrier := ctrlkit.ParallelJoin(
mgr.WaitBeforeFrontendCloneSetsReady(),
mgr.WaitBeforeComputeAdvancedStatefulSetsReady(),
mgr.WaitBeforeCompactorCloneSetsReady(),
ctrlkit.If(!risingwaveManger.IsEmbeddedConnectorEnabled(), mgr.WaitBeforeConnectorCloneSetsReady()),
)

otherComponentsReadyBarrier := ctrlkit.Join(
mgr.WaitBeforeFrontendDeploymentsReady(),
mgr.WaitBeforeComputeStatefulSetsReady(),
mgr.WaitBeforeCompactorDeploymentsReady(),
ctrlkit.If(!risingwaveManger.IsEmbeddedConnectorEnabled(), mgr.WaitBeforeConnectorDeploymentsReady()),
ctrlkit.If(c.openKruiseAvailable, otherOpenKruiseComponentsReadyBarrier),
)

Expand Down
5 changes: 0 additions & 5 deletions pkg/controller/risingwave_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,25 +236,20 @@ func Test_RisingWaveController_Initializing(t *testing.T) {
RisingWaveAction_SyncMetaService: newResultErr(ctrlkit.Continue()),
RisingWaveAction_SyncComputeService: newResultErr(ctrlkit.Continue()),
RisingWaveAction_SyncCompactorService: newResultErr(ctrlkit.Continue()),
RisingWaveAction_SyncConnectorService: newResultErr(ctrlkit.Continue()),
RisingWaveAction_SyncFrontendService: newResultErr(ctrlkit.Continue()),
RisingWaveAction_SyncConfigConfigMap: newResultErr(ctrlkit.Continue()),
RisingWaveAction_SyncMetaStatefulSets: newResultErr(ctrlkit.Continue()),
RisingWaveAction_SyncFrontendDeployments: newResultErr(ctrlkit.Continue()),
RisingWaveAction_SyncCompactorDeployments: newResultErr(ctrlkit.Continue()),
RisingWaveAction_SyncConnectorDeployments: newResultErr(ctrlkit.Continue()),
RisingWaveAction_SyncComputeStatefulSets: newResultErr(ctrlkit.Continue()),
RisingWaveAction_SyncMetaAdvancedStatefulSets: newResultErr(ctrlkit.Continue()),
RisingWaveAction_SyncFrontendCloneSets: newResultErr(ctrlkit.Continue()),
RisingWaveAction_SyncCompactorCloneSets: newResultErr(ctrlkit.Continue()),
RisingWaveAction_SyncConnectorCloneSets: newResultErr(ctrlkit.Continue()),
RisingWaveAction_WaitBeforeMetaStatefulSetsReady: newResultErr(ctrlkit.Exit()),
RisingWaveAction_WaitBeforeFrontendDeploymentsReady: newResultErr(ctrlkit.Exit()),
RisingWaveAction_WaitBeforeComputeStatefulSetsReady: newResultErr(ctrlkit.Exit()),
RisingWaveAction_WaitBeforeCompactorDeploymentsReady: newResultErr(ctrlkit.Exit()),
RisingWaveAction_WaitBeforeCompactorCloneSetsReady: newResultErr(ctrlkit.Exit()),
RisingWaveAction_WaitBeforeConnectorDeploymentsReady: newResultErr(ctrlkit.Exit()),
RisingWaveAction_WaitBeforeConnectorCloneSetsReady: newResultErr(ctrlkit.Exit()),
RisingWaveAction_WaitBeforeMetaAdvancedStatefulSetsReady: newResultErr(ctrlkit.Exit()),
RisingWaveAction_WaitBeforeFrontendCloneSetsReady: newResultErr(ctrlkit.Exit()),
RisingWaveAction_WaitBeforeComputeAdvancedStatefulSetsReady: newResultErr(ctrlkit.Exit()),
Expand Down
38 changes: 18 additions & 20 deletions pkg/factory/envs/risingwave.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,24 @@ const (
RustLog = "RUST_LOG"
JavaOpts = "JAVA_OPTS"

RWListenAddr = "RW_LISTEN_ADDR"
RWAdvertiseAddr = "RW_ADVERTISE_ADDR"
RWDashboardHost = "RW_DASHBOARD_HOST"
RWPrometheusHost = "RW_PROMETHEUS_HOST"
RWEtcdEndpoints = "RW_ETCD_ENDPOINTS"
RWEtcdAuth = "RW_ETCD_AUTH"
RWEtcdUsername = "RW_ETCD_USERNAME"
RWEtcdPassword = "RW_ETCD_PASSWORD"
RWConfigPath = "RW_CONFIG_PATH"
RWStateStore = "RW_STATE_STORE"
RWDataDirectory = "RW_DATA_DIRECTORY"
RWWorkerThreads = "RW_WORKER_THREADS"
RWConnectorRPCEndPoint = "RW_CONNECTOR_RPC_ENDPOINT"
RWBackend = "RW_BACKEND"
RWMetaAddr = "RW_META_ADDR"
RWMetaAddrLegacy = "RW_META_ADDRESS" // Will deprecate soon.
RWPrometheusListenerAddr = "RW_PROMETHEUS_LISTENER_ADDR"
RWParallelism = "RW_PARALLELISM"
RWTotalMemoryBytes = "RW_TOTAL_MEMORY_BYTES"
RWConnectorNodePrometheusPort = "RW_CONNECTOR_NODE_PROMETHEUS_PORT"
RWListenAddr = "RW_LISTEN_ADDR"
RWAdvertiseAddr = "RW_ADVERTISE_ADDR"
RWDashboardHost = "RW_DASHBOARD_HOST"
RWPrometheusHost = "RW_PROMETHEUS_HOST"
RWEtcdEndpoints = "RW_ETCD_ENDPOINTS"
RWEtcdAuth = "RW_ETCD_AUTH"
RWEtcdUsername = "RW_ETCD_USERNAME"
RWEtcdPassword = "RW_ETCD_PASSWORD"
RWConfigPath = "RW_CONFIG_PATH"
RWStateStore = "RW_STATE_STORE"
RWDataDirectory = "RW_DATA_DIRECTORY"
RWWorkerThreads = "RW_WORKER_THREADS"
RWBackend = "RW_BACKEND"
RWMetaAddr = "RW_META_ADDR"
RWMetaAddrLegacy = "RW_META_ADDRESS" // Will deprecate soon.
RWPrometheusListenerAddr = "RW_PROMETHEUS_LISTENER_ADDR"
RWParallelism = "RW_PARALLELISM"
RWTotalMemoryBytes = "RW_TOTAL_MEMORY_BYTES"
)

// MinIO.
Expand Down
Loading
Loading