Skip to content

Commit

Permalink
DSE 6.8.3 support (#233)
Browse files Browse the repository at this point in the history
* Update tests to use DSE 6.8.3

* Update examples

* Adding 6.8.3 to production code

* Adding 6.8.3 to test code

* Fixing newer test CassDCs

* Updating README and buildsettings.yaml

* Ran codegen
  • Loading branch information
jimdickinson committed Sep 3, 2020
1 parent 7224862 commit 0b9885a
Show file tree
Hide file tree
Showing 27 changed files with 44 additions and 34 deletions.
2 changes: 1 addition & 1 deletion buildsettings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jenkins:
- simple-theme-plugin
dev:
images:
- datastax/dse-server:6.8.2
- datastax/dse-server:6.8.3
- datastax/cass-config-builder:1.0.2
- datastax/cassandra-mgmtapi-3_11_7:v0.1.12
Original file line number Diff line number Diff line change
Expand Up @@ -6037,6 +6037,7 @@ spec:
- 6.8.0
- 6.8.1
- 6.8.2
- 6.8.3
- 3.11.6
- 3.11.7
- 4.0.0
Expand Down
6 changes: 3 additions & 3 deletions docs/user/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ for your `CassandraDatacenter` resource, you can use the `serverType`, `serverVe
spec properties.

`serverType` is required and must be either `dse` or `cassandra`. `serverVersion` is also required,
and the supported versions for DSE are `6.8.0` through `6.8.2`, and for Cassandra it is `3.11.6`/`3.11.7`. More versions
and the supported versions for DSE are `6.8.0` through `6.8.3`, and for Cassandra it is `3.11.6` through `3.11.7`. More versions
will be supported in the future.

If `serverImage` is not specified, a default image for the provided `serverType` and
Expand All @@ -333,7 +333,7 @@ metadata:
name: dtcntr
spec:
serverType: dse
serverVersion: 6.8.2
serverVersion: 6.8.3

```

Expand All @@ -359,7 +359,7 @@ metadata:
name: dtcntr
spec:
serverType: dse
serverVersion: 6.8.2
serverVersion: 6.8.3
serverImage: private-docker-registry.example.com/dse-img/dse:5f6e7d8c
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6027,6 +6027,7 @@ spec:
- 6.8.0
- 6.8.1
- 6.8.2
- 6.8.3
- 3.11.6
- 3.11.7
- 4.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ spec:
serverType: "dse"

# Which server version to use. Required.
serverVersion: "6.8.2"
serverVersion: "6.8.3"

# Use the serverImage configuration to override Cass Operator's logic to map
# the serverType plus serverVersion into a public container image on Docker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
spec:
clusterName: cluster2
serverType: dse
serverVersion: "6.8.2"
serverVersion: "6.8.3"
managementApiAuth:
insecure: {}
size: 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
spec:
clusterName: cluster2
serverType: dse
serverVersion: "6.8.2"
serverVersion: "6.8.3"
managementApiAuth:
insecure: {}
size: 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@ const (
dse_6_8_0 = "datastax/dse-server:6.8.0"
dse_6_8_1 = "datastax/dse-server:6.8.1"
dse_6_8_2 = "datastax/dse-server:6.8.2"
dse_6_8_3 = "datastax/dse-server:6.8.3"

ubi_dse_6_8_0 = "datastax/dse-server:6.8.0-ubi7"
ubi_dse_6_8_1 = "datastax/dse-server:6.8.1-ubi7"
ubi_dse_6_8_2 = "datastax/dse-server:6.8.2-ubi7"
ubi_dse_6_8_3 = "datastax/dse-server:6.8.3-ubi7"

EnvBaseImageOs = "BASE_IMAGE_OS"
)
Expand Down Expand Up @@ -110,6 +112,8 @@ func getImageForDefaultBaseOs(sv string) (string, bool) {
return dse_6_8_1, true
case "dse-6.8.2":
return dse_6_8_2, true
case "dse-6.8.3":
return dse_6_8_3, true
case "cassandra-3.11.6":
return cassandra_3_11_6, true
case "cassandra-3.11.7":
Expand All @@ -128,6 +132,8 @@ func getImageForUniversalBaseOs(sv string) (string, bool) {
return ubi_dse_6_8_1, true
case "dse-6.8.2":
return ubi_dse_6_8_2, true
case "dse-6.8.3":
return ubi_dse_6_8_3, true
case "cassandra-3.11.6":
return ubi_cassandra_3_11_6, true
case "cassandra-3.11.7":
Expand Down Expand Up @@ -156,7 +162,7 @@ type CassandraDatacenterSpec struct {

// Version string for config builder,
// used to generate Cassandra server configuration
// +kubebuilder:validation:Enum="6.8.0";"6.8.1";"6.8.2";"3.11.6";"3.11.7";"4.0.0"
// +kubebuilder:validation:Enum="6.8.0";"6.8.1";"6.8.2";"6.8.3";"3.11.6";"3.11.7";"4.0.0"
ServerVersion string `json:"serverVersion"`

// Cassandra server image name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ func Test_makeImage(t *testing.T) {
errString: "server 'dse' and version '6.7.0' do not work together",
},
{
name: "test 6.8.2",
name: "test 6.8.3",
args: args{
serverImage: "",
serverType: "dse",
serverVersion: "6.8.2",
serverVersion: "6.8.3",
},
want: "datastax/dse-server:6.8.2",
want: "datastax/dse-server:6.8.3",
errString: "",
},
}
Expand Down
2 changes: 2 additions & 0 deletions operator/pkg/apis/cassandra/v1beta1/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ func ValidateSingleDatacenter(dc CassandraDatacenter) error {
err = nil
case "6.8.2":
err = nil
case "6.8.3":
err = nil
default:
err = attemptedTo("use unsupported DSE version '%s'", dc.Spec.ServerVersion)
}
Expand Down
14 changes: 7 additions & 7 deletions operator/pkg/apis/cassandra/v1beta1/webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ func Test_ValidateSingleDatacenter(t *testing.T) {
errString: "",
},
{
name: "Dse 6.8.2 Valid",
name: "Dse 6.8.3 Valid",
dc: &CassandraDatacenter{
ObjectMeta: metav1.ObjectMeta{
Name: "exampleDC",
},
Spec: CassandraDatacenterSpec{
ServerType: "dse",
ServerVersion: "6.8.2",
ServerVersion: "6.8.3",
},
},
errString: "",
Expand Down Expand Up @@ -122,7 +122,7 @@ func Test_ValidateSingleDatacenter(t *testing.T) {
},
Spec: CassandraDatacenterSpec{
ServerType: "dse",
ServerVersion: "6.8.2",
ServerVersion: "6.8.3",
DseWorkloads: &DseWorkloads{
AnalyticsEnabled: true,
},
Expand Down Expand Up @@ -180,7 +180,7 @@ func Test_ValidateSingleDatacenter(t *testing.T) {
},
Spec: CassandraDatacenterSpec{
ServerType: "dse",
ServerVersion: "6.8.2",
ServerVersion: "6.8.3",
Config: json.RawMessage(`
{
"cassandra-yaml": {},
Expand All @@ -191,7 +191,7 @@ func Test_ValidateSingleDatacenter(t *testing.T) {
`),
},
},
errString: "attempted to define config jvm-options with dse-6.8.2",
errString: "attempted to define config jvm-options with dse-6.8.3",
},
{
name: "Allow multiple nodes per worker requires resource requests",
Expand All @@ -201,7 +201,7 @@ func Test_ValidateSingleDatacenter(t *testing.T) {
},
Spec: CassandraDatacenterSpec{
ServerType: "dse",
ServerVersion: "6.8.2",
ServerVersion: "6.8.3",
Config: json.RawMessage(`{}`),
AllowMultipleNodesPerWorker: true,
Resources: corev1.ResourceRequirements{
Expand All @@ -226,7 +226,7 @@ func Test_ValidateSingleDatacenter(t *testing.T) {
},
Spec: CassandraDatacenterSpec{
ServerType: "dse",
ServerVersion: "6.8.2",
ServerVersion: "6.8.3",
Config: json.RawMessage(`{}`),
AllowMultipleNodesPerWorker: true,
},
Expand Down
2 changes: 1 addition & 1 deletion operator/pkg/reconciliation/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func CreateMockReconciliationContext(
Size: size,
ClusterName: clusterName,
ServerType: "dse",
ServerVersion: "6.8.2",
ServerVersion: "6.8.3",
StorageConfig: storageConfig,
},
}
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/additional-seeds-two-rack-four-node-dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
clusterName: cluster1
serverType: dse
serverVersion: "6.8.2"
serverVersion: "6.8.3"
managementApiAuth:
insecure: {}
size: 4
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/cluster-wide-install-dc1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
clusterName: cluster1
serverType: dse
serverVersion: "6.8.2"
serverVersion: "6.8.3"
managementApiAuth:
insecure: {}
size: 1
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/cluster-wide-install-dc2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
clusterName: cluster2
serverType: dse
serverVersion: "6.8.2"
serverVersion: "6.8.3"
managementApiAuth:
insecure: {}
size: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
clusterName: cluster2
serverType: dse
serverVersion: "6.8.2"
serverVersion: "6.8.3"
managementApiAuth:
insecure: {}
size: 2
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/default-single-rack-2-node-dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
clusterName: cluster2
serverType: dse
serverVersion: "6.8.2"
serverVersion: "6.8.3"
managementApiAuth:
insecure: {}
size: 2
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/default-single-rack-single-node-dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
clusterName: cluster2
serverType: dse
serverVersion: "6.8.2"
serverVersion: "6.8.3"
managementApiAuth:
insecure: {}
size: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
clusterName: cluster2
serverType: dse
serverVersion: "6.8.2"
serverVersion: "6.8.3"
managementApiAuth:
insecure: {}
size: 1
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/default-three-rack-three-node-dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
clusterName: cluster1
serverType: dse
serverVersion: "6.8.2"
serverVersion: "6.8.3"
managementApiAuth:
insecure: {}
size: 3
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/dse-one-node-dc-with-mtls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
clusterName: cluster1
serverType: dse
serverVersion: "6.8.2"
serverVersion: "6.8.3"
managementApiAuth:
manual:
clientSecretName: mgmt-api-client-credentials
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/graph-dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
clusterName: cluster1
serverType: dse
serverVersion: "6.8.2"
serverVersion: "6.8.3"
dseWorkloads:
graphEnabled: true
managementApiAuth:
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/host-network-dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
clusterName: cluster1
serverType: dse
serverVersion: "6.8.2"
serverVersion: "6.8.3"
managementApiAuth:
insecure: {}
size: 3
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/nodeport-service-dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
clusterName: cluster1
serverType: dse
serverVersion: "6.8.2"
serverVersion: "6.8.3"
managementApiAuth:
insecure: {}
networking:
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/solr-dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
clusterName: cluster1
serverType: dse
serverVersion: "6.8.2"
serverVersion: "6.8.3"
dseWorkloads:
searchEnabled: true
managementApiAuth:
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/spark-dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
clusterName: cluster1
serverType: dse
serverVersion: "6.8.2"
serverVersion: "6.8.3"
dseWorkloads:
analyticsEnabled: true
managementApiAuth:
Expand Down
2 changes: 1 addition & 1 deletion tests/webhook_validation/webhook_validation_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ var _ = Describe(testName, func() {
json = "{\"spec\": {\"serverType\": \"dse\", \"serverVersion\": \"4.8.0\"}}"
k = kubectl.PatchMerge(dcResource, json)
ns.ExecAndLogAndExpectErrorString(step, k,
`spec.serverVersion: Unsupported value: "4.8.0": supported values: "6.8.0", "6.8.1", "6.8.2", "3.11.6", "3.11.7", "4.0.0"`)
`spec.serverVersion: Unsupported value: "4.8.0": supported values: "6.8.0", "6.8.1", "6.8.2", "6.8.3", "3.11.6", "3.11.7", "4.0.0"`)
step = "attempt to change the dc name"
json = "{\"spec\": {\"clusterName\": \"NewName\"}}"
k = kubectl.PatchMerge(dcResource, json)
Expand Down

0 comments on commit 0b9885a

Please sign in to comment.