Skip to content

Commit

Permalink
Merge pull request #1931 from ConnorJC3/update-node-topology
Browse files Browse the repository at this point in the history
Report zone via well-known topology key in NodeGetInfo
  • Loading branch information
k8s-ci-robot authored Feb 15, 2024
2 parents efded5e + ae753df commit 289df4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/driver/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,8 @@ func (d *nodeService) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoReque
zone := d.metadata.GetAvailabilityZone()

segments := map[string]string{
TopologyKey: zone,
TopologyKey: zone,
WellKnownTopologyKey: zone,
}

outpostArn := d.metadata.GetOutpostArn()
Expand Down
3 changes: 3 additions & 0 deletions pkg/driver/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2331,6 +2331,9 @@ func TestNodeGetInfo(t *testing.T) {
if at.Segments[TopologyKey] != tc.availabilityZone {
t.Fatalf("Expected topology %q, got %q", tc.availabilityZone, at.Segments[TopologyKey])
}
if at.Segments[WellKnownTopologyKey] != tc.availabilityZone {
t.Fatalf("Expected (well-known) topology %q, got %q", tc.availabilityZone, at.Segments[WellKnownTopologyKey])
}

if at.Segments[AwsAccountIDKey] != tc.outpostArn.AccountID {
t.Fatalf("Expected AwsAccountId %q, got %q", tc.outpostArn.AccountID, at.Segments[AwsAccountIDKey])
Expand Down

0 comments on commit 289df4e

Please sign in to comment.