Skip to content

Commit

Permalink
Adds StorageClusterPeer annotation to client pair mapping
Browse files Browse the repository at this point in the history
Signed-off-by: vbadrina <[email protected]>
  • Loading branch information
vbnrh authored and openshift-cherrypick-robot committed Dec 5, 2024
1 parent f334667 commit 3842558
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions controllers/mirrorpeer_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,9 @@ func updateProviderConfigMap(logger *slog.Logger, ctx context.Context, client cl
ObjectMeta: metav1.ObjectMeta{
Name: "storage-client-mapping",
Namespace: providerClientInfo.ProviderInfo.NamespacedName.Namespace,
Annotations: map[string]string{
utils.StorageClusterPeerNameAnnotationKey: getStorageClusterPeerName(pairedClientInfo.ProviderInfo.ProviderManagedClusterName),
},
},
Data: make(map[string]string),
}
Expand Down
7 changes: 4 additions & 3 deletions controllers/utils/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ import (
)

const (
ODFInfoConfigMapName = "odf-info"
ConfigMapResourceType = "ConfigMap"
ClientInfoConfigMapName = "odf-client-info"
ODFInfoConfigMapName = "odf-info"
ConfigMapResourceType = "ConfigMap"
ClientInfoConfigMapName = "odf-client-info"
StorageClusterPeerNameAnnotationKey = "ocs.openshift.io/storage-cluster-peer"
)

// FetchConfigMap fetches a ConfigMap with a given name from a given namespace
Expand Down

0 comments on commit 3842558

Please sign in to comment.