Skip to content

Commit

Permalink
add suffix for external ceph client secret name during gRPC response
Browse files Browse the repository at this point in the history
when provider & client are running in same namespace the cephclient
secret name clashes and as the contents will be different we'll add a
suffix ".csi" to the secret which wll be managed by client.

Signed-off-by: Leela Venkaiah G <[email protected]>
  • Loading branch information
leelavg committed Mar 18, 2024
1 parent 34d9403 commit 84ff31b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion services/provider/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,10 @@ func (s *OCSProviderServer) GetStorageClassClaimConfig(ctx context.Context, req
keyProp = "adminKey"
}
extR = append(extR, &pb.ExternalResource{
Name: clientSecretName,
// a common suffix '.csi' is being added to distinguish secrets that are created
// by ocs-client-operator vs rook-operator when both these operators are deployed in same namespace
// TODO: need to transform existing secrets during migration manually
Name: clientSecretName + ".csi",
Kind: "Secret",
Data: mustMarshal(map[string]string{
idProp: cephRes.Name,
Expand Down

0 comments on commit 84ff31b

Please sign in to comment.