Skip to content
Closed
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
6 changes: 5 additions & 1 deletion README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ kubectl apply -f https://raw.githubusercontent.com/apache/doris-operator/$(curl
- [config fe specification](https://doris.apache.org/zh-CN/docs/3.0/install/deploy-on-kubernetes/separating-storage-compute/config-fe)
- [config compute specification](http://doris.apache.org/zh-CN/docs/3.0/install/deploy-on-kubernetes/separating-storage-compute/config-cg)

## 文档

- [动态配置持久化与旧集群迁移](doc/operation/runtime_config_persistence.md)

## 开源支持
- [CN Forum](https://ask.selectdb.com/)
- [github issues](https://github.com/apache/doris-operator/issues)
- [Slack](https://apachedoriscommunity.slack.com/archives/C02T886T5AR)
- [Slack](https://apachedoriscommunity.slack.com/archives/C02T886T5AR)
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ kubectl apply -f https://raw.githubusercontent.com/apache/doris-operator/$(curl
- [config fe specification](https://doris.apache.org/docs/3.0/install/deploy-on-kubernetes/separating-storage-compute/config-fe)
- [config compute specification](http://doris.apache.org/docs/3.0/install/deploy-on-kubernetes/separating-storage-compute/config-cg)

## Documentation

- [Runtime configuration persistence and migration](doc/operation/runtime_config_persistence.md)

## Open source support
- [CN Forum](https://ask.selectdb.com/)
- [github issues](https://github.com/apache/doris-operator/issues)
- [Slack](https://apachedoriscommunity.slack.com/archives/C02T886T5AR)
- [Slack](https://apachedoriscommunity.slack.com/archives/C02T886T5AR)
13 changes: 13 additions & 0 deletions api/disaggregated/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ import (
)

type DorisDisaggregatedClusterSpec struct {
// RuntimeConfigPersistence preserves mutable configuration on an existing PVC.
// When omitted, new clusters enable it where safe storage exists; existing
// clusters keep their previous behavior until explicitly migrated.
RuntimeConfigPersistence *RuntimeConfigPersistenceSpec `json:"runtimeConfigPersistence,omitempty"`

//VaultConfigmap specify the configmap that have configuration of file object information. example S3.
//configmap have to config, please reference the doc.
//InstanceConfigMap string `json:"instanceConfigMap,omitempty"`
Expand Down Expand Up @@ -570,3 +575,11 @@ type DorisDisaggregatedClusterList struct {
func init() {
SchemeBuilder.Register(&DorisDisaggregatedCluster{}, &DorisDisaggregatedClusterList{})
}

// RuntimeConfigPersistenceSpec controls persistence of FE, BE and MS mutable configuration.
type RuntimeConfigPersistenceSpec struct {
// Enabled overrides the operator's recorded default. Enabling an existing
// cluster requires the runtime configuration migration tool. Disabling an
// already enabled cluster is not supported because it would lose overrides.
Enabled bool `json:"enabled"`
}
20 changes: 20 additions & 0 deletions api/disaggregated/v1/zz_generated.deepcopy.go

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

13 changes: 13 additions & 0 deletions api/doris/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ var (

// DorisClusterSpec defines the desired state of DorisCluster
type DorisClusterSpec struct {
// RuntimeConfigPersistence preserves mutable configuration on an existing PVC.
// When omitted, new clusters enable it where safe storage exists; existing
// clusters keep their previous behavior until explicitly migrated.
RuntimeConfigPersistence *RuntimeConfigPersistenceSpec `json:"runtimeConfigPersistence,omitempty"`

//defines the fe cluster state that will be created by operator.
FeSpec *FeSpec `json:"feSpec,omitempty"`

Expand Down Expand Up @@ -514,3 +519,11 @@ type DorisClusterList struct {
func init() {
SchemeBuilder.Register(&DorisCluster{}, &DorisClusterList{})
}

// RuntimeConfigPersistenceSpec controls persistence of FE, BE and MS mutable configuration.
type RuntimeConfigPersistenceSpec struct {
// Enabled overrides the operator's recorded default. Enabling an existing
// cluster requires the runtime configuration migration tool. Disabling an
// already enabled cluster is not supported because it would lose overrides.
Enabled bool `json:"enabled"`
}
20 changes: 20 additions & 0 deletions api/doris/v1/zz_generated.deepcopy.go

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

79 changes: 79 additions & 0 deletions config/crd/bases/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9103,6 +9103,21 @@ spec:
description: Krb5ConfigMap is the name of configmap within 'krb5.conf'
type: string
type: object
runtimeConfigPersistence:
description: |-
RuntimeConfigPersistence preserves mutable configuration on an existing PVC.
When omitted, new clusters enable it where safe storage exists; existing
clusters keep their previous behavior until explicitly migrated.
properties:
enabled:
description: |-
Enabled overrides the operator's recorded default. Enabling an existing
cluster requires the runtime configuration migration tool. Disabling an
already enabled cluster is not supported because it would lose overrides.
type: boolean
required:
- enabled
type: object
sharedPersistentVolumeClaims:
description: SharedPersistentVolumeClaims used to configure the shared
pvc that needs to be mounted on the pod
Expand Down Expand Up @@ -16339,6 +16354,21 @@ spec:
type: object
type: array
type: object
runtimeConfigPersistence:
description: |-
RuntimeConfigPersistence preserves mutable configuration on an existing PVC.
When omitted, new clusters enable it where safe storage exists; existing
clusters keep their previous behavior until explicitly migrated.
properties:
enabled:
description: |-
Enabled overrides the operator's recorded default. Enabling an existing
cluster requires the runtime configuration migration tool. Disabling an
already enabled cluster is not supported because it would lose overrides.
type: boolean
required:
- enabled
type: object
type: object
status:
properties:
Expand Down Expand Up @@ -16408,6 +16438,23 @@ spec:
description: DrainTriggered indicates whether the drain
exec has been triggered for the current pod.
type: boolean
initialBackendEpoch:
description: InitialBackendEpoch is reserved for FE-observed
backend process epoch when available.
type: string
initialBackendStartTime:
description: |-
InitialBackendStartTime is the FE-observed LastStartTime for the backend generation
being drained. It is used to reject stale alive=true views during replacement.
type: string
initialContainerID:
description: InitialContainerID is the main container ID
of the pod generation being drained.
type: string
initialPodUID:
description: InitialPodUID is the UID of the pod generation
being drained.
type: string
initialRestartCount:
description: InitialRestartCount records the BE container's
restart count before drain, to detect kubelet restarts.
Expand All @@ -16421,6 +16468,38 @@ spec:
description: Phase is the current step in the graceful action
state machine.
type: string
replacementBackendEpoch:
description: ReplacementBackendEpoch records the FE-observed
backend process epoch accepted for the replacement generation.
type: string
replacementBackendStartTime:
description: ReplacementBackendStartTime records the FE-observed
LastStartTime accepted for the replacement generation.
type: string
replacementContainerID:
description: ReplacementContainerID tracks the replacement
pod's main container ID.
type: string
replacementPodUID:
description: ReplacementPodUID tracks the replacement pod
generation once it is observed ready.
type: string
restartAnomalyDetected:
description: |-
RestartAnomalyDetected indicates that kubelet restarted the main container
after the graceful drain was triggered.
type: boolean
sentinelWritten:
description: |-
SentinelWritten indicates whether the operator has written the terminating sentinel
into the current pod before triggering graceful drain.
type: boolean
stableBackendObservations:
description: StableBackendObservations counts consecutive
WaitBEAlive polls that observed the same accepted replacement
generation.
format: int32
type: integer
startedAt:
description: StartedAt is when the current pod's graceful
action began.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6978,6 +6978,21 @@ spec:
type: object
type: array
type: object
runtimeConfigPersistence:
description: |-
RuntimeConfigPersistence preserves mutable configuration on an existing PVC.
When omitted, new clusters enable it where safe storage exists; existing
clusters keep their previous behavior until explicitly migrated.
properties:
enabled:
description: |-
Enabled overrides the operator's recorded default. Enabling an existing
cluster requires the runtime configuration migration tool. Disabling an
already enabled cluster is not supported because it would lose overrides.
type: boolean
required:
- enabled
type: object
type: object
status:
properties:
Expand Down Expand Up @@ -7047,6 +7062,23 @@ spec:
description: DrainTriggered indicates whether the drain
exec has been triggered for the current pod.
type: boolean
initialBackendEpoch:
description: InitialBackendEpoch is reserved for FE-observed
backend process epoch when available.
type: string
initialBackendStartTime:
description: |-
InitialBackendStartTime is the FE-observed LastStartTime for the backend generation
being drained. It is used to reject stale alive=true views during replacement.
type: string
initialContainerID:
description: InitialContainerID is the main container ID
of the pod generation being drained.
type: string
initialPodUID:
description: InitialPodUID is the UID of the pod generation
being drained.
type: string
initialRestartCount:
description: InitialRestartCount records the BE container's
restart count before drain, to detect kubelet restarts.
Expand All @@ -7060,6 +7092,38 @@ spec:
description: Phase is the current step in the graceful action
state machine.
type: string
replacementBackendEpoch:
description: ReplacementBackendEpoch records the FE-observed
backend process epoch accepted for the replacement generation.
type: string
replacementBackendStartTime:
description: ReplacementBackendStartTime records the FE-observed
LastStartTime accepted for the replacement generation.
type: string
replacementContainerID:
description: ReplacementContainerID tracks the replacement
pod's main container ID.
type: string
replacementPodUID:
description: ReplacementPodUID tracks the replacement pod
generation once it is observed ready.
type: string
restartAnomalyDetected:
description: |-
RestartAnomalyDetected indicates that kubelet restarted the main container
after the graceful drain was triggered.
type: boolean
sentinelWritten:
description: |-
SentinelWritten indicates whether the operator has written the terminating sentinel
into the current pod before triggering graceful drain.
type: boolean
stableBackendObservations:
description: StableBackendObservations counts consecutive
WaitBEAlive polls that observed the same accepted replacement
generation.
format: int32
type: integer
startedAt:
description: StartedAt is when the current pod's graceful
action began.
Expand Down
15 changes: 15 additions & 0 deletions config/crd/bases/doris.apache.com_dorisclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9103,6 +9103,21 @@ spec:
description: Krb5ConfigMap is the name of configmap within 'krb5.conf'
type: string
type: object
runtimeConfigPersistence:
description: |-
RuntimeConfigPersistence preserves mutable configuration on an existing PVC.
When omitted, new clusters enable it where safe storage exists; existing
clusters keep their previous behavior until explicitly migrated.
properties:
enabled:
description: |-
Enabled overrides the operator's recorded default. Enabling an existing
cluster requires the runtime configuration migration tool. Disabling an
already enabled cluster is not supported because it would lose overrides.
type: boolean
required:
- enabled
type: object
sharedPersistentVolumeClaims:
description: SharedPersistentVolumeClaims used to configure the shared
pvc that needs to be mounted on the pod
Expand Down
15 changes: 15 additions & 0 deletions config/crd/bases/doris.selectdb.com_dorisclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9103,6 +9103,21 @@ spec:
description: Krb5ConfigMap is the name of configmap within 'krb5.conf'
type: string
type: object
runtimeConfigPersistence:
description: |-
RuntimeConfigPersistence preserves mutable configuration on an existing PVC.
When omitted, new clusters enable it where safe storage exists; existing
clusters keep their previous behavior until explicitly migrated.
properties:
enabled:
description: |-
Enabled overrides the operator's recorded default. Enabling an existing
cluster requires the runtime configuration migration tool. Disabling an
already enabled cluster is not supported because it would lose overrides.
type: boolean
required:
- enabled
type: object
sharedPersistentVolumeClaims:
description: SharedPersistentVolumeClaims used to configure the shared
pvc that needs to be mounted on the pod
Expand Down
Loading