This repository has been archived by the owner on Oct 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scales up and down a DC in multi-dcs (#335)
- Loading branch information
Showing
12 changed files
with
147 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,3 @@ spec: | |
- name: dc1 | ||
rack: | ||
- name: rack1 | ||
- name: dc2 | ||
rack: | ||
- name: rack1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: db.orange.com/v1alpha1 | ||
kind: CassandraCluster | ||
metadata: | ||
name: cassandra-e2e | ||
spec: | ||
topology: | ||
dc: | ||
- name: dc1 | ||
rack: | ||
- name: rack1 | ||
- name: dc2 | ||
rack: | ||
- name: rack1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: cassandra-e2e-dc1-rack1 | ||
status: | ||
currentReplicas: 1 | ||
replicas: 1 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: cassandra-e2e-dc2-rack1 | ||
status: | ||
currentReplicas: 1 | ||
replicas: 1 | ||
--- | ||
apiVersion: db.orange.com/v1alpha1 | ||
kind: CassandraCluster | ||
metadata: | ||
name: cassandra-e2e | ||
status: | ||
lastClusterAction: Initializing | ||
lastClusterActionStatus: Done | ||
phase: Running |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: cassandra-e2e-dc1-rack1 | ||
status: | ||
currentReplicas: 1 | ||
replicas: 1 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: cassandra-e2e-dc2-rack1 | ||
status: | ||
currentReplicas: 1 | ||
replicas: 1 | ||
--- | ||
apiVersion: db.orange.com/v1alpha1 | ||
kind: CassandraCluster | ||
metadata: | ||
name: cassandra-e2e | ||
status: | ||
lastClusterAction: CorrectCRDConfig | ||
lastClusterActionStatus: Done | ||
phase: Running |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: db.orange.com/v1alpha1 | ||
kind: CassandraCluster | ||
metadata: | ||
name: cassandra-e2e | ||
spec: | ||
topology: | ||
dc: | ||
- name: dc1 | ||
rack: | ||
- name: rack1 | ||
- name: dc2 | ||
nodesPerRacks: 0 | ||
rack: | ||
- name: rack1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
# Replicate system_auth, system_traces and system_distributed to dc1 only | ||
- script: | | ||
for keyspace in system_auth system_traces system_distributed | ||
do | ||
kubectl exec -n $NAMESPACE cassandra-e2e-dc1-rack1-0 -- cqlsh -e "ALTER KEYSPACE $keyspace WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': '1'}" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: cassandra-e2e-dc1-rack1 | ||
status: | ||
currentReplicas: 1 | ||
replicas: 1 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: cassandra-e2e-dc2-rack1 | ||
status: | ||
replicas: 0 | ||
--- | ||
apiVersion: db.orange.com/v1alpha1 | ||
kind: CassandraCluster | ||
metadata: | ||
name: cassandra-e2e | ||
status: | ||
lastClusterAction: ScaleDown | ||
lastClusterActionStatus: Done | ||
phase: Running |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: db.orange.com/v1alpha1 | ||
kind: CassandraCluster | ||
metadata: | ||
name: cassandra-e2e | ||
spec: | ||
topology: | ||
dc: | ||
- name: dc1 | ||
rack: | ||
- name: rack1 | ||
- name: dc2 | ||
nodesPerRacks: 0 | ||
rack: | ||
- name: rack1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: cassandra-e2e-dc1-rack1 | ||
status: | ||
currentReplicas: 1 | ||
replicas: 1 | ||
--- | ||
apiVersion: db.orange.com/v1alpha1 | ||
kind: CassandraCluster | ||
metadata: | ||
name: cassandra-e2e | ||
status: | ||
lastClusterAction: ActionDeleteDC | ||
lastClusterActionStatus: Done | ||
phase: Running |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: db.orange.com/v1alpha1 | ||
kind: CassandraCluster | ||
metadata: | ||
name: cassandra-e2e | ||
spec: | ||
topology: | ||
dc: | ||
- name: dc1 | ||
rack: | ||
- name: rack1 |