Skip to content
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

Upgrade cass-operator version and enable using 5.x.x and 7.x.x versions #1007

Merged
merged 1 commit into from
Jun 26, 2023

Conversation

adejanovski
Copy link
Contributor

What this PR does:
Upgrades cass-operator to the sha that supports new version numbers, and adds support for these version numbers in k8ssandra-operator as well.

Which issue(s) this PR fixes:
Fixes #1005

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CHANGELOG.md updated (not required for documentation PRs)
  • CLA Signed: DataStax CLA

@adejanovski adejanovski requested a review from a team as a code owner June 26, 2023 10:34
@sonarcloud
Copy link

sonarcloud bot commented Jun 26, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.4% 0.4% Duplication

@codecov
Copy link

codecov bot commented Jun 26, 2023

Codecov Report

Merging #1007 (4ffab17) into main (dc7baf1) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1007      +/-   ##
==========================================
+ Coverage   57.42%   57.47%   +0.04%     
==========================================
  Files          99       99              
  Lines       10013    10010       -3     
==========================================
+ Hits         5750     5753       +3     
+ Misses       3769     3765       -4     
+ Partials      494      492       -2     
Impacted Files Coverage Δ
apis/k8ssandra/v1alpha1/k8ssandracluster_types.go 36.23% <ø> (ø)
pkg/stargate/affinity.go 100.00% <ø> (ø)
pkg/cassandra/datacenter.go 66.37% <100.00%> (ø)

... and 2 files with indirect coverage changes

Copy link
Contributor

@emerkle826 emerkle826 left a comment

Choose a reason for hiding this comment

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

This looks good, but there seem to be more changes than I expected for upgrading cass-operator for the 5.x.x/7.x.x version changes.

Comment on lines +1179 to +1199
claims:
description: "Claims lists the names of resources, defined in
spec.resourceClaims, that are used by this container. \n This
is an alpha field and requires enabling the DynamicResourceAllocation
feature gate. \n This field is immutable. It can only be set
for containers."
items:
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
properties:
name:
description: Name must match the name of one entry in pod.spec.resourceClaims
of the Pod where this field is used. It makes that resource
available inside a container.
type: string
required:
- name
type: object
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Are these changes related? Or are these due to an upgraded version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's related to the kubernetes dependency upgrades (from 0.25 to 0.26) that were required by the cass-operator upgrade.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines -71 to -83

t.Run("affinity on zone label", func(t *testing.T) {
//goland:noinspection GoDeprecation
actual := computeNodeAffinityLabels(&cassdcapi.CassandraDatacenter{
Spec: cassdcapi.CassandraDatacenterSpec{
Racks: []cassdcapi.Rack{{
Name: "rack1",
Zone: "zone1",
}},
}}, "rack1")
require.NotNil(t, actual)
assert.Equal(t, "zone1", actual[zoneLabel])
})
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Do we not need to test affinity labels anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

affinity labels are still tested, and NodeAffinityLabels have now superceded the Zone field that was previously used for this, and has now been fully removed.

@adejanovski adejanovski merged commit 6756187 into main Jun 26, 2023
60 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support next DSE version
2 participants