Skip to content

Commit 3842cc0

Browse files
authored
Prevents constant changes to HA connector (#2297)
* Prevents constant changes to HA connector * Not mapped Ordinal causing indefinite sslProfile updates * Ensure HA connector is not considered different by setting cost to 1 * Mapping oldestValidOrdinal as well as it is needed when HA is enabled and disabled multiple times * Updated routeraccess test to match expected connector
1 parent ac2db58 commit 3842cc0

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

internal/qdr/amqp_mgmt.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,10 +1149,12 @@ func asListener(record Record) Listener {
11491149

11501150
func asSslProfile(record Record) SslProfile {
11511151
return SslProfile{
1152-
Name: record.AsString("name"),
1153-
CertFile: record.AsString("certFile"),
1154-
PrivateKeyFile: record.AsString("privateKeyFile"),
1155-
CaCertFile: record.AsString("caCertFile"),
1152+
Name: record.AsString("name"),
1153+
CertFile: record.AsString("certFile"),
1154+
PrivateKeyFile: record.AsString("privateKeyFile"),
1155+
CaCertFile: record.AsString("caCertFile"),
1156+
Ordinal: record.AsUint64("ordinal"),
1157+
OldestValidOrdinal: record.AsUint64("oldestValidOrdinal"),
11561158
}
11571159
}
11581160

internal/site/routeraccess.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ func (m RouterAccessMap) desiredConnectors(targetGroups []string) []qdr.Connecto
4242
Role: qdr.RoleInterRouter,
4343
Port: strconv.Itoa(role.Port),
4444
SslProfile: ra.Spec.TlsCredentials,
45+
Cost: 1,
4546
}
4647
connectors = append(connectors, connector)
4748
}

internal/site/routeraccess_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ func TestRouterAccessMap_DesiredConfig(t *testing.T) {
353353
Role: qdr.RoleInterRouter,
354354
Port: "55671",
355355
SslProfile: "skupper",
356+
Cost: 1,
356357
},
357358
},
358359
},

0 commit comments

Comments
 (0)