Skip to content

Commit

Permalink
Merge pull request #244 from vbnrh/add-annotation-configmap
Browse files Browse the repository at this point in the history
Adds StorageClusterPeer annotation to client pair mapping
  • Loading branch information
openshift-merge-bot[bot] authored Dec 5, 2024
2 parents 4305a16 + 51291b1 commit 190d5a5
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 190d5a5

Please sign in to comment.