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

[WIP] Enhancements for DRClusterConfig #1637

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

raaizik
Copy link

@raaizik raaizik commented Nov 3, 2024

Changes

  • Adds CEL rule for ClusterID as it's a required and immutable field
  • Adds basic status to record the phase and generation

Resolves issue #1636

@raaizik raaizik force-pushed the 1636-ra branch 2 times, most recently from 8fc0b7c to f727104 Compare December 10, 2024 13:15
@@ -62,6 +65,14 @@ spec:
type: object
Copy link
Member

Choose a reason for hiding this comment

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

@raaizik This is where the discrepancy is. I am wondering why the make generate output is different for you and the CI.

Most likely a version difference in controller-gen.

@raaizik raaizik force-pushed the 1636-ra branch 5 times, most recently from d3975da to a11c518 Compare December 17, 2024 12:23
ClusterID is required field that's also immutable

Signed-off-by: raaizik <[email protected]>
Adds a basic status to DRClusterConfig reflecting success or
failure of reconciliation

Signed-off-by: raaizik <[email protected]>
Copy link
Member

@ShyamsundarR ShyamsundarR left a comment

Choose a reason for hiding this comment

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

Looks good, some thoughts as below.

Can we add envtests around the following:

  • Check status to ensure it reports the obGen and phase
  • Add a replication schedule to change the generation of DRClusterConfig, and check if status reflects the latest obGen and Status
  • Update the clusterID and expect a failure (due to the added CEL rule)

There is currently no way to test failed Phase (as that requires any one of the k8s APIs to fail, so we can leave that out)

I am thinking about Conditions instead of obGen and Phase, such that as we add S3 store reachability as well to the mix, it can be reported separately, like so:

  Conditions:
  - type: ConfigurationProcessed
    status: T|F
    reason: Processed|Failed
    message:
    obGen:
    transitionTime:
  - type: S3Reachable
    status: T|F
    reason: Reachable|Unreachable
    message:
    obGen:
    transitionTime:

Another reason would be that, phase can change for the same generation, if a new SC/VRC or any class is created on the cluster. To see when this changed we would also need to add a transitionTime to the status. These are covered in Conditions, and hence maybe easier to just use the same?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants