Skip to content

Commit

Permalink
Onboard clients only if they are on same version as provider - 2
Browse files Browse the repository at this point in the history
- Operator major and minor version of client and provider should match
for onboarding process to begin
- After this commit older clients will fail to get onboarded

Signed-off-by: Leela Venkaiah G <[email protected]>
  • Loading branch information
leelavg committed Dec 7, 2023
1 parent b73780e commit b03f030
Show file tree
Hide file tree
Showing 4 changed files with 191 additions and 158 deletions.
7 changes: 4 additions & 3 deletions services/provider/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@ func (cc *OCSProviderClient) Close() {

// OnboardConsumer to validate the consumer and create StorageConsumer
// resource on the StorageProvider cluster
func (cc *OCSProviderClient) OnboardConsumer(ctx context.Context, ticket, name string) (*pb.OnboardConsumerResponse, error) {
func (cc *OCSProviderClient) OnboardConsumer(ctx context.Context, ticket, name, operatorVersion string) (*pb.OnboardConsumerResponse, error) {
if cc.Client == nil || cc.clientConn == nil {
return nil, fmt.Errorf("provider client is closed")
}

req := &pb.OnboardConsumerRequest{
OnboardingTicket: ticket,
ConsumerName: name,
OnboardingTicket: ticket,
ConsumerName: name,
ClientOperatorVersion: operatorVersion,
}

apiCtx, cancel := context.WithTimeout(ctx, cc.timeout)
Expand Down
Loading

0 comments on commit b03f030

Please sign in to comment.