Skip to content

Commit

Permalink
Dapr Resource Schema Update (#1757)
Browse files Browse the repository at this point in the history
* Dapr Resource Schema Update

More context: radius-project/radius#7823

Signed-off-by: karishma-chawla <74574173+karishma-chawla@users.noreply.github.com>

* Update env vars schema

Related to: #1742

Signed-off-by: karishma-chawla <74574173+karishma-chawla@users.noreply.github.com>

---------

Signed-off-by: karishma-chawla <74574173+karishma-chawla@users.noreply.github.com>
Co-authored-by: karishma-chawla <74574173+karishma-chawla@users.noreply.github.com>
  • Loading branch information
kachawla and kachawla authored Sep 6, 2024
1 parent ac2909a commit 979fd74
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 34 deletions.
12 changes: 9 additions & 3 deletions samples/dapr/dapr-azure.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,15 @@ resource stateStore 'Applications.Dapr/stateStores@2023-10-01-preview' = {
{ id: account::tableServices::table.id }
]
metadata: {
accountName: account.name
accountKey: account.listKeys().keys[0].value
tableName: account::tableServices::table.name
accountName: {
value: account.name
}
accountKey: {
value: account.listKeys().keys[0].value
}
tableName: {
value: account::tableServices::table.name
}
}
type: 'state.azure.tablestorage'
version: 'v1'
Expand Down
8 changes: 6 additions & 2 deletions samples/dapr/dapr.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,12 @@ resource stateStore 'Applications.Dapr/stateStores@2023-10-01-preview' = {
type: 'state.redis'
version: 'v1'
metadata: {
redisHost: '${service.metadata.name}.${namespace}.svc.cluster.local:${service.spec.ports[0].port}'
redisPassword: ''
redisHost: {
value: '${service.metadata.name}.${namespace}.svc.cluster.local:${service.spec.ports[0].port}'
}
redisPassword: {
value: ''
}
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion samples/eshop-dapr/infra/dapr-pub-sub.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ resource daprPubSubBroker 'Applications.Dapr/pubSubBrokers@2023-10-01-preview' =
type: 'pubsub.azure.servicebus.topics'
version: 'v1'
metadata: {
connectionString: serviceBus::authorizationRule.listKeys().primaryConnectionString
connectionString: {
value: serviceBus::authorizationRule.listKeys().primaryConnectionString
}
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion samples/eshop-dapr/infra/dapr-secret-store.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ resource daprSecretStore 'Applications.Dapr/secretStores@2023-10-01-preview' = {
type: 'secretstores.azure.keyvault'
version: 'v1'
metadata: {
vaultName: keyVaultName
vaultName: {
value: keyVaultName
}
}
}
}
Expand Down
20 changes: 15 additions & 5 deletions samples/eshop-dapr/infra/dapr-state-store.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,21 @@ resource daprStateStore 'Applications.Dapr/stateStores@2023-10-01-preview' = {
type: 'state.azure.cosmosdb'
version: 'v1'
metadata: {
url: cosmosAccount.properties.documentEndpoint
masterKey: cosmosAccount.listKeys().primaryMasterKey
database: cosmosDbName
collection: cosmosDbCollectionName
actorStateStore: 'true'
url: {
value: cosmosAccount.properties.documentEndpoint
}
masterKey: {
value: cosmosAccount.listKeys().primaryMasterKey
}
database: {
value: cosmosDbName
}
collection: {
value: cosmosDbCollectionName
}
actorStateStore: {
value: 'true'
}
}
}
}
Expand Down
56 changes: 42 additions & 14 deletions samples/eshop/services/web.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,48 @@ resource webmvc 'Applications.Core/containers@2023-10-01-preview' = {
container: {
image: '${imageRegistry}/webmvc:${imageTag}'
env: {
ASPNETCORE_ENVIRONMENT: 'Development'
ASPNETCORE_URLS: 'http://0.0.0.0:80'
PATH_BASE: '/webmvc'
UseCustomizationData: 'False'
DPConnectionString: redisKeystore.listSecrets().connectionString
UseLoadTest: 'False'
ORCHESTRATOR_TYPE: 'K8S'
IsClusterEnv: 'True'
ExternalPurchaseUrl: '${gateway.properties.url}/webshoppingapigw'
CallBackUrl: '${gateway.properties.url}/webmvc'
IdentityUrl: '${gateway.properties.url}/identity-api'
IdentityUrlHC: 'http://identity-api:5105/liveness'
PurchaseUrl: 'http://webshoppingapigw:5202'
SignalrHubUrl: 'http://ordering-signalrhub:5112'
ASPNETCORE_ENVIRONMENT: {
value: 'Development'
}
ASPNETCORE_URLS: {
value: 'http://0.0.0.0:80'
}
PATH_BASE: {
value: '/webmvc'
}
UseCustomizationData: {
value: 'False'
}
DPConnectionString: {
value: redisKeystore.listSecrets().connectionString
}
UseLoadTest: {
value: 'False'
}
ORCHESTRATOR_TYPE: {
value: 'K8S'
}
IsClusterEnv: {
value: 'True'
}
ExternalPurchaseUrl: {
value: '${gateway.properties.url}/webshoppingapigw'
}
CallBackUrl: {
value: '${gateway.properties.url}/webmvc'
}
IdentityUrl: {
value: '${gateway.properties.url}/identity-api'
}
IdentityUrlHC: {
value: 'http://identity-api:5105/liveness'
}
PurchaseUrl: {
value: 'http://webshoppingapigw:5202'
}
SignalrHubUrl: {
value: 'http://ordering-signalrhub:5112'
}
}
ports: {
http: {
Expand Down
32 changes: 24 additions & 8 deletions samples/eshop/services/webhooks.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,30 @@ resource webhooksclient 'Applications.Core/containers@2023-10-01-preview' = {
container: {
image: '${imageRegistry}/webhooks.client:${imageTag}'
env: {
ASPNETCORE_ENVIRONMENT: 'Production'
ASPNETCORE_URLS: 'http://0.0.0.0:80'
PATH_BASE: '/webhooks-web'
Token: 'WebHooks-Demo-Web'
CallBackUrl: '${gateway.properties.url}/webhooks-client'
SelfUrl: 'http://webhooks-client:5114'
WebhooksUrl: 'http://webhooks-api:5113'
IdentityUrl: '${gateway.properties.url}/identity-api'
ASPNETCORE_ENVIRONMENT: {
value: 'Production'
}
ASPNETCORE_URLS: {
value: 'http://0.0.0.0:80'
}
PATH_BASE: {
value: '/webhooks-web'
}
Token: {
value: 'WebHooks-Demo-Web'
}
CallBackUrl: {
value: '${gateway.properties.url}/webhooks-client'
}
SelfUrl: {
value: 'http://webhooks-client:5114'
}
WebhooksUrl: {
value: 'http://webhooks-api:5113'
}
IdentityUrl: {
value: '${gateway.properties.url}/identity-api'
}
}
ports: {
http: {
Expand Down

0 comments on commit 979fd74

Please sign in to comment.