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

fix(kuma-cp) errors on delete secrets #1222

Merged
merged 2 commits into from
Nov 30, 2020
Merged

Conversation

jakubdyszkiewicz
Copy link
Contributor

Summary

  • We were not preserving the scope on Universal
  • On Kubernetes, I described the problem in the comment so we don't forget, the secret was deleted with some increased latency but it resulted in many error logs.

Documentation

  • No docs.

Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
@@ -103,7 +103,7 @@ func (m *meshManager) Delete(ctx context.Context, resource core_model.Resource,
}
opts := core_store.NewDeleteOptions(fs...)
// delete all secrets
if err := m.otherManagers.DeleteAll(ctx, &system.SecretResourceList{}, core_store.DeleteAllByMesh(opts.Mesh)); err != nil {
if err := m.otherManagers.DeleteAll(ctx, &system.SecretResourceList{}, core_store.DeleteAllByMesh(opts.Name)); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting, was that a bug? Does opts.Name hold the mesh name now, cause the method you call is DeleteAllByMesh

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it was a bug. Mesh is empty in a Mesh object to indicate mesh scope

@jakubdyszkiewicz jakubdyszkiewicz merged commit 60bdd39 into master Nov 30, 2020
@jakubdyszkiewicz jakubdyszkiewicz deleted the fix/delete-secrets branch November 30, 2020 10:57
mergify bot pushed a commit that referenced this pull request Nov 30, 2020
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
(cherry picked from commit 60bdd39)
nickolaev pushed a commit that referenced this pull request Dec 1, 2020
Signed-off-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
(cherry picked from commit 60bdd39)

Co-authored-by: Jakub Dyszkiewicz <jakub.dyszkiewicz@gmail.com>
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.

None yet

3 participants