Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dapr Resource Schema Update #1757

Merged
merged 2 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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