-
Notifications
You must be signed in to change notification settings - Fork 78
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
K8SSAND-1855 ⁃ Cluster level tasks #739
Comments
FYI this feature has become a prerequisite for a cluster-level rebalance task and should be prioritized. cc @adejanovski |
@jsanda why do you suggest a list of datacenters instead of a reference to the K8ssandraCluster object itself? e.g. apiVersion: control.k8ssandra.io/v1alpha1
kind: K8ssandraClusterTask
metadata:
name: upgradesstables
spec:
cluster:
name: cluster1
namespace: k8ssandra-operator
jobs:
- name: upgradesstables-dc1
command: upgradesstables My fear is that users would end up listing DCs that do not belong to the same clusters, in which case a task like rebalance would produce undetermined results. |
I suggested a list in the event the user only wants to run the task across a subset of DCs. |
Hmm I see. What about: apiVersion: control.k8ssandra.io/v1alpha1
kind: K8ssandraClusterTask
metadata:
name: upgradesstables
spec:
cluster:
name: cluster1
namespace: k8ssandra-operator
datacenters: # a list of target DC names, assume all DCs in spec order if not provided
- dc3
- dc1
jobs:
- name: upgradesstables-dc1
command: upgradesstables |
Will |
Would listing datacenters restrict the output to only those, and if left without datacenters array - run to all datacenters? .. and reading the comment, it seems so ;) |
To help answer this question I think it would be good to look at examples for a few different types of CassandraTask to see how they look at the cluster level. I can provide some examples if you would like. It would also be good to discuss what the status will look like. |
Also, I was a bit concerned about the shape that |
@adutra So I guess the alternative would look like: jobs:
rebuild:
- name: "run-my-upgradesstable"
source_datacenter: "dc1" Or did you have some other struct in mind? |
@adejanovski Can we please create an issue for documenting cluster this feature and make sure it gets picked up after #739 is merged? |
What is missing?
cass-operator provides the CassandraTask CRD for performing various operations like rolling restart, cleanup, and rebuild. Here is an example manifest:
Creating this CassandraTask will result in cass-operator running upgradesstables against all nodes in
dc1
.There needs to be an analogous cluster-level task CRD to run tasks against all DCs. It might look something like this:
The
datacenters
list specifies the DCs on which the task should be run as well as the order in which it should be run. Thek8sContext
field tells the operator in which Kubernetes cluster the DC exists.Why do we need it?
Currently if I want to run a task, such as upgradesstables, against a multi-DC cluster I have to some amount of orchestration. k8ssandra-operator should handle this since it already provides cluster-level orchestration and management.
Environment
K8ssandra Operator version:
**Anything else we need to know?**:v1.3.0
┆Issue is synchronized with this Jira Task by Unito
┆friendlyId: K8SSAND-1855
┆priority: Medium
The text was updated successfully, but these errors were encountered: