Skip to content

Commit

Permalink
Move reaper's skipSchemaMigration to ReaperTemplate (#1448)
Browse files Browse the repository at this point in the history
This way it should be available in both Reaper.spec and
K8ssandraCluster.spec.reaper
  • Loading branch information
a-mroz authored Nov 20, 2024
1 parent 159abc5 commit fa2154b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG/CHANGELOG-1.21.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ When cutting a new release, update the `unreleased` heading to the tag being gen
## unreleased

* [BUGFIX] [#1383](https://github.com/k8ssandra/k8ssandra-operator/issues/1383) Do not create MedusaBackup if MadusaBakupJob did not fully succeed
* [ENHANCEMENT] [#1667](https://github.com/k8ssahttps://github.com/k8ssandra/k8ssandra/issues/1667) Add `skipSchemaMigration` option to `K8ssandraCluster.spec.reaper`
16 changes: 8 additions & 8 deletions apis/reaper/v1alpha1/reaper_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,14 @@ type ReaperTemplate struct {
// +kubebuilder:default={enabled: false}
// +optional
HttpManagement HttpManagement `json:"httpManagement"`

// Whether to skip schema migration. Schema migration is done in an init container on every Reaper deployment and
// can slow down Reaper's startup time. Besides, schema migration requires reading data at QUORUM. It can be skipped
// if you know that the schema is already up-to-date, or if you know upfront that QUORUM cannot be achieved (for
// example, because a DC is down).
// +optional
// +kubebuilder:default=false
SkipSchemaMigration bool `json:"skipSchemaMigration,omitempty"`
}

// UseExternalSecrets defines whether the user has specified if credentials and
Expand Down Expand Up @@ -290,14 +298,6 @@ type ReaperSpec struct {
// Client encryption stores which are used by Cassandra and Reaper.
// +optional
ClientEncryptionStores *encryption.Stores `json:"clientEncryptionStores,omitempty"`

// Whether to skip schema migration. Schema migration is done in an init container on every Reaper deployment and
// can slow down Reaper's startup time. Besides, schema migration requires reading data at QUORUM. It can be skipped
// if you know that the schema is already up-to-date, or if you know upfront that QUORUM cannot be achieved (for
// example, because a DC is down).
// +optional
// +kubebuilder:default=false
SkipSchemaMigration bool `json:"skipSchemaMigration,omitempty"`
}

// ReaperProgress is a word summarizing the state of a Reaper resource.
Expand Down
8 changes: 8 additions & 0 deletions charts/k8ssandra-operator/crds/k8ssandra-operator-crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28730,6 +28730,14 @@ spec:
type: string
type: object
type: object
skipSchemaMigration:
default: false
description: |-
Whether to skip schema migration. Schema migration is done in an init container on every Reaper deployment and
can slow down Reaper's startup time. Besides, schema migration requires reading data at QUORUM. It can be skipped
if you know that the schema is already up-to-date, or if you know upfront that QUORUM cannot be achieved (for
example, because a DC is down).
type: boolean
storageConfig:
description: |-
If StorageType is "local", Reaper will need a Persistent Volume to persist its data. This field allows
Expand Down
8 changes: 8 additions & 0 deletions config/crd/bases/k8ssandra.io_k8ssandraclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28668,6 +28668,14 @@ spec:
type: string
type: object
type: object
skipSchemaMigration:
default: false
description: |-
Whether to skip schema migration. Schema migration is done in an init container on every Reaper deployment and
can slow down Reaper's startup time. Besides, schema migration requires reading data at QUORUM. It can be skipped
if you know that the schema is already up-to-date, or if you know upfront that QUORUM cannot be achieved (for
example, because a DC is down).
type: boolean
storageConfig:
description: |-
If StorageType is "local", Reaper will need a Persistent Volume to persist its data. This field allows
Expand Down

0 comments on commit fa2154b

Please sign in to comment.