-
Notifications
You must be signed in to change notification settings - Fork 79
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
If superuserSecretRef is changed, the operator should not revert it and instead report validation error #576
Comments
FYI - also getting messages like this in the k8ss operator for the new cluster which was created by providing the superuser secret.
Message is quite frequent in the logs where we haven't changed any configs since cluster was stood up
|
I'll answer my own question... we have 2 C* clusters in the same k8s namespace across 2 k8s clusters but we have named the datacenters the same way - primary and secondary. This resulted in a configuration overlap as cassandra DC name is the same per namespace hence operator was trying to mess with the same DC name across 2 clusters... Not sure if you need a separate issue for that but this may cause some grief |
Is this #615? |
Yes, missing to use unique DC per cluster caused the conflicting updates which resulted in the error message so this is indeed 615. Once DC was made unique there is no more issue like that, although there is another issue with the seed nodes not being applied when additional seeds is provided which I will ask separately. |
What happened?
I deployed this K8ssandraCluster:
After the cluster became ready, I updated it with:
This error was reported in the k8ssandra-operator log:
superuserSecretRef
was indeed reverted back to the original value. That's not the only thing that happened. The CassandraDatacenter spec fordc1
was updated as follows:Note the reference to the
cassandra-superuser
in thejmx-credentials
init container.Did you expect to see something different?
Long term we need to let the superuser secret get updated. I opened k8ssandra/cass-operator#350 to address it in cass-operator, and I will open a separate ticket to address it in k8ssandra-operator. I do not want to address it in this issue because updating the superuser secret requires some up front design and supporting changes in cass-operator.
We need to move forward with a short term fix for this issue.
There should be a status condition on the K8ssandraCluster to indicate whether or not it valid. As early as possible in the reconciliation process validation checks should be performed. If
superuserSecretRef
is updated, the valid condition should be set to false with a reason/message saying it cannot be updated. Note that I have suggested add the same validation check and condition for #575.This check should also be added in the validating webhook.
How to reproduce it (as minimally and precisely as possible):
Deploy the above manifest. After the cluster becomes ready change
superuserSecretRef
to point a different secret. It doesn't have to exist.Environment
K8ssandra Operator version:
v1.1.1
┆Issue is synchronized with this Jira Story by Unito
┆Issue Number: K8OP-173
The text was updated successfully, but these errors were encountered: