From a649a6b3372b2d9d2123e658920b7f37d0be188d Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Mon, 7 Aug 2023 12:10:03 +0300 Subject: [PATCH] Use dse-mgmtapi-6_8 for DSE 6.8 images, use -ubi8 instead of -ubi7 Prefix all deployed images with cr.k8ssandra.io or cr.dstx.io in tagged releases Fix to use cr.dtsx.io and not cr.dstx.io, update integ-test to use 6.8.37-ubi8 instead of 6.8.29 Add CHANGELOG for 479 --- .github/workflows/kindIntegTest.yml | 12 ++++++------ CHANGELOG.md | 1 + config/manager/image_config.yaml | 5 +++-- pkg/images/images_test.go | 4 ++-- .../construct_podtemplatespec_test.go | 8 ++++---- scripts/pre-release-process.sh | 14 +++++++++++++- 6 files changed, 29 insertions(+), 15 deletions(-) diff --git a/.github/workflows/kindIntegTest.yml b/.github/workflows/kindIntegTest.yml index 07f058ccf..b1f4f031d 100644 --- a/.github/workflows/kindIntegTest.yml +++ b/.github/workflows/kindIntegTest.yml @@ -119,12 +119,12 @@ jobs: strategy: matrix: version: - - "6.8.37" + - "6.8.39" integration_test: - cdc_successful include: - - version: 6.8.37 - serverImage: datastax/dse-mgmtapi-6_8:6.8.37-ubi8 # DSE 6.8.37 + - version: 6.8.39 + serverImage: datastax/dse-mgmtapi-6_8:6.8.39-ubi8 # DSE 6.8.39 serverType: dse integration_test: "cdc_successful" fail-fast: true @@ -236,12 +236,12 @@ jobs: - "3.11.15" - "4.0.10" - "4.1.2" - - "6.8.37" + - "6.8.39" integration_test: - test_all_the_things include: - - version: 6.8.37 - serverImage: datastax/dse-mgmtapi-6_8:6.8.37-ubi8 # DSE 6.8.37 + - version: 6.8.39 + serverImage: datastax/dse-mgmtapi-6_8:6.8.39-ubi8 # DSE 6.8.39 serverType: dse integration_test: "test_all_the_things" fail-fast: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 44d973325..75d0ab9ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Changelog for Cass Operator, new PRs should update the `main / unreleased` secti ## unreleased * [CHANGE] [#573](https://github.com/k8ssandra/cass-operator/issues/573) Add the namespace as env variable in the server-system-logger container to label metrics with. +* [CHANGE] [#479](https://github.com/k8ssandra/cass-operator/issues/479) Set the default deployed DSE image to use our newer management-api by changing the repository to datastax/dse-mgmtapi-6_8 ## v1.17.2 diff --git a/config/manager/image_config.yaml b/config/manager/image_config.yaml index 115e9cd1c..ee76f28f8 100644 --- a/config/manager/image_config.yaml +++ b/config/manager/image_config.yaml @@ -18,6 +18,7 @@ defaults: # Note, postfix is ignored if repository is not set cassandra: repository: "k8ssandra/cass-management-api" + suffix: "-ubi8" dse: - repository: "datastax/dse-server" - suffix: "-ubi7" + repository: "datastax/dse-mgmtapi-6_8" + suffix: "-ubi8" diff --git a/pkg/images/images_test.go b/pkg/images/images_test.go index 7e407515e..ab404cf0c 100644 --- a/pkg/images/images_test.go +++ b/pkg/images/images_test.go @@ -81,11 +81,11 @@ func TestDefaultImageConfigParsing(t *testing.T) { assert.True(strings.HasPrefix(GetImageConfig().Images.ConfigBuilder, "datastax/cass-config-builder:")) assert.Equal("k8ssandra/cass-management-api", GetImageConfig().DefaultImages.CassandraImageComponent.Repository) - assert.Equal("datastax/dse-server", GetImageConfig().DefaultImages.DSEImageComponent.Repository) + assert.Equal("datastax/dse-mgmtapi-6_8", GetImageConfig().DefaultImages.DSEImageComponent.Repository) path, err := GetCassandraImage("dse", "6.8.17") assert.NoError(err) - assert.Equal("datastax/dse-server:6.8.17-ubi7", path) + assert.Equal("datastax/dse-mgmtapi-6_8:6.8.17-ubi8", path) } func TestImageConfigParsing(t *testing.T) { diff --git a/pkg/reconciliation/construct_podtemplatespec_test.go b/pkg/reconciliation/construct_podtemplatespec_test.go index 6e923ccd8..abd0ce045 100644 --- a/pkg/reconciliation/construct_podtemplatespec_test.go +++ b/pkg/reconciliation/construct_podtemplatespec_test.go @@ -1441,7 +1441,7 @@ func Test_makeImage(t *testing.T) { serverType: "dse", serverVersion: "6.8.0", }, - want: "datastax/dse-server:6.8.0-ubi7", + want: "datastax/dse-mgmtapi-6_8:6.8.0-ubi8", errString: "", }, { @@ -1451,7 +1451,7 @@ func Test_makeImage(t *testing.T) { serverType: "cassandra", serverVersion: "3.11.10", }, - want: "k8ssandra/cass-management-api:3.11.10", + want: "k8ssandra/cass-management-api:3.11.10-ubi8", errString: "", }, { @@ -1491,7 +1491,7 @@ func Test_makeImage(t *testing.T) { serverType: "dse", serverVersion: "6.8.1234", }, - want: "datastax/dse-server:6.8.1234-ubi7", + want: "datastax/dse-mgmtapi-6_8:6.8.1234-ubi8", errString: "", }, { @@ -1501,7 +1501,7 @@ func Test_makeImage(t *testing.T) { serverType: "dse", serverVersion: "6.8.26", }, - want: "datastax/dse-server:6.8.26-ubi7", + want: "datastax/dse-mgmtapi-6_8:6.8.26-ubi8", errString: "", }, } diff --git a/scripts/pre-release-process.sh b/scripts/pre-release-process.sh index ec2b1f265..4b3643217 100755 --- a/scripts/pre-release-process.sh +++ b/scripts/pre-release-process.sh @@ -8,7 +8,7 @@ fi TAG=$1 #PREVTAG=$2 PREVTAG=$(git describe --abbrev=0 --tags) -IMG=k8ssandra/cass-operator:${TAG} +IMG=cr.k8ssandra.io/k8ssandra/cass-operator:${TAG} # Ensure kustomize is installed make kustomize @@ -27,6 +27,18 @@ cd config/manager && $KUSTOMIZE edit set image controller=$IMG && cd - # Modify config/manager/image_config.yaml to have proper version for server-system-logger LOG_IMG=k8ssandra/system-logger:${TAG} yq eval -i '.images.system-logger = env(LOG_IMG)' config/manager/image_config.yaml +# Add cr.k8ssandra.io prefixes +yq eval -i '.images.system-logger |= "cr.k8ssandra.io/" + .' config/manager/image_config.yaml +yq eval -i '.defaults.cassandra.repository |= "cr.k8ssandra.io/" + .' config/manager/image_config.yaml + +# Add cr.dstx.io prefixes +yq eval -i '.images.config-builder |= "cr.dtsx.io/" + .' config/manager/image_config.yaml +yq eval -i '.defaults.dse.repository |= "cr.dtsx.io/" + .' config/manager/image_config.yaml + +# cr.dstx.io/datastax/dse-mgmtapi-6_8 + +# Modify the controller + # Now add everything and create a commit + tag git add CHANGELOG.md git add README.md