Skip to content

Commit b3329fc

Browse files
Set default value for replication prefixes for Metro to work
1 parent c4d17d7 commit b3329fc

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

service/service.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright © 2021 Dell Inc. or its subsidiaries. All Rights Reserved.
2+
Copyright © 2021-2025 Dell Inc. or its subsidiaries. All Rights Reserved.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -68,6 +68,8 @@ const (
6868
CSILogFormatParam = "CSI_LOG_FORMAT"
6969
ArrayStatus = "/array-status"
7070
DefaultPodmonPollRate = 60
71+
ReplicationContextPrefix = "powermax"
72+
ReplicationPrefix = "replication.storage.dell.com"
7173
PortGroups = "X_CSI_POWERMAX_PORTGROUPS"
7274
Protocol = "X_CSI_TRANSPORT_PROTOCOL"
7375
// PmaxEndPoint = "X_CSI_POWERMAX_ENDPOINT"
@@ -424,11 +426,16 @@ func (s *service) BeforeServe(
424426
opts.KubeConfigPath = kubeConfigPath
425427
}
426428

429+
// set default values for replication prefix since replicator sidecar is not needed for Metro feature.
427430
if replicationContextPrefix, ok := csictx.LookupEnv(ctx, EnvReplicationContextPrefix); ok {
428431
opts.ReplicationContextPrefix = replicationContextPrefix
432+
} else {
433+
opts.ReplicationContextPrefix = ReplicationContextPrefix
429434
}
430435
if replicationPrefix, ok := csictx.LookupEnv(ctx, EnvReplicationPrefix); ok {
431436
opts.ReplicationPrefix = replicationPrefix
437+
} else {
438+
opts.ReplicationPrefix = ReplicationPrefix
432439
}
433440

434441
if MaxVolumesPerNode, ok := csictx.LookupEnv(ctx, EnvMaxVolumesPerNode); ok {

0 commit comments

Comments
 (0)