-
Notifications
You must be signed in to change notification settings - Fork 139
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
Clean up Linseed elastic users for non-existent tenants #2930
Conversation
-Export Elastic mock functions and structs for use more generally -Introduce new test suite for users controller unit tests
cfcd487
to
6d8863c
Compare
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.
Looking good! A few minor comments so far
-Incorporate new expectation of a "clusterID" to be used in ES username creation -Add unit tests for ES username formatting and role generation
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.
Just a few minor comments but otherwise this LGTM
pkg/controller/logstorage/esuserscleanup/ususerscleanup_controller.go
Outdated
Show resolved
Hide resolved
pkg/controller/logstorage/esuserscleanup/ususerscleanup_controller.go
Outdated
Show resolved
Hide resolved
err = r.client.Get(ctx, clusterIDConfigMapKey, &clusterIDConfigMap) | ||
if err != nil { | ||
r.status.SetDegraded(operatorv1.ResourceReadError, fmt.Sprintf("Waiting for ConfigMap %s/%s to be available", clusterIDConfigMapKey.Namespace, clusterIDConfigMapKey.Name), | ||
nil, reqLogger) |
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.
Should we pass err
instead of nil
here?
Clean up Linseed elastic users for non-existent tenants
-Export Elastic mock functions and structs for use more generally
-Introduce new test suite for users controller unit tests
Description
For PR author
- [ ] If changing pkg/apis/, runmake gen-files
- [ ] If changing versions, runmake gen-versions
For PR reviewers
A note for code reviewers - all pull requests must have the following:
kind/bug
if this is a bugfix.kind/enhancement
if this is a a new feature.enterprise
if this PR applies to Calico Enterprise only.