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

Migrate controllers to reconcile v1alpha1.ScyllaDBDatacenter #2066

Merged

Conversation

zimnx
Copy link
Collaborator

@zimnx zimnx commented Aug 7, 2024

Most controllers which were working on v1.ScyllaCluster are migrated to use v1alpha1.ScyllaDBDatacenter.
Except one which provide features not available yet in new API (Scylla Manager integration).

New controller is responsible for releasing objects managed by current ScyllaCluster and migrating existing ScyllaClusters to ScyllaDBDatacenter.
Released resources are adopted by the new ScyllaDBDatacenter object.

Most of the work is based on this proposal.
During implementation I found that ScyllaDB version upgrades weren't covered in the proposal. Previous implementation kept state of upgrade state machine within ScyllaCluster Status, where new API doesn't have it.
Instead spoiling new API with it, upgrade state machine was changed to keep its state as a ConfigMap.
Migrating controller is aware of it, and migrates the state before ScyllaDBDatacenter is created to make sure it's being picked up by changed ScyllaDBDatacenter controller.

Fixes #2038

Copy link
Contributor

@zimnx: GitHub didn't allow me to request PR reviews from the following users: zimnx.

Note that only scylladb members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

WIP

/cc

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@scylla-operator-bot scylla-operator-bot bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 7, 2024
@zimnx zimnx force-pushed the scylladbdatacenter-controllers branch from 0a7024d to 51feef6 Compare August 7, 2024 20:36
@scylla-operator-bot scylla-operator-bot bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 7, 2024
@zimnx zimnx force-pushed the scylladbdatacenter-controllers branch 13 times, most recently from e8766e4 to b3f1f6f Compare August 13, 2024 17:12
@zimnx zimnx changed the title [WIP] Migrate controllers to v1alpha1.ScyllaDBDatacenter Migrate most of the controllers to reconcile v1alpha1.ScyllaDBDatacenter Aug 13, 2024
@scylla-operator-bot scylla-operator-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 13, 2024
@zimnx zimnx added kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Aug 13, 2024
@scylla-operator-bot scylla-operator-bot bot removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Aug 13, 2024
@zimnx zimnx changed the title Migrate most of the controllers to reconcile v1alpha1.ScyllaDBDatacenter Migrate controllers to reconcile v1alpha1.ScyllaDBDatacenter Aug 13, 2024
@zimnx zimnx requested a review from rzetelskik August 13, 2024 17:14
@zimnx zimnx force-pushed the scylladbdatacenter-controllers branch 5 times, most recently from 7aed2b1 to a0f75de Compare September 4, 2024 16:15
@rzetelskik rzetelskik self-requested a review September 4, 2024 16:25
Copy link
Member

@rzetelskik rzetelskik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm
/assign tnozicka

@zimnx zimnx force-pushed the scylladbdatacenter-controllers branch 2 times, most recently from 9ebba10 to 793c71d Compare September 5, 2024 20:12
@zimnx zimnx requested a review from tnozicka September 6, 2024 08:48
@zimnx zimnx force-pushed the scylladbdatacenter-controllers branch 2 times, most recently from 7e490f2 to 35129c9 Compare September 6, 2024 18:41
@scylla-operator-bot scylla-operator-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 10, 2024
@zimnx zimnx force-pushed the scylladbdatacenter-controllers branch from 35129c9 to b9dacb5 Compare September 11, 2024 08:40
@scylla-operator-bot scylla-operator-bot bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 11, 2024
…ScyllaDBDatacenter

Most controllers which were working on v1.ScyllaCluster are migrated to use v1alpha1.ScyllaDBDatacenter.
Except one which provide features not available yet in new API (Scylla Manager integration).

New controller is responsible for releasing objects managed by current ScyllaCluster and migrating existing ScyllaClusters to ScyllaDBDatacenter.
Released resources are adopted by the new ScyllaDBDatacenter object.

Most of the work is based on [this proposal](https://github.com/scylladb/scylla-operator/blob/master/enhancements/proposals/1978-scylladbdatacenter-api/README.md).
During implementation I found that ScyllaDB version upgrades weren't covered in the proposal. Previous implementation kept state of upgrade state machine within ScyllaCluster Status, where new API doesn't have it.
Instead spoiling new API with it, upgrade state machine was changed to keep its state as a ConfigMap.
Migrating controller is aware of it, and migrates the state before ScyllaDBDatacenter is created to make sure it's being picked up by changed ScyllaDBDatacenter controller.
@zimnx zimnx force-pushed the scylladbdatacenter-controllers branch 4 times, most recently from bb2a464 to 1c4e463 Compare September 12, 2024 08:33
@zimnx zimnx force-pushed the scylladbdatacenter-controllers branch from 1c4e463 to 128682d Compare September 12, 2024 09:43
@tnozicka
Copy link
Contributor

/approve

Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rzetelskik, tnozicka, zimnx

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tnozicka
Copy link
Contributor

/lgtm

@scylla-operator-bot scylla-operator-bot bot added the lgtm Indicates that a PR is ready to be merged. label Sep 18, 2024
@scylla-operator-bot scylla-operator-bot bot merged commit 5b2ae31 into scylladb:master Sep 18, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate controllers to use v1alpha1.ScyllaDBDatacenter
3 participants