-
Notifications
You must be signed in to change notification settings - Fork 76
Improved Reaper integration #307
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
Conversation
|
If the operator isn't doing anything with this reaper information would it make more sense to use an annotation instead of fields in the spec? |
|
The operator is using it. The operator needs it to make REST calls to the
Reaper instance.
On Fri, Oct 30, 2020 at 11:06 PM Christopher Bradford < ***@***.***> wrote:
If the operator isn't doing anything with this reaper information would it
make more sense to use an annotation instead of fields in the spec?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#307 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABJBOIBJLO5DOGKCITP4M3SNN5MBANCNFSM4TFT3NYQ>
.
--
- John
|
|
Gotcha, I did not pick up on that from the text. I'll dig into this in a bit. |
|
Thanks!
On Fri, Oct 30, 2020 at 11:23 PM Christopher Bradford < ***@***.***> wrote:
Gotcha, I did not pick up on that from the text. I'll dig into this in a
bit.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#307 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABJBOPH6UF7ZWONGKZPTVTSNN7KFANCNFSM4TFT3NYQ>
.
--
- John
|
I thought some more about this. The CassandraDatacenter would need to specify two annotations:
I could then have a controller in reaper-operator that watches CassandraDatacenters and takes action if those annotations are present. In particular, the controller would make the REST call to Reaper to register the Cassandra cluster. We would still need cass-operator to set up remote JMX though which it is doing based on @bradfordcp / @jimdickinson wdyt? |
| DatacenterResuming DatacenterConditionType = "Resuming" | ||
| DatacenterRollingRestart DatacenterConditionType = "RollingRestart" | ||
| DatacenterValid DatacenterConditionType = "Valid" | ||
| DatacenterReaperManage DatacenterConditionType = "Reaper" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit - did you mean Manage? or Manager or Managed?
| } | ||
|
|
||
| type ReaperConfig struct { | ||
| // Other properties in ReaperConfig are ignores unless this is set to true. When set to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Other properties in ReaperConfig are ignores unless this is set to true. When set to | |
| // Other properties in ReaperConfig are ignored unless this is set to true. When set to |
| type ReaperConfig struct { | ||
| // Other properties in ReaperConfig are ignores unless this is set to true. When set to | ||
| // true, the operator will enable remote JMX in the Cassandra cluster since Reaper | ||
| // manages repairs via JMX. Note that setting this to true after the Cassandra cluster |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit - is this more clear about the expected behavior?
| // manages repairs via JMX. Note that setting this to true after the Cassandra cluster | |
| // manages repairs via JMX. Note that toggling this to true after the Cassandra cluster |
|
I prototyped a new controller in reaper-operator that watches For this PR that means I only need the changes for setting up remote JMX. I am going to update the PR accordingly. I am still going to remove the Reaper sidecar stuff since it was broken. In summary, setting |
|
@jimdickinson I removed Reaper specific code since that will be handled in reaper-operator. We can probably remove I think it would make more sense to add something like: type RemoteJmxConfig struct {
Enabled bool
JmxSecretName string
}Remote JMX is not specific to Reaper. As a user who wants to use some remote management tool (other than Reaper) with my cluster, |
|
Rerunning checks |
| } | ||
| //if recResult := rc.CheckReaperSchemaInitialized(); recResult.Completed() { | ||
| // return recResult.Output() | ||
| //} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just delete these lines if not needed?
We want the server config init container to run first so other initContainers can access the server config files.
|
I am closing this out. See #335 for details. |
Cass Operator has the ability to deploy Reaper in sidecar mode. Due to #211 it is not very usable. This PR introduces new and improved integration where Reaper is run as a separate deployment. Cass Operator does not deploy Reaper. This is handled by reaper-operator.
A CassandraDatacenter only needs to specify a couple things as illustrated in this example:
When Reaper is deployed on its own, it requires remote JMX for running repairs. This PR introduces changes to configure the cluster with remote JMX when
.spec.reaper.enabledis true..spec.reaper.namespecifies the name of aReaperobject. A namespace can also be specified if the Reaper object lives in a different namespace.Here is what a
Reapermanifest looks like:In this example the
Reaperobject is configured to also use the Cassandra cluster as its backend; however, this is not required.When Reaper is run in sidecar mode, it will auto register the cluster to which it is attached. This PR includes changes to automatically register the C* cluster with Reaper. It also includes checks to ensure it remains registered.
There are probably more changes needed with this PR, but it is ready for review.