diff --git a/Deploy/helm/cart-api/templates/deployment.yaml b/Deploy/helm/cart-api/templates/deployment.yaml index aeaa4512..13e464be 100644 --- a/Deploy/helm/cart-api/templates/deployment.yaml +++ b/Deploy/helm/cart-api/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "tt-cart.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "tt-cart.fullname" . }} diff --git a/Deploy/helm/coupons-api/templates/deployment.yaml b/Deploy/helm/coupons-api/templates/deployment.yaml index e596b172..066d127e 100644 --- a/Deploy/helm/coupons-api/templates/deployment.yaml +++ b/Deploy/helm/coupons-api/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "tt-coupons.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "tt-coupons.fullname" . }} diff --git a/Deploy/helm/image-classifier-api/templates/deployment.yaml b/Deploy/helm/image-classifier-api/templates/deployment.yaml index 81bae667..b3455cdd 100644 --- a/Deploy/helm/image-classifier-api/templates/deployment.yaml +++ b/Deploy/helm/image-classifier-api/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "tt-imageclassifier.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "tt-imageclassifier.fullname" . }} diff --git a/Deploy/helm/login-api/templates/deployment.yaml b/Deploy/helm/login-api/templates/deployment.yaml index fd61b0c6..0a388126 100644 --- a/Deploy/helm/login-api/templates/deployment.yaml +++ b/Deploy/helm/login-api/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "tt-login.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "tt-login.fullname" . }} diff --git a/Deploy/helm/mobilebff/templates/deployment.yaml b/Deploy/helm/mobilebff/templates/deployment.yaml index 434d32dd..8ea71545 100644 --- a/Deploy/helm/mobilebff/templates/deployment.yaml +++ b/Deploy/helm/mobilebff/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "tt-mobilebff.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "tt-mobilebff.fullname" . }} diff --git a/Deploy/helm/popular-products-api/templates/deployment.yaml b/Deploy/helm/popular-products-api/templates/deployment.yaml index bbf47d63..cdb406b8 100644 --- a/Deploy/helm/popular-products-api/templates/deployment.yaml +++ b/Deploy/helm/popular-products-api/templates/deployment.yaml @@ -2,7 +2,7 @@ {{- $cfgname := printf "%s-%s" "cfg" $name -}} {{- $cfginitname := printf "%s-%s" "cfg-init" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "tt-popularproducts.fullname" . }} diff --git a/Deploy/helm/products-api/templates/deployment.yaml b/Deploy/helm/products-api/templates/deployment.yaml index 8747c430..002cf2a3 100644 --- a/Deploy/helm/products-api/templates/deployment.yaml +++ b/Deploy/helm/products-api/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "tt-products.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "tt-products.fullname" . }} diff --git a/Deploy/helm/profiles-api/templates/deployment.yaml b/Deploy/helm/profiles-api/templates/deployment.yaml index ce8a9b65..a2688049 100644 --- a/Deploy/helm/profiles-api/templates/deployment.yaml +++ b/Deploy/helm/profiles-api/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "tt-profile.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "tt-profile.fullname" . }} diff --git a/Deploy/helm/rewards-registration-api/templates/deployment.yaml b/Deploy/helm/rewards-registration-api/templates/deployment.yaml index 3fc8e8b3..eb1304a9 100644 --- a/Deploy/helm/rewards-registration-api/templates/deployment.yaml +++ b/Deploy/helm/rewards-registration-api/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "tt-rewards-registration.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "tt-rewards-registration.fullname" . }} diff --git a/Deploy/helm/stock-api/templates/deployment.yaml b/Deploy/helm/stock-api/templates/deployment.yaml index 6b4217f4..bd2e631c 100644 --- a/Deploy/helm/stock-api/templates/deployment.yaml +++ b/Deploy/helm/stock-api/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "tt-stock.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "tt-stock.fullname" . }} diff --git a/Deploy/helm/webbff/templates/deployment.yaml b/Deploy/helm/webbff/templates/deployment.yaml index a5a98a82..346f79a1 100644 --- a/Deploy/helm/webbff/templates/deployment.yaml +++ b/Deploy/helm/webbff/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "tt-webbff.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "tt-webbff.fullname" . }} diff --git a/Deploy/powershell/Generate-Config.ps1 b/Deploy/powershell/Generate-Config.ps1 index 5a42bc6a..62387ef8 100644 --- a/Deploy/powershell/Generate-Config.ps1 +++ b/Deploy/powershell/Generate-Config.ps1 @@ -37,12 +37,12 @@ Write-Host "Storage Account: $($storage.name)" -ForegroundColor Yellow ## Getting CosmosDb info $docdb=$(az cosmosdb list -g $resourceGroup --query "[?kind=='GlobalDocumentDB'].{name: name, kind:kind, documentEndpoint:documentEndpoint}" -o json | ConvertFrom-Json) $docdb=EnsureAndReturnFirstItem $docdb "CosmosDB (Document Db)" -$docdbKey=$(az cosmosdb list-keys -g $resourceGroup -n $docdb.name -o json --query primaryMasterKey | ConvertFrom-Json) +$docdbKey=$(az cosmosdb keys list -g $resourceGroup -n $docdb.name -o json --query primaryMasterKey | ConvertFrom-Json) Write-Host "Document Db Account: $($docdb.name)" -ForegroundColor Yellow $mongodb=$(az cosmosdb list -g $resourceGroup --query "[?kind=='MongoDB'].{name: name, kind:kind}" -o json | ConvertFrom-Json) $mongodb=EnsureAndReturnFirstItem $mongodb "CosmosDB (MongoDb mode)" -$mongodbKey=$(az cosmosdb list-keys -g $resourceGroup -n $mongodb.name -o json --query primaryMasterKey | ConvertFrom-Json) +$mongodbKey=$(az cosmosdb keys list -g $resourceGroup -n $mongodb.name -o json --query primaryMasterKey | ConvertFrom-Json) Write-Host "Mongo Db Account: $($mongodb.name)" -ForegroundColor Yellow If ($rewardsResourceGroup){ @@ -65,6 +65,18 @@ else { $tokens.rewardspwd="password" } +## Getting App Insights instrumentation key, if required +$appinsightsId="" +$appInsightsName=$(az resource list -g $resourceGroup --resource-type Microsoft.Insights/components --query [].name | ConvertFrom-Json) +if ($appInsightsName -and $appInsightsName.Length -eq 1) { + $appinsightsConfig=$(az monitor app-insights component show --app $appInsightsName[0] -g $resourceGroup -o json | ConvertFrom-Json) + + if ($appinsightsConfig) { + $appinsightsId = $appinsightsConfig.instrumentationKey + } +} +Write-Host "App Insights Instrumentation Key: $($appinsightsId)" -ForegroundColor Yellow + ## Showing Values that will be used Write-Host "===========================================================" -ForegroundColor Yellow @@ -79,21 +91,6 @@ $tokens.couponspwd=$mongodbKey $tokens.storage=$storage.blob $tokens.rewardsregistration=If ($rewardsResourceGroup) { $true } Else { $false } - -$appinsightsId="" - -## Getting App Insights instrumentation key, if required -$appInsightsName=$(az resource list -g $resourceGroup --resource-type Microsoft.Insights/components --query [].name | ConvertFrom-Json) -if ($appInsightsName -and $appInsightsName.Length -eq 1) { - $appinsightsConfig=$(az monitor app-insights component show --app $appInsightsName[0] -g $resourceGroup -o json | ConvertFrom-Json) - - if ($appinsightsConfig) { - $appinsightsId = $appinsightsConfig.instrumentationKey - Write-Host "App Insights Instrumentation Key: $($appinsightsId)" -ForegroundColor Yellow - } -} - -Write-Host "App Insights Instrumentation Key: $($appinsightsId)" -ForegroundColor Yellow $tokens.appinsightsik=$appinsightsId # Standard fixed tokens diff --git a/Source/ApiGWs/Tailwind.Traders.Bff/charts/tailwindtradersbff/templates/deployment.yaml b/Source/ApiGWs/Tailwind.Traders.Bff/charts/tailwindtradersbff/templates/deployment.yaml index cc1112b7..8712e17c 100644 --- a/Source/ApiGWs/Tailwind.Traders.Bff/charts/tailwindtradersbff/templates/deployment.yaml +++ b/Source/ApiGWs/Tailwind.Traders.Bff/charts/tailwindtradersbff/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "tailwindtradersbff.fullname" . }}