Skip to content

Commit

Permalink
expose max client session per auth name for event grid.
Browse files Browse the repository at this point in the history
Signed-off-by: morvencao <[email protected]>
  • Loading branch information
morvencao authored and mjlshen committed Jun 11, 2024
1 parent 9fe1c00 commit 6d6a6e8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions dev-infrastructure/configurations/svc-cluster.bicepparam
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ param maestroNamespace = 'maestro'
param maestroKeyVaultName = take('maestro-kv-${uniqueString(currentUserId)}', 24)
param maestroEventGridNamespacesName = '${maestroInfraResourceGroup}-eventgrid'
param maestroCertDomain = 'selfsigned.maestro.keyvault.aro-int.azure.com'
param maxClientSessionsPerAuthName = 2
param deployCsInfra = false
param csNamespace = 'cluster-service'
param csPostgresServerName = take('cs-pg-${uniqueString(currentUserId)}', 60)
Expand Down
4 changes: 3 additions & 1 deletion dev-infrastructure/docs/development-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ This will delete:

## Maestro Infrastructure

Maestro infrastructure is provisioned as part of the svc-cluster. To deploy the Maestro infrastructure and deploy the Maestro server onto the service cluster set the `deployMaestroInfra` toggle to `true` and run
Maestro infrastructure is provisioned as part of the svc-cluster. To deploy the Maestro infrastructure and deploy the Maestro server onto the service cluster set the `deployMaestroInfra` toggle to `true`. If you plan to run the Maestro server or agent with multiple replicas, set `maxClientSessionsPerAuthName` to the number of replicas.

Then run the command:

```sh
cd dev-infrastructure
Expand Down
5 changes: 4 additions & 1 deletion dev-infrastructure/modules/maestro/maestro-infra.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ param location string
@description('An optional user ID that will get admin access for Key Vault. For dev purposes.')
param currentUserId string

@description('The maximum client sessions per authentication name for the EventGrid MQTT broker')
param maxClientSessionsPerAuthName int

@description('The name for the Key Vault for Maestro certificates')
param maestroKeyVaultName string

Expand Down Expand Up @@ -130,7 +133,7 @@ resource eventGridNamespace 'Microsoft.EventGrid/namespaces@2023-12-15-preview'
publicNetworkAccess: 'Enabled'
topicSpacesConfiguration: {
state: 'Enabled'
maximumClientSessionsPerAuthenticationName: 1
maximumClientSessionsPerAuthenticationName: maxClientSessionsPerAuthName
clientAuthentication: {
alternativeAuthenticationNameSources: [
'ClientCertificateDns'
Expand Down
4 changes: 4 additions & 0 deletions dev-infrastructure/templates/svc-cluster.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ param csNamespace string
@maxLength(60)
param csPostgresServerName string

@description('The maximum client sessions per authentication name for the EventGrid MQTT broker')
param maxClientSessionsPerAuthName int

module svcCluster '../modules/aks-cluster-base.bicep' = {
name: 'svc-cluster'
scope: resourceGroup()
Expand Down Expand Up @@ -117,6 +120,7 @@ module maestroInfra '../modules/maestro/maestro-infra.bicep' = if (deployMaestro
eventGridNamespaceName: maestroEventGridNamespacesName
location: location
currentUserId: currentUserId
maxClientSessionsPerAuthName: maxClientSessionsPerAuthName
maestroKeyVaultName: maestroKeyVaultName
kvCertOfficerManagedIdentityName: maestroKeyVaultCertOfficerMSIName
}
Expand Down

0 comments on commit 6d6a6e8

Please sign in to comment.