-
Notifications
You must be signed in to change notification settings - Fork 151
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
K8SPSMDB-1245 Telemetry ClusterWideEnabled not handling multiple comma-separated namespaces #1829
base: main
Are you sure you want to change the base?
Conversation
…a-separated namespaces
@@ -264,7 +264,7 @@ func (r *ReconcilePerconaServerMongoDB) getVersionMeta(ctx context.Context, cr * | |||
BackupVersion: cr.Status.BackupVersion, | |||
BackupsEnabled: cr.Spec.Backup.Enabled && len(cr.Spec.Backup.Storages) > 0, | |||
ShardingEnabled: cr.Spec.Sharding.Enabled, | |||
ClusterWideEnabled: len(watchNs) == 0, | |||
ClusterWideEnabled: watchNs == "" || strings.Contains(watchNs, ","), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A watchNs= "somenamespace," will be valid for this case? Maybe it is better to split the string and count that we have >1 splits which will mean that we have 2 or more namespaces
e.g. watchNs= "somenamespace,someothernamespace" will create 2 splits, split1: "somenamespace" and split2: "someothernamespace"
I think we can also include this implementation in the unit tests. We can perform a very small refactor to this part of the unit test we already have (Test_majorUpgradeRequested
), and set the currentNs
value from the test parameters instead of having it hardcoded.
commit: b8d9551 |
…a-separated namespaces
CHANGE DESCRIPTION
Problem:
Telemetry ClusterWideEnabled not handling multiple comma-separated namespaces
Cause:
Short explanation of the root cause of the issue if applicable.
Solution:
Update value for ClusterWideEnabled
CHECKLIST
Jira
Needs Doc
) and QA (Needs QA
)?Tests
compare/*-oc.yml
)?Config/Logging/Testability