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

K8ssandraCluster Spec is modified the by operator #1235

Closed
burmanm opened this issue Mar 7, 2024 · 1 comment · Fixed by #1237
Closed

K8ssandraCluster Spec is modified the by operator #1235

burmanm opened this issue Mar 7, 2024 · 1 comment · Fixed by #1237
Assignees
Labels
bug Something isn't working done Issues in the state 'done'

Comments

@burmanm
Copy link
Contributor

burmanm commented Mar 7, 2024

What happened?
I noticed K8ssandraCluster (and CassandraDatacenter) would change generation after k8ssandra-operator is started. What happened is that k8ssandra-operator would modify the superuserSecretRef field in the K8ssandraCluster in reconcileSuperuserSecret() method.

This causes external tools that check the consistency of K8ssandraCluster to fail, since they then modify it back and the loop starts.

There's also the injection method, which causes the StatefulSets generated by cass-operator to have 3 generations on each update and causing 2 unnecessary rolling restarts in this case. First having the correct annotations, next one removing them and third one re-adding them. This is due to the reconciling going nuts with the Spec generation changes.

Did you expect to see something different?

This change should not happen, the superuserSecretName should be modified in the CassandraDatacenter object by k8ssandra-operator, not to K8ssandraCluster.Spec.Cassandra

How to reproduce it (as minimally and precisely as possible):

Environment

  • K8ssandra Operator version:

    Insert image tag or Git SHA here

  • Kubernetes version information:

    kubectl version

  • Kubernetes cluster kind:

    insert how you created your cluster: kops, bootkube, etc.

  • Manifests:

insert manifests relevant to the issue
  • K8ssandra Operator Logs:
insert K8ssandra Operator logs relevant to the issue here

Anything else we need to know?:

@burmanm burmanm added the bug Something isn't working label Mar 7, 2024
@adejanovski adejanovski added the assess Issues in the state 'assess' label Mar 7, 2024
@burmanm
Copy link
Contributor Author

burmanm commented Mar 7, 2024

Another thing to add is verifying in the e2e tests that generation of K8ssandraCluster object never changes without user input.

@adejanovski adejanovski added in-progress Issues in the state 'in-progress' and removed assess Issues in the state 'assess' labels Mar 7, 2024
@adejanovski adejanovski added ready-for-review Issues in the state 'ready-for-review' review Issues in the state 'review' and removed in-progress Issues in the state 'in-progress' ready-for-review Issues in the state 'ready-for-review' labels Mar 8, 2024
@adejanovski adejanovski added done Issues in the state 'done' and removed review Issues in the state 'review' labels Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working done Issues in the state 'done'
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants