Skip to content

Commit

Permalink
Update cert storage path
Browse files Browse the repository at this point in the history
  • Loading branch information
indresh-28 committed Aug 12, 2023
1 parent 3a33035 commit f853b26
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/pkg/api/cluster_registeration.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ func (s *Server) NewClusterRegistration(ctx context.Context, request *serverpb.N
}, nil
}

err := credential.PutClusterCerts(ctx, orgId, request.ClusterName,
err := credential.PutClusterCerts(ctx, orgId, clusterID,
caData, clientKey, clientCrt)
if err != nil {
s.log.Errorf("[org: %s] failed to store cert in vault for cluster %s, %v", orgId, request.ClusterName, err)
s.log.Errorf("[org: %s] failed to store cert in vault for cluster %s, %v", orgId, clusterID, err)
return &serverpb.NewClusterRegistrationResponse{
Status: serverpb.StatusCode_INTERNRAL_ERROR,
StatusMessage: "failed register cluster",
Expand Down Expand Up @@ -117,10 +117,10 @@ func (s *Server) UpdateClusterRegistration(ctx context.Context, request *serverp
}, nil
}

err := credential.PutClusterCerts(ctx, orgId, request.ClusterName,
err := credential.PutClusterCerts(ctx, orgId, request.ClusterID,
caData, clientKey, clientCrt)
if err != nil {
s.log.Errorf("[org: %s] failed to update cert in vault for cluster %s, %v", orgId, request.ClusterName, err)
s.log.Errorf("[org: %s] failed to update cert in vault for cluster %s, %v", orgId, request.ClusterID, err)
return &serverpb.UpdateClusterRegistrationResponse{
Status: serverpb.StatusCode_INTERNRAL_ERROR,
StatusMessage: "failed update register cluster",
Expand Down

0 comments on commit f853b26

Please sign in to comment.