Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion operator/pkg/images/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const (
var imageLookupMap map[Image]string = map[Image]string{

Cassandra_3_11_6: "datastax/cassandra-mgmtapi-3_11_6:v0.1.5",
Cassandra_3_11_7: "datastax/cassandra-mgmtapi-3_11_7:v0.1.13",
Cassandra_3_11_7: "datastax/cassandra-mgmtapi-3_11_7:v0.1.22",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @zencircle.

The v0.1.22 image is configured to run Cassandra as non-root whereas the v0.1.13 image is configured to run as root. While running as non-root is definitely a good change, switching the default image in this way probably merits some discussion.

Copy link

@emerkle826 emerkle826 Mar 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zencircle, John is right. You will likely run into problems with this bit of code:

https://github.com/zencircle/cass-operator/blob/patch-1/operator/pkg/images/images.go#L168-L179

as it will assume that the default 3.11.7 image is run as root. The version you are upgrading too does not run as root as John said.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zencircle
You likely have to remove "3.11.7" from this line:
https://github.com/zencircle/cass-operator/blob/patch-1/operator/pkg/images/images.go#L172

and change the line in the test that expects it to be run as root (from false to true) here:
https://github.com/zencircle/cass-operator/blob/patch-1/operator/pkg/images/images_test.go#L70

Cassandra_4_0_0: "datastax/cassandra-mgmtapi-4_0_0:v0.1.12",

UBICassandra_3_11_6: "datastax/cassandra:3.11.6-ubi7",
Expand Down