-
Notifications
You must be signed in to change notification settings - Fork 39
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
add proto and service for volume replication #205
Conversation
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.
Please check the CI errors and correct them. Also, I assume these changes are transferred from the volume replication operator, if yes, it will be good to add the link to it in the commit-msg or PR description.
data, err := kube.GetSecret(ctx, rs.kubeClient, req.GetSecretName(), req.GetSecretNamespace()) | ||
if err != nil { | ||
klog.Errorf("Failed to get secret %s in namespace %s: %v", req.GetSecretName(), req.GetSecretNamespace(), err) | ||
return nil, status.Error(codes.InvalidArgument, err.Error()) |
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.
Always try the internal server error if the invalid is not the right error.
} | ||
|
||
_, err = rs.controllerClient.PromoteVolume(ctx, | ||
&csiReplication.PromoteVolumeRequest{ |
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.
PromoteVolReq also has the force option which you need to consider
return nil, status.Error(codes.InvalidArgument, err.Error()) | ||
} | ||
|
||
_, err = rs.controllerClient.ResyncVolume(ctx, |
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.
Resync should return success or failure based on that we need to take few actions to reconcile the CR or not.
added required proto file and generate grpc library for internal communication for volume replication Signed-off-by: Rakshith R <[email protected]>
adding sidecar service for the volume replication service. Signed-off-by: Rakshith R <[email protected]>
f4611d1
to
cfb4fb9
Compare
done
Negative, this purely csi-addons design of internal proto and sidecar, I'll add them for controller part.Other requested changes are addressed, PTAL. |
Syncing latest changes from upstream main for kubernetes-csi-addons
Signed-off-by: Rakshith R [email protected]
Signed-off-by: Rakshith R [email protected]
Updates: #116