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

[internal] Fix migration from CephClusterAuthentication #38

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AleksZimin
Copy link
Member

Description

Why do we need it, and what problem does it solve?

What is the expected result?

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Signed-off-by: Aleksandr Zimin <alexandr.zimin@flant.com>
@AleksZimin AleksZimin self-assigned this Mar 4, 2025
@AleksZimin AleksZimin added the bug Something isn't working label Mar 4, 2025
@AleksZimin AleksZimin requested review from astef and duckhawk March 4, 2025 15:22
newVolumeSnapshotClass := vsClass.DeepCopy()
if newVolumeSnapshotClass.Labels == nil {
newVolumeSnapshotClass.Labels = make(map[string]string)
}
Copy link
Member

Choose a reason for hiding this comment

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

How about initializing newVolumeSnapshotClass.Parameters in the same way? We will be using it on line 951


func getClusterConnectionByClusterID(ctx context.Context, cl client.Client, clusterID string) (*v1alpha1.CephClusterConnection, error) {
cephClusterConnectionList := &v1alpha1.CephClusterConnectionList{}
err := cl.List(ctx, cephClusterConnectionList)
Copy link
Member

Choose a reason for hiding this comment

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

This heavy request will be executed for each VolumeSnapshotClass. May be it's worth doing it once and then reuse the result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants