Updates
This commit is contained in:
parent
5e0f55cbd9
commit
39de88d02c
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,10 +1,6 @@
|
|||||||
## Ignore Visual Studio temporary files, build results, and
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
## files generated by popular Visual Studio add-ons.
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
|
||||||
## Local history files
|
|
||||||
.history/
|
|
||||||
.vshistory/
|
|
||||||
|
|
||||||
# User-specific files
|
# User-specific files
|
||||||
*.suo
|
*.suo
|
||||||
*.user
|
*.user
|
||||||
|
@ -16,6 +16,8 @@ Sample .NET Core reference application, powered by Microsoft, based on a simplif
|
|||||||
| Basket API | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=199&branchName=dev) | Shopping Aggregator (Mobile) | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=204&branchName=dev) |
|
| Basket API | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=199&branchName=dev) | Shopping Aggregator (Mobile) | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=204&branchName=dev) |
|
||||||
| Catalog API | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=197&branchName=dev) | Web Client (MVC) | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=209&branchName=dev) |
|
| Catalog API | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=197&branchName=dev) | Web Client (MVC) | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=209&branchName=dev) |
|
||||||
|Identity API | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=200&branchName=dev) | Web Client (SPA) | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=210&branchName=dev) |
|
|Identity API | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=200&branchName=dev) | Web Client (SPA) | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=210&branchName=dev) |
|
||||||
|
| Location API | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=202&branchName=dev) | Web Status (Health) | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=211&branchName=dev) |
|
||||||
|
| Marketing API | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=203&branchName=dev) | Webhooks API | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=207&branchName=dev) |
|
||||||
| Ordering API | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=198&branchName=dev) | Webhooks Client | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=208&branchName=dev) |
|
| Ordering API | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=198&branchName=dev) | Webhooks Client | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=208&branchName=dev) |
|
||||||
| Payment API | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=205&branchName=dev) | | |
|
| Payment API | [](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=205&branchName=dev) | | |
|
||||||
|
|
||||||
|
@ -14,10 +14,12 @@ $services = @(
|
|||||||
@{ Name="eshopidentity"; Image="eshop/identity.api"; File="src/Services/Identity/Identity.API/Dockerfile" },
|
@{ Name="eshopidentity"; Image="eshop/identity.api"; File="src/Services/Identity/Identity.API/Dockerfile" },
|
||||||
@{ Name="eshopordering"; Image="eshop/ordering.api"; File="src/Services/Ordering/Ordering.API/Dockerfile" },
|
@{ Name="eshopordering"; Image="eshop/ordering.api"; File="src/Services/Ordering/Ordering.API/Dockerfile" },
|
||||||
@{ Name="eshoporderingbg"; Image="eshop/ordering.backgroundtasks"; File="src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile" },
|
@{ Name="eshoporderingbg"; Image="eshop/ordering.backgroundtasks"; File="src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile" },
|
||||||
|
@{ Name="eshopmarketing"; Image="eshop/marketing.api"; File="src/Services/Marketing/Marketing.API/Dockerfile" },
|
||||||
@{ Name="eshopwebspa"; Image="eshop/webspa"; File="src/Web/WebSPA/Dockerfile" },
|
@{ Name="eshopwebspa"; Image="eshop/webspa"; File="src/Web/WebSPA/Dockerfile" },
|
||||||
@{ Name="eshopwebmvc"; Image="eshop/webmvc"; File="src/Web/WebMVC/Dockerfile" },
|
@{ Name="eshopwebmvc"; Image="eshop/webmvc"; File="src/Web/WebMVC/Dockerfile" },
|
||||||
@{ Name="eshopwebstatus"; Image="eshop/webstatus"; File="src/Web/WebStatus/Dockerfile" },
|
@{ Name="eshopwebstatus"; Image="eshop/webstatus"; File="src/Web/WebStatus/Dockerfile" },
|
||||||
@{ Name="eshoppayment"; Image="eshop/payment.api"; File="src/Services/Payment/Payment.API/Dockerfile" },
|
@{ Name="eshoppayment"; Image="eshop/payment.api"; File="src/Services/Payment/Payment.API/Dockerfile" },
|
||||||
|
@{ Name="eshoplocations"; Image="eshop/locations.api"; File="src/Services/Location/Locations.API/Dockerfile" },
|
||||||
@{ Name="eshopocelotapigw"; Image="eshop/ocelotapigw"; File="src/ApiGateways/ApiGw-Base/Dockerfile" },
|
@{ Name="eshopocelotapigw"; Image="eshop/ocelotapigw"; File="src/ApiGateways/ApiGw-Base/Dockerfile" },
|
||||||
@{ Name="eshopmobileshoppingagg"; Image="eshop/mobileshoppingagg"; File="src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile" },
|
@{ Name="eshopmobileshoppingagg"; Image="eshop/mobileshoppingagg"; File="src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile" },
|
||||||
@{ Name="eshopwebshoppingagg"; Image="eshop/webshoppingagg"; File="src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile" },
|
@{ Name="eshopwebshoppingagg"; Image="eshop/webshoppingagg"; File="src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile" },
|
||||||
|
32
build/azure-devops/apigws/azure-pipelines.yml
Normal file
32
build/azure-devops/apigws/azure-pipelines.yml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- src/ApiGateways/*
|
||||||
|
- build/azure-devops/buildimages.yml
|
||||||
|
- build/azure-devops/multiarch.yml
|
||||||
|
- build/azure-devops/apigws/*
|
||||||
|
- deploy/k8s/helm/apigwmm/*
|
||||||
|
- deploy/k8s/helm/apigwms/*
|
||||||
|
- deploy/k8s/helm/apigwwm/*
|
||||||
|
- deploy/k8s/helm/apigwws/*
|
||||||
|
exclude:
|
||||||
|
- src/ApiGateways/Mobile.Bff.Shopping/aggregator/*
|
||||||
|
- src/ApiGateways/Web.Bff.Shopping/aggregator/*
|
||||||
|
jobs:
|
||||||
|
- job: PublishCharts
|
||||||
|
condition: ne('$(Build.Reason)', 'PullRequest')
|
||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-16.04'
|
||||||
|
steps:
|
||||||
|
- task: CopyFiles@2
|
||||||
|
inputs:
|
||||||
|
sourceFolder: $(Build.SourcesDirectory)/deploy/k8s/helm
|
||||||
|
targetFolder: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm
|
||||||
|
- task: PublishBuildArtifacts@1
|
||||||
|
inputs:
|
||||||
|
pathtoPublish: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm
|
||||||
|
artifactName: helm
|
27
build/azure-devops/basket-api/azure-pipelines.yml
Normal file
27
build/azure-devops/basket-api/azure-pipelines.yml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
variables:
|
||||||
|
registryEndpoint: eshop-registry
|
||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- src/BuildingBlocks/*
|
||||||
|
- src/Services/Basket/*
|
||||||
|
- build/azure-devops/buildimages.yml
|
||||||
|
- build/azure-devops/multiarch.yml
|
||||||
|
- build/azure-devops/basket-api/*
|
||||||
|
- deploy/k8s/helm/basket-api/*
|
||||||
|
jobs:
|
||||||
|
- template: ../buildimages.yaml
|
||||||
|
parameters:
|
||||||
|
services: basket-api
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
||||||
|
helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm
|
||||||
|
helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm
|
||||||
|
- template: ../multiarch.yaml
|
||||||
|
parameters:
|
||||||
|
image: basket.api
|
||||||
|
branch: $(Build.SourceBranchName)
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
94
build/azure-devops/buildimages.yaml
Normal file
94
build/azure-devops/buildimages.yaml
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
parameters:
|
||||||
|
services: ''
|
||||||
|
registryEndpoint: ''
|
||||||
|
helmfrom: ''
|
||||||
|
helmto: ''
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
- job: BuildContainersForPR_Linux
|
||||||
|
condition: eq('${{ variables['Build.Reason'] }}', 'PullRequest')
|
||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-16.04'
|
||||||
|
steps:
|
||||||
|
- bash: docker-compose -f src/docker-compose.yml build ${{ parameters.services }}
|
||||||
|
displayName: Compose build ${{ parameters.services }}
|
||||||
|
env:
|
||||||
|
TAG: ${{ variables['Build.SourceBranchName'] }}
|
||||||
|
- job: BuildContainersForPR_Windows
|
||||||
|
condition: False
|
||||||
|
# condition: eq('${{ variables['Build.Reason'] }}', 'PullRequest')
|
||||||
|
pool:
|
||||||
|
vmImage: 'windows-2019'
|
||||||
|
steps:
|
||||||
|
- bash: docker-compose f src/docker-compose.yml build ${{ parameters.services }}
|
||||||
|
displayName: Compose build ${{ parameters.services }}
|
||||||
|
env:
|
||||||
|
TAG: ${{ variables['Build.SourceBranchName'] }}
|
||||||
|
PLATFORM: win
|
||||||
|
NODE_IMAGE: stefanscherer/node-windows:10
|
||||||
|
- job: BuildLinux
|
||||||
|
condition: ne('${{ variables['Build.Reason'] }}', 'PullRequest')
|
||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-16.04'
|
||||||
|
steps:
|
||||||
|
- task: DockerCompose@0
|
||||||
|
displayName: Compose build ${{ parameters.services }}
|
||||||
|
inputs:
|
||||||
|
dockerComposeCommand: 'build ${{ parameters.services }}'
|
||||||
|
containerregistrytype: Container Registry
|
||||||
|
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
|
||||||
|
dockerComposeFile: src/docker-compose.yml
|
||||||
|
qualifyImageNames: true
|
||||||
|
projectName: ""
|
||||||
|
dockerComposeFileArgs: |
|
||||||
|
TAG=${{ variables['Build.SourceBranchName'] }}
|
||||||
|
- task: DockerCompose@0
|
||||||
|
displayName: Compose push ${{ parameters.images }}
|
||||||
|
inputs:
|
||||||
|
dockerComposeCommand: 'push ${{ parameters.services }}'
|
||||||
|
containerregistrytype: Container Registry
|
||||||
|
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
|
||||||
|
dockerComposeFile: src/docker-compose.yml
|
||||||
|
qualifyImageNames: true
|
||||||
|
projectName: ""
|
||||||
|
dockerComposeFileArgs: |
|
||||||
|
TAG=${{ variables['Build.SourceBranchName'] }}
|
||||||
|
- task: CopyFiles@2
|
||||||
|
inputs:
|
||||||
|
sourceFolder: ${{ parameters.helmfrom }}
|
||||||
|
targetFolder: ${{ parameters.helmto }}
|
||||||
|
- task: PublishBuildArtifacts@1
|
||||||
|
inputs:
|
||||||
|
pathtoPublish: ${{ parameters.helmto }}
|
||||||
|
artifactName: helm
|
||||||
|
- job: BuildWindows
|
||||||
|
condition: False
|
||||||
|
# condition: ne('${{ variables['Build.Reason'] }}', 'PullRequest')
|
||||||
|
pool:
|
||||||
|
vmImage: 'windows-2019'
|
||||||
|
steps:
|
||||||
|
- task: DockerCompose@0
|
||||||
|
displayName: Compose build ${{ parameters.services }}
|
||||||
|
inputs:
|
||||||
|
dockerComposeCommand: 'build ${{ parameters.services }}'
|
||||||
|
containerregistrytype: Container Registry
|
||||||
|
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
|
||||||
|
dockerComposeFile: src/docker-compose.yml
|
||||||
|
qualifyImageNames: true
|
||||||
|
projectName: ""
|
||||||
|
dockerComposeFileArgs: |
|
||||||
|
TAG=${{ variables['Build.SourceBranchName'] }}
|
||||||
|
PLATFORM=win
|
||||||
|
NODE_IMAGE=stefanscherer/node-windows:10
|
||||||
|
- task: DockerCompose@0
|
||||||
|
displayName: Compose push ${{ parameters.services }}
|
||||||
|
inputs:
|
||||||
|
dockerComposeCommand: 'push ${{ parameters.services }}'
|
||||||
|
containerregistrytype: Container Registry
|
||||||
|
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
|
||||||
|
dockerComposeFile: src/docker-compose.yml
|
||||||
|
qualifyImageNames: true
|
||||||
|
projectName: ""
|
||||||
|
dockerComposeFileArgs: |
|
||||||
|
TAG=${{ variables['Build.SourceBranchName'] }}
|
||||||
|
PLATFORM=win
|
27
build/azure-devops/catalog-api/azure-pipelines.yml
Normal file
27
build/azure-devops/catalog-api/azure-pipelines.yml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
variables:
|
||||||
|
registryEndpoint: eshop-registry
|
||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- src/BuildingBlocks/*
|
||||||
|
- src/Services/Catalog/*
|
||||||
|
- build/azure-devops/buildimages.yml
|
||||||
|
- build/azure-devops/multiarch.yml
|
||||||
|
- build/azure-devops/catalog-api/*
|
||||||
|
- deploy/k8s/helm/catalog-api/*
|
||||||
|
jobs:
|
||||||
|
- template: ../buildimages.yaml
|
||||||
|
parameters:
|
||||||
|
services: catalog-api
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
||||||
|
helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm
|
||||||
|
helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm
|
||||||
|
- template: ../multiarch.yaml
|
||||||
|
parameters:
|
||||||
|
image: catalog.api
|
||||||
|
branch: $(Build.SourceBranchName)
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
27
build/azure-devops/identity-api/azure-pipelines.yml
Normal file
27
build/azure-devops/identity-api/azure-pipelines.yml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
variables:
|
||||||
|
registryEndpoint: eshop-registry
|
||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- src/BuildingBlocks/*
|
||||||
|
- src/Services/Identity/*
|
||||||
|
- build/azure-devops/buildimages.yml
|
||||||
|
- build/azure-devops/multiarch.yml
|
||||||
|
- build/azure-devops/identity-api/*
|
||||||
|
- deploy/k8s/helm/identity-api/*
|
||||||
|
jobs:
|
||||||
|
- template: ../buildimages.yaml
|
||||||
|
parameters:
|
||||||
|
services: identity-api
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
||||||
|
helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm
|
||||||
|
helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm
|
||||||
|
- template: ../multiarch.yaml
|
||||||
|
parameters:
|
||||||
|
image: identity.api
|
||||||
|
branch: $(Build.SourceBranchName)
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
28
build/azure-devops/infrastructure/azure-pipelines.yml
Normal file
28
build/azure-devops/infrastructure/azure-pipelines.yml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
pool:
|
||||||
|
vmImage: 'ubuntu-16.04'
|
||||||
|
variables:
|
||||||
|
registryEndpoint: eshop-registry
|
||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- build/azure-devops/buildimages.yml
|
||||||
|
- build/azure-devops/multiarch.yml
|
||||||
|
- build/azure-devops/infrastructure/*
|
||||||
|
- deploy/k8s/helm/basket-data/*
|
||||||
|
- deploy/k8s/helm/keystore-data/*
|
||||||
|
- deploy/k8s/helm/nosql-data/*
|
||||||
|
- deploy/k8s/helm/rabbitmq/*
|
||||||
|
- deploy/k8s/helm/sql-data/*
|
||||||
|
steps:
|
||||||
|
- task: CopyFiles@2
|
||||||
|
inputs:
|
||||||
|
sourceFolder: $(Build.SourcesDirectory)/deploy/k8s/helm
|
||||||
|
targetFolder: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm
|
||||||
|
- task: PublishBuildArtifacts@1
|
||||||
|
inputs:
|
||||||
|
pathtoPublish: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm
|
||||||
|
artifactName: helm
|
27
build/azure-devops/location-api/azure-pipelines.yml
Normal file
27
build/azure-devops/location-api/azure-pipelines.yml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
variables:
|
||||||
|
registryEndpoint: eshop-registry
|
||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- src/BuildingBlocks/*
|
||||||
|
- src/Services/Location/*
|
||||||
|
- build/azure-devops/buildimages.yml
|
||||||
|
- build/azure-devops/multiarch.yml
|
||||||
|
- build/azure-devops/location-api/*
|
||||||
|
- deploy/k8s/helm/locations-api/*
|
||||||
|
jobs:
|
||||||
|
- template: ../buildimages.yaml
|
||||||
|
parameters:
|
||||||
|
services: locations-api
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
||||||
|
helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm
|
||||||
|
helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm
|
||||||
|
- template: ../multiarch.yaml
|
||||||
|
parameters:
|
||||||
|
image: locations.api
|
||||||
|
branch: $(Build.SourceBranchName)
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
27
build/azure-devops/marketing-api/azure-pipelines.yml
Normal file
27
build/azure-devops/marketing-api/azure-pipelines.yml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
variables:
|
||||||
|
registryEndpoint: eshop-registry
|
||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- src/BuildingBlocks/*
|
||||||
|
- src/Services/Marketing/*
|
||||||
|
- build/azure-devops/buildimages.yml
|
||||||
|
- build/azure-devops/multiarch.yml
|
||||||
|
- build/azure-devops/marketing-api/*
|
||||||
|
- deploy/k8s/helm/marketing-api/*
|
||||||
|
jobs:
|
||||||
|
- template: ../buildimages.yaml
|
||||||
|
parameters:
|
||||||
|
services: marketing-api
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
||||||
|
helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm
|
||||||
|
helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm
|
||||||
|
- template: ../multiarch.yaml
|
||||||
|
parameters:
|
||||||
|
image: marketing.api
|
||||||
|
branch: $(Build.SourceBranchName)
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
27
build/azure-devops/mobile-shopping-agg/azure-pipelines.yml
Normal file
27
build/azure-devops/mobile-shopping-agg/azure-pipelines.yml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
variables:
|
||||||
|
registryEndpoint: eshop-registry
|
||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- src/ApiGateways/Mobile.Bff.Shopping/aggregator/*
|
||||||
|
- build/azure-devops/buildimages.yml
|
||||||
|
- build/azure-devops/multiarch.yml
|
||||||
|
- build/azure-devops/mobile-shopping-agg/*
|
||||||
|
- deploy/k8s/helm/mobileshoppingagg/*
|
||||||
|
jobs:
|
||||||
|
- template: ../buildimages.yaml
|
||||||
|
parameters:
|
||||||
|
services: mobileshoppingagg
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
||||||
|
helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm
|
||||||
|
helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm
|
||||||
|
- template: ../multiarch.yaml
|
||||||
|
parameters:
|
||||||
|
image: mobileshoppingagg
|
||||||
|
branch: $(Build.SourceBranchName)
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
||||||
|
|
33
build/azure-devops/multiarch.yaml
Normal file
33
build/azure-devops/multiarch.yaml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
parameters:
|
||||||
|
image: ''
|
||||||
|
branch: ''
|
||||||
|
registry: 'eshop'
|
||||||
|
registryEndpoint: ''
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
- job: manifest
|
||||||
|
condition: and(succeeded(),ne('${{ variables['Build.Reason'] }}', 'PullRequest'))
|
||||||
|
dependsOn:
|
||||||
|
# - BuildWindows
|
||||||
|
- BuildLinux
|
||||||
|
pool:
|
||||||
|
vmImage: 'Ubuntu 16.04'
|
||||||
|
steps:
|
||||||
|
- task: Docker@1
|
||||||
|
displayName: Docker Login
|
||||||
|
inputs:
|
||||||
|
command: login
|
||||||
|
containerregistrytype: 'Container Registry'
|
||||||
|
dockerRegistryEndpoint: ${{ parameters.registryEndpoint }}
|
||||||
|
# Disabled windows deploy
|
||||||
|
# docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:linux-${{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:win-${{ parameters.branch }}
|
||||||
|
# docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:latest ${{ parameters.registry }}/${{ parameters.image }}:linux-latest ${{ parameters.registry }}/${{ parameters.image }}:win-latest
|
||||||
|
- bash: |
|
||||||
|
mkdir -p ~/.docker
|
||||||
|
sed '$ s/.$//' $DOCKER_CONFIG/config.json > ~/.docker/config.json
|
||||||
|
echo ',"experimental": "enabled" }' >> ~/.docker/config.json
|
||||||
|
docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:linux-${{ parameters.branch }}
|
||||||
|
docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:latest ${{ parameters.registry }}/${{ parameters.image }}:linux-latest
|
||||||
|
docker --config ~/.docker manifest push ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }}
|
||||||
|
docker --config ~/.docker manifest push ${{ parameters.registry }}/${{ parameters.image }}:latest
|
||||||
|
displayName: Create multiarch manifest
|
29
build/azure-devops/ordering-api/azure-pipelines.yml
Normal file
29
build/azure-devops/ordering-api/azure-pipelines.yml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
variables:
|
||||||
|
registryEndpoint: eshop-registry
|
||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- src/BuildingBlocks/*
|
||||||
|
- src/Services/Ordering/*
|
||||||
|
- build/azure-devops/buildimages.yml
|
||||||
|
- build/azure-devops/multiarch.yml
|
||||||
|
- build/azure-devops/ordering-api/*
|
||||||
|
- deploy/k8s/helm/ordering-api/*
|
||||||
|
- deploy/k8s/helm/ordering-backgroundtasks/*
|
||||||
|
- deploy/k8s/helm/ordering-signalrhub/*
|
||||||
|
jobs:
|
||||||
|
- template: ../buildimages.yaml
|
||||||
|
parameters:
|
||||||
|
services: ordering-api
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
||||||
|
helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm
|
||||||
|
helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm
|
||||||
|
- template: ../multiarch.yaml
|
||||||
|
parameters:
|
||||||
|
image: ordering.api
|
||||||
|
branch: $(Build.SourceBranchName)
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
27
build/azure-devops/payment-api/azure-pipelines.yml
Normal file
27
build/azure-devops/payment-api/azure-pipelines.yml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
variables:
|
||||||
|
registryEndpoint: eshop-registry
|
||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- src/BuildingBlocks/*
|
||||||
|
- src/Services/Payment/*
|
||||||
|
- build/azure-devops/buildimages.yml
|
||||||
|
- build/azure-devops/multiarch.yml
|
||||||
|
- build/azure-devops/payment-api/*
|
||||||
|
- deploy/k8s/helm/payment-api/*
|
||||||
|
jobs:
|
||||||
|
- template: ../buildimages.yaml
|
||||||
|
parameters:
|
||||||
|
services: payment-api
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
||||||
|
helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm
|
||||||
|
helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm
|
||||||
|
- template: ../multiarch.yaml
|
||||||
|
parameters:
|
||||||
|
image: payment.api
|
||||||
|
branch: $(Build.SourceBranchName)
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
5
build/azure-devops/readme.md
Normal file
5
build/azure-devops/readme.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Azure DevOps build definitions
|
||||||
|
|
||||||
|
This folder contains the Azure DevOps build definitions in YAML format. Each folder contains one `azure-pipelines.yml` that contains the build definition for one microservice (usually a Docker image, but some microservices generates more than one Docker image).
|
||||||
|
|
||||||
|
For more information about YAML builds read the [Azure DevOps documentation](https://docs.microsoft.com/azure/devops/pipelines/get-started-yaml?view=azure-devops).
|
26
build/azure-devops/web-shopping-agg/azure-pipelines.yml
Normal file
26
build/azure-devops/web-shopping-agg/azure-pipelines.yml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
variables:
|
||||||
|
registryEndpoint: eshop-registry
|
||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- src/ApiGateways/Web.Bff.Shopping/aggregator/*
|
||||||
|
- build/azure-devops/buildimages.yml
|
||||||
|
- build/azure-devops/multiarch.yml
|
||||||
|
- build/azure-devops/web-shopping-agg/*
|
||||||
|
- deploy/k8s/helm/webshoppingagg/*
|
||||||
|
jobs:
|
||||||
|
- template: ../buildimages.yaml
|
||||||
|
parameters:
|
||||||
|
services: webshoppingagg
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
||||||
|
helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm
|
||||||
|
helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm
|
||||||
|
- template: ../multiarch.yaml
|
||||||
|
parameters:
|
||||||
|
image: webshoppingagg
|
||||||
|
branch: $(Build.SourceBranchName)
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
27
build/azure-devops/webhooks-api/azure-pipelines.yml
Normal file
27
build/azure-devops/webhooks-api/azure-pipelines.yml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
variables:
|
||||||
|
registryEndpoint: eshop-registry
|
||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- src/BuildingBlocks/*
|
||||||
|
- src/Services/Webhooks/*
|
||||||
|
- build/azure-devops/buildimages.yml
|
||||||
|
- build/azure-devops/multiarch.yml
|
||||||
|
- build/azure-devops/webhooks-api/*
|
||||||
|
- deploy/k8s/helm/webhooks-api/*
|
||||||
|
jobs:
|
||||||
|
- template: ../buildimages.yaml
|
||||||
|
parameters:
|
||||||
|
services: webhooks-api
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
||||||
|
helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm
|
||||||
|
helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm
|
||||||
|
- template: ../multiarch.yaml
|
||||||
|
parameters:
|
||||||
|
image: webhooks.api
|
||||||
|
branch: $(Build.SourceBranchName)
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
27
build/azure-devops/webhooks-client/azure-pipelines.yml
Normal file
27
build/azure-devops/webhooks-client/azure-pipelines.yml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
variables:
|
||||||
|
registryEndpoint: eshop-registry
|
||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- src/BuildingBlocks/*
|
||||||
|
- src/Web/WebhookClient/*
|
||||||
|
- build/azure-devops/buildimages.yml
|
||||||
|
- build/azure-devops/multiarch.yml
|
||||||
|
- build/azure-devops/webhooks-client/*
|
||||||
|
- deploy/k8s/helm/webhooks-web/*
|
||||||
|
jobs:
|
||||||
|
- template: ../buildimages.yaml
|
||||||
|
parameters:
|
||||||
|
services: webhooks-client
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
||||||
|
helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm
|
||||||
|
helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm
|
||||||
|
- template: ../multiarch.yaml
|
||||||
|
parameters:
|
||||||
|
image: webhooks.client
|
||||||
|
branch: $(Build.SourceBranchName)
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
27
build/azure-devops/webmvc/azure-pipelines.yml
Normal file
27
build/azure-devops/webmvc/azure-pipelines.yml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
variables:
|
||||||
|
registryEndpoint: eshop-registry
|
||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- src/BuildingBlocks/*
|
||||||
|
- src/Web/WebMVC/*
|
||||||
|
- build/azure-devops/buildimages.yml
|
||||||
|
- build/azure-devops/multiarch.yml
|
||||||
|
- build/azure-devops/webmvc/*
|
||||||
|
- deploy/k8s/helm/webmvc/*
|
||||||
|
jobs:
|
||||||
|
- template: ../buildimages.yaml
|
||||||
|
parameters:
|
||||||
|
services: webmvc
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
||||||
|
helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm
|
||||||
|
helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm
|
||||||
|
- template: ../multiarch.yaml
|
||||||
|
parameters:
|
||||||
|
image: webmvc
|
||||||
|
branch: $(Build.SourceBranchName)
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
27
build/azure-devops/webspa/azure-pipelines.yml
Normal file
27
build/azure-devops/webspa/azure-pipelines.yml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
variables:
|
||||||
|
registryEndpoint: eshop-registry
|
||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- src/BuildingBlocks/*
|
||||||
|
- src/Web/WebSPA/*
|
||||||
|
- build/azure-devops/buildimages.yml
|
||||||
|
- build/azure-devops/multiarch.yml
|
||||||
|
- build/azure-devops/webspa/*
|
||||||
|
- deploy/k8s/helm/webspa/*
|
||||||
|
jobs:
|
||||||
|
- template: ../buildimages.yaml
|
||||||
|
parameters:
|
||||||
|
services: webspa
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
||||||
|
helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm
|
||||||
|
helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm
|
||||||
|
- template: ../multiarch.yaml
|
||||||
|
parameters:
|
||||||
|
image: webspa
|
||||||
|
branch: $(Build.SourceBranchName)
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
27
build/azure-devops/webstatus/azure-pipelines.yml
Normal file
27
build/azure-devops/webstatus/azure-pipelines.yml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
variables:
|
||||||
|
registryEndpoint: eshop-registry
|
||||||
|
trigger:
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
- dev
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- src/BuildingBlocks/*
|
||||||
|
- src/Web/WebStatus/*
|
||||||
|
- build/azure-devops/buildimages.yml
|
||||||
|
- build/azure-devops/multiarch.yml
|
||||||
|
- build/azure-devops/webstatus/*
|
||||||
|
- deploy/k8s/helm/webstatus/*
|
||||||
|
jobs:
|
||||||
|
- template: ../buildimages.yaml
|
||||||
|
parameters:
|
||||||
|
services: webstatus
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
||||||
|
helmfrom: $(Build.SourcesDirectory)/deploy/k8s/helm
|
||||||
|
helmto: $(Build.ArtifactStagingDirectory)/deploy/k8s/helm
|
||||||
|
- template: ../multiarch.yaml
|
||||||
|
parameters:
|
||||||
|
image: webstatus
|
||||||
|
branch: $(Build.SourceBranchName)
|
||||||
|
registryEndpoint: $(registryEndpoint)
|
@ -12,7 +12,7 @@ Write-Host "Tags used are linux-master, win-master, linux-dev, win-dev, linux-la
|
|||||||
Write-Host "Multiarch images tags will be master, dev, latest" -ForegroundColor Yellow
|
Write-Host "Multiarch images tags will be master, dev, latest" -ForegroundColor Yellow
|
||||||
|
|
||||||
|
|
||||||
$services = "identity.api", "basket.api", "catalog.api", "ordering.api", "ordering.backgroundtasks", "payment.api", "webhooks.api", "ocelotapigw", "mobileshoppingagg", "webshoppingagg", "ordering.signalrhub", "webstatus", "webspa", "webmvc", "webhooks.client"
|
$services = "identity.api", "basket.api", "catalog.api", "ordering.api", "ordering.backgroundtasks", "marketing.api", "payment.api", "locations.api", "webhooks.api", "ocelotapigw", "mobileshoppingagg", "webshoppingagg", "ordering.signalrhub", "webstatus", "webspa", "webmvc", "webhooks.client"
|
||||||
|
|
||||||
foreach ($svc in $services) {
|
foreach ($svc in $services) {
|
||||||
Write-Host "Creating manifest for $svc and tags :latest, :master, and :dev"
|
Write-Host "Creating manifest for $svc and tags :latest, :master, and :dev"
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
"BasketSubscriptionName": "Basket",
|
"BasketSubscriptionName": "Basket",
|
||||||
"CatalogSubscriptionName": "Catalog",
|
"CatalogSubscriptionName": "Catalog",
|
||||||
"OrderingSubscriptionName": "Ordering",
|
"OrderingSubscriptionName": "Ordering",
|
||||||
|
"LocationsSubscriptionName": "Locations",
|
||||||
|
"MarketingSubscriptionName": "Marketing",
|
||||||
"GracePeriodSubscriptionName": "GracePeriod",
|
"GracePeriodSubscriptionName": "GracePeriod",
|
||||||
"PaymentSubscriptionName": "Payment",
|
"PaymentSubscriptionName": "Payment",
|
||||||
"location": "[resourceGroup().location]",
|
"location": "[resourceGroup().location]",
|
||||||
@ -133,6 +135,46 @@
|
|||||||
"entityAvailabilityStatus": "Available"
|
"entityAvailabilityStatus": "Available"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"apiVersion": "[variables('sbVersion')]",
|
||||||
|
"name": "[variables('LocationsSubscriptionName')]",
|
||||||
|
"type": "Subscriptions",
|
||||||
|
"dependsOn": [
|
||||||
|
"[variables('serviceBusTopicName')]"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"lockDuration": "00:00:30",
|
||||||
|
"requiresSession": false,
|
||||||
|
"defaultMessageTimeToLive": "14.00:00:00",
|
||||||
|
"deadLetteringOnMessageExpiration": true,
|
||||||
|
"deadLetteringOnFilterEvaluationExceptions": true,
|
||||||
|
"maxDeliveryCount": 10,
|
||||||
|
"enableBatchedOperations": false,
|
||||||
|
"status": "Active",
|
||||||
|
"autoDeleteOnIdle": "10675199.02:48:05.4775807",
|
||||||
|
"entityAvailabilityStatus": "Available"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"apiVersion": "[variables('sbVersion')]",
|
||||||
|
"name": "[variables('MarketingSubscriptionName')]",
|
||||||
|
"type": "Subscriptions",
|
||||||
|
"dependsOn": [
|
||||||
|
"[variables('serviceBusTopicName')]"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"lockDuration": "00:00:30",
|
||||||
|
"requiresSession": false,
|
||||||
|
"defaultMessageTimeToLive": "14.00:00:00",
|
||||||
|
"deadLetteringOnMessageExpiration": true,
|
||||||
|
"deadLetteringOnFilterEvaluationExceptions": true,
|
||||||
|
"maxDeliveryCount": 10,
|
||||||
|
"enableBatchedOperations": false,
|
||||||
|
"status": "Active",
|
||||||
|
"autoDeleteOnIdle": "10675199.02:48:05.4775807",
|
||||||
|
"entityAvailabilityStatus": "Available"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"apiVersion": "[variables('sbVersion')]",
|
"apiVersion": "[variables('sbVersion')]",
|
||||||
"name": "[variables('GracePeriodSubscriptionName')]",
|
"name": "[variables('GracePeriodSubscriptionName')]",
|
||||||
|
@ -74,6 +74,21 @@
|
|||||||
"[concat('Microsoft.Sql/servers/', variables('sql_server_name'))]"
|
"[concat('Microsoft.Sql/servers/', variables('sql_server_name'))]"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "databases",
|
||||||
|
"name": "[parameters('sql_server').dbs.marketing]",
|
||||||
|
"apiVersion": "2014-04-01-preview",
|
||||||
|
"location": "[resourceGroup().location]",
|
||||||
|
"properties": {
|
||||||
|
"edition": "Standard",
|
||||||
|
"collation": "SQL_Latin1_General_CP1_CI_AS",
|
||||||
|
"maxSizeBytes": "1073741824",
|
||||||
|
"requestedServiceObjectiveName": "S1"
|
||||||
|
},
|
||||||
|
"dependsOn": [
|
||||||
|
"[concat('Microsoft.Sql/servers/', variables('sql_server_name'))]"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "firewallrules",
|
"type": "firewallrules",
|
||||||
"name": "AllowAllWindowsAzureIps",
|
"name": "AllowAllWindowsAzureIps",
|
||||||
|
@ -8,7 +8,8 @@
|
|||||||
"dbs": {
|
"dbs": {
|
||||||
"ordering": "orderingdb",
|
"ordering": "orderingdb",
|
||||||
"identity": "identitydb",
|
"identity": "identitydb",
|
||||||
"catalog": "catalogdb"
|
"catalog": "catalogdb",
|
||||||
|
"marketing": "marketingdb"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
94
deploy/azure/az/storage/marketing/deploystorage.json
Normal file
94
deploy/azure/az/storage/marketing/deploystorage.json
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
|
||||||
|
"contentVersion": "1.0.0.0",
|
||||||
|
"parameters": {
|
||||||
|
"marketingstorage": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"profileName" : {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"endpointName" : {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"variables": {
|
||||||
|
"marketingstorage": "[concat(parameters('marketingstorage'), uniqueString(resourceGroup().id))]",
|
||||||
|
"endpointName": "[concat(parameters('endpointName'), uniqueString(resourceGroup().id))]",
|
||||||
|
"profileName": "[parameters('profileName')]"
|
||||||
|
},
|
||||||
|
"resources": [
|
||||||
|
{
|
||||||
|
"type": "Microsoft.Storage/storageAccounts",
|
||||||
|
"name": "[variables('marketingstorage')]",
|
||||||
|
"apiVersion": "2016-01-01",
|
||||||
|
"location": "[resourceGroup().location]",
|
||||||
|
"tags": {
|
||||||
|
"displayName": "[variables('marketingstorage')]"
|
||||||
|
},
|
||||||
|
"sku": {
|
||||||
|
"name": "Standard_LRS"
|
||||||
|
},
|
||||||
|
"kind": "Storage"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "[variables('profileName')]",
|
||||||
|
"type": "Microsoft.Cdn/profiles",
|
||||||
|
"location": "[resourceGroup().location]",
|
||||||
|
"apiVersion": "2016-04-02",
|
||||||
|
"tags": {
|
||||||
|
"displayName": "[variables('profileName')]"
|
||||||
|
},
|
||||||
|
"sku": {
|
||||||
|
"name": "Standard_Verizon"
|
||||||
|
},
|
||||||
|
"resources": [
|
||||||
|
{
|
||||||
|
"apiVersion": "2016-04-02",
|
||||||
|
"name": "[variables('endpointName')]",
|
||||||
|
"type": "endpoints",
|
||||||
|
"dependsOn": [
|
||||||
|
"[variables('profileName')]",
|
||||||
|
"[variables('marketingstorage')]"
|
||||||
|
],
|
||||||
|
"location": "[resourceGroup().location]",
|
||||||
|
"tags": {
|
||||||
|
"displayName": "[variables('endpointName')]"
|
||||||
|
},
|
||||||
|
"properties": {
|
||||||
|
"originHostHeader": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('marketingstorage')),'2015-06-15' ).primaryEndpoints.blob,'https://',''),'/','')]",
|
||||||
|
"isHttpAllowed": true,
|
||||||
|
"isHttpsAllowed": true,
|
||||||
|
"queryStringCachingBehavior": "IgnoreQueryString",
|
||||||
|
"contentTypesToCompress": [
|
||||||
|
"text/plain",
|
||||||
|
"text/html",
|
||||||
|
"text/css",
|
||||||
|
"application/x-javascript",
|
||||||
|
"text/javascript"
|
||||||
|
],
|
||||||
|
"isCompressionEnabled": "True",
|
||||||
|
"origins": [
|
||||||
|
{
|
||||||
|
"name": "origin1",
|
||||||
|
"properties": {
|
||||||
|
"hostName": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('marketingstorage')),'2015-06-15' ).primaryEndpoints.blob,'https://',''),'/','')]"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputs": {
|
||||||
|
"hostName": {
|
||||||
|
"type": "string",
|
||||||
|
"value": "[reference(resourceId('Microsoft.cdn/profiles/endpoints', variables('profileName'), variables('endpointName'))).hostName]"
|
||||||
|
},
|
||||||
|
"originHostHeader": {
|
||||||
|
"type": "string",
|
||||||
|
"value": "[reference(resourceId('Microsoft.cdn/profiles/endpoints', variables('profileName'), variables('endpointName'))).originHostHeader]"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
|
||||||
|
"contentVersion": "1.0.0.0",
|
||||||
|
"parameters": {
|
||||||
|
"marketingstorage": {
|
||||||
|
"value": "marketing"
|
||||||
|
},
|
||||||
|
"profileName":{
|
||||||
|
"value": "eshopmarketing"
|
||||||
|
},
|
||||||
|
"endpointName":{
|
||||||
|
"value": "marketing-endpoint"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
37
deploy/azure/az/storage/marketing/readme.md
Normal file
37
deploy/azure/az/storage/marketing/readme.md
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
# Deploying Marketing Storage
|
||||||
|
|
||||||
|
The ARM template `deploystorage.json` and its parameter file (`deploystorage.parameters.json`) are used to deploy following resources:
|
||||||
|
|
||||||
|
1. One Storage Account
|
||||||
|
2. One CDN profile
|
||||||
|
3. One Endpoint
|
||||||
|
|
||||||
|
## Editing deploystorage.parameters.json file
|
||||||
|
|
||||||
|
You can edit the `deploystorage.parameters.json` file to set your values, but is not needed. The only parameters that can
|
||||||
|
be set are:
|
||||||
|
|
||||||
|
1. `marketingstorage` is a string that is used to create the storage account name. ARM script creates unique values by appending a unique string to this parameter value, so you can leave the default value.
|
||||||
|
|
||||||
|
2. `profileName` is a string that is used to create the CDN profile name.
|
||||||
|
|
||||||
|
3. `endpointName` is a string that is used to create the storage endpoint name. ARM script creates unique values by appending a unique string to this parameter value, so you can leave the default value.
|
||||||
|
|
||||||
|
## Deploy the template
|
||||||
|
|
||||||
|
Once parameter file is edited you can deploy it using [create-resources script](../../readme.md).
|
||||||
|
|
||||||
|
i. e. if you are in windows, to deploy a Storage account in a new resourcegroup located in westus, go to `deploy\az` folder and type:
|
||||||
|
|
||||||
|
```
|
||||||
|
create-resources.cmd storage\marketing\deploystorage newResourceGroup -c westus
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -22,6 +22,8 @@ Using `docker-machine` is the recommended way to create a VM with docker install
|
|||||||
3. [Deploying Redis Cache](az/redis/readme.md)
|
3. [Deploying Redis Cache](az/redis/readme.md)
|
||||||
4. [Deploying Cosmosdb](az/cosmos/readme.md)
|
4. [Deploying Cosmosdb](az/cosmos/readme.md)
|
||||||
5. [Deploying Catalog Storage](az/storage/catalog/readme.md)
|
5. [Deploying Catalog Storage](az/storage/catalog/readme.md)
|
||||||
|
6. [Deploying Marketing Storage](az/storage/marketing/readme.md)
|
||||||
|
7. [Deploying Marketing Azure functions](az/azurefunctions/readme.md)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
21
deploy/k8s/archived/helm/apigwmm/.helmignore
Normal file
21
deploy/k8s/archived/helm/apigwmm/.helmignore
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
5
deploy/k8s/archived/helm/apigwmm/Chart.yaml
Normal file
5
deploy/k8s/archived/helm/apigwmm/Chart.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
appVersion: "1.0"
|
||||||
|
description: A Helm chart for Kubernetes
|
||||||
|
name: apigwmm
|
||||||
|
version: 0.1.0
|
75
deploy/k8s/archived/helm/apigwmm/envoy.yaml
Normal file
75
deploy/k8s/archived/helm/apigwmm/envoy.yaml
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
admin:
|
||||||
|
access_log_path: "/dev/null"
|
||||||
|
address:
|
||||||
|
socket_address:
|
||||||
|
address: 0.0.0.0
|
||||||
|
port_value: 8001
|
||||||
|
static_resources:
|
||||||
|
listeners:
|
||||||
|
- address:
|
||||||
|
socket_address:
|
||||||
|
address: 0.0.0.0
|
||||||
|
port_value: 80
|
||||||
|
filter_chains:
|
||||||
|
- filters:
|
||||||
|
- name: envoy.http_connection_manager
|
||||||
|
config:
|
||||||
|
codec_type: auto
|
||||||
|
stat_prefix: ingress_http
|
||||||
|
route_config:
|
||||||
|
name: eshop_backend_route
|
||||||
|
virtual_hosts:
|
||||||
|
- name: eshop_backend
|
||||||
|
domains:
|
||||||
|
- "*"
|
||||||
|
routes:
|
||||||
|
- name: "m-short"
|
||||||
|
match:
|
||||||
|
prefix: "/m/"
|
||||||
|
route:
|
||||||
|
auto_host_rewrite: true
|
||||||
|
prefix_rewrite: "/marketing-api/"
|
||||||
|
cluster: marketing
|
||||||
|
- name: "m-long"
|
||||||
|
match:
|
||||||
|
prefix: "/marketing-api/"
|
||||||
|
route:
|
||||||
|
auto_host_rewrite: true
|
||||||
|
cluster: marketing
|
||||||
|
http_filters:
|
||||||
|
- name: envoy.router
|
||||||
|
access_log:
|
||||||
|
- name: envoy.file_access_log
|
||||||
|
filter:
|
||||||
|
not_health_check_filter: {}
|
||||||
|
config:
|
||||||
|
json_format:
|
||||||
|
time: "%START_TIME%"
|
||||||
|
protocol: "%PROTOCOL%"
|
||||||
|
duration: "%DURATION%"
|
||||||
|
request_method: "%REQ(:METHOD)%"
|
||||||
|
request_host: "%REQ(HOST)%"
|
||||||
|
path: "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%"
|
||||||
|
response_flags: "%RESPONSE_FLAGS%"
|
||||||
|
route_name: "%ROUTE_NAME%"
|
||||||
|
upstream_host: "%UPSTREAM_HOST%"
|
||||||
|
upstream_cluster: "%UPSTREAM_CLUSTER%"
|
||||||
|
upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%"
|
||||||
|
path: "/tmp/access.log"
|
||||||
|
clusters:
|
||||||
|
- name: marketing
|
||||||
|
connect_timeout: 0.25s
|
||||||
|
type: logical_dns
|
||||||
|
lb_policy: round_robin
|
||||||
|
hosts:
|
||||||
|
- socket_address:
|
||||||
|
address: marketing-api
|
||||||
|
port_value: 80
|
||||||
|
- name: locations
|
||||||
|
connect_timeout: 0.25s
|
||||||
|
type: logical_dns
|
||||||
|
lb_policy: round_robin
|
||||||
|
hosts:
|
||||||
|
- socket_address:
|
||||||
|
address: locations-api
|
||||||
|
port_value: 80
|
2
deploy/k8s/archived/helm/apigwmm/templates/NOTES.txt
Normal file
2
deploy/k8s/archived/helm/apigwmm/templates/NOTES.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
eShop API Gateway for Mobile Marketing services installed
|
||||||
|
----------------------------------------------------------
|
32
deploy/k8s/archived/helm/apigwmm/templates/_helpers.tpl
Normal file
32
deploy/k8s/archived/helm/apigwmm/templates/_helpers.tpl
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "apigwmm.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "apigwmm.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride -}}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- if contains $name .Release.Name -}}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "apigwmm.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
52
deploy/k8s/archived/helm/apigwmm/templates/_names.tpl
Normal file
52
deploy/k8s/archived/helm/apigwmm/templates/_names.tpl
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
{{- define "suffix-name" -}}
|
||||||
|
{{- if .Values.app.name -}}
|
||||||
|
{{- .Values.app.name -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Release.Name -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "sql-name" -}}
|
||||||
|
{{- if .Values.inf.sql.host -}}
|
||||||
|
{{- .Values.inf.sql.host -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s" "sql-data" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "mongo-name" -}}
|
||||||
|
{{- if .Values.inf.mongo.host -}}
|
||||||
|
{{- .Values.inf.mongo.host -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s" "nosql-data" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "url-of" -}}
|
||||||
|
{{- $name := first .}}
|
||||||
|
{{- $ctx := last .}}
|
||||||
|
{{- if eq $name "" -}}
|
||||||
|
{{- $ctx.Values.inf.k8s.dns -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just <dns>/<name> */}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{{- define "pathBase" -}}
|
||||||
|
{{- if .Values.inf.k8s.suffix -}}
|
||||||
|
{{- $suffix := include "suffix-name" . -}}
|
||||||
|
{{- printf "%s-%s" .Values.pathBase $suffix -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Values.pathBase -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "fqdn-image" -}}
|
||||||
|
{{- if .Values.inf.registry -}}
|
||||||
|
{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Values.image.repository -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
110
deploy/k8s/archived/helm/apigwmm/templates/deployment.yaml
Normal file
110
deploy/k8s/archived/helm/apigwmm/templates/deployment.yaml
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
{{- $name := include "apigwmm.fullname" . -}}
|
||||||
|
{{- $cfgname := printf "%s-%s" "cfg" $name -}}
|
||||||
|
{{- $envoycfgname := printf "%s-%s" "envoy" $name -}}
|
||||||
|
apiVersion: apps/v1beta2
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ template "apigwmm.fullname" . }}
|
||||||
|
labels:
|
||||||
|
ufo: {{ $cfgname}}
|
||||||
|
app: {{ template "apigwmm.name" . }}
|
||||||
|
chart: {{ template "apigwmm.chart" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: {{ template "apigwmm.name" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: {{ template "apigwmm.name" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
{{ if .Values.inf.mesh.enabled -}}
|
||||||
|
annotations:
|
||||||
|
linkerd.io/inject: enabled
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{ if .Values.inf.registry -}}
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: {{ .Values.inf.registry.secretName }}
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: {{ $envoycfgname }}
|
||||||
|
items:
|
||||||
|
- key: envoy.yaml
|
||||||
|
path: envoy.yaml
|
||||||
|
containers:
|
||||||
|
- name: {{ .Chart.Name }}
|
||||||
|
{{ if .Values.probes -}}
|
||||||
|
{{- if .Values.probes.liveness -}}
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
port: {{ .Values.probes.liveness.port }}
|
||||||
|
path: {{ .Values.probes.liveness.path }}
|
||||||
|
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if .Values.probes -}}
|
||||||
|
{{- if .Values.probes.readiness }}
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
port: {{ .Values.probes.readiness.port }}
|
||||||
|
path: {{ .Values.probes.readiness.path }}
|
||||||
|
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
|
||||||
|
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
volumeMounts:
|
||||||
|
- name: config
|
||||||
|
mountPath: {{ .Values.envoy.configPath }}
|
||||||
|
env:
|
||||||
|
- name: PATH_BASE
|
||||||
|
value: {{ include "pathBase" . }}
|
||||||
|
- name: k8sname
|
||||||
|
value: {{ .Values.clusterName }}
|
||||||
|
{{- if .Values.env.values -}}
|
||||||
|
{{- range .Values.env.values }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
value: {{ .value | quote }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if .Values.env.configmap -}}
|
||||||
|
{{- range .Values.env.configmap }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: {{ $cfgname }}
|
||||||
|
key: {{ .key }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
- name: admin
|
||||||
|
containerPort: 8001
|
||||||
|
protocol: TCP
|
||||||
|
resources:
|
||||||
|
{{ toYaml .Values.resources | indent 12 }}
|
||||||
|
{{- with .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
|
14
deploy/k8s/archived/helm/apigwmm/templates/envoy-cm.yaml
Normal file
14
deploy/k8s/archived/helm/apigwmm/templates/envoy-cm.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{{- $name := include "apigwmm.fullname" . -}}
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: "envoy-{{ $name }}"
|
||||||
|
labels:
|
||||||
|
app: {{ template "apigwmm.name" . }}
|
||||||
|
chart: {{ template "apigwmm.chart" .}}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
data:
|
||||||
|
{{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }}
|
||||||
|
|
46
deploy/k8s/archived/helm/apigwmm/templates/ingress.yaml
Normal file
46
deploy/k8s/archived/helm/apigwmm/templates/ingress.yaml
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
{{- if .Values.ingress.enabled -}}
|
||||||
|
{{- $ingressPath := include "pathBase" . -}}
|
||||||
|
{{- $serviceName := .Values.app.svc.mobilemarketingapigw -}}
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: {{ template "apigwmm.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "apigwmm.name" . }}
|
||||||
|
chart: {{ template "apigwmm.chart" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
{{- with .Values.ingress.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml . | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if and .Values.inf.tls.enabled .Values.inf.tls.issuer }}
|
||||||
|
cert-manager.io/issuer: {{ .Values.inf.tls.issuer }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.inf.mesh.enabled }}
|
||||||
|
{{- with .Values.ingress.mesh.annotations }}
|
||||||
|
{{ toYaml . | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.ingress.tls }}
|
||||||
|
tls:
|
||||||
|
{{- range .Values.ingress.tls }}
|
||||||
|
- hosts:
|
||||||
|
{{- range .hosts }}
|
||||||
|
- {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
secretName: {{ .secretName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
{{- range .Values.ingress.hosts }}
|
||||||
|
- host: {{ . }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: {{ $ingressPath }}
|
||||||
|
backend:
|
||||||
|
serviceName: {{ $serviceName }}
|
||||||
|
servicePort: http
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
23
deploy/k8s/archived/helm/apigwmm/templates/service.yaml
Normal file
23
deploy/k8s/archived/helm/apigwmm/templates/service.yaml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.app.svc.mobilemarketingapigw }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "apigwmm.name" . }}
|
||||||
|
chart: {{ template "apigwmm.chart" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.service.port }}
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
- port: {{ .Values.service.adminPort }}
|
||||||
|
targetPort: admin
|
||||||
|
protocol: TCP
|
||||||
|
name: admin
|
||||||
|
selector:
|
||||||
|
app: {{ template "apigwmm.name" . }}
|
||||||
|
release: {{ .Release.Name }}
|
45
deploy/k8s/archived/helm/apigwmm/values.yaml
Normal file
45
deploy/k8s/archived/helm/apigwmm/values.yaml
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
replicaCount: 1
|
||||||
|
clusterName: eshop-aks
|
||||||
|
pathBase: /mobilemarketingapigw
|
||||||
|
|
||||||
|
image:
|
||||||
|
repository: envoyproxy/envoy
|
||||||
|
tag: v1.11.1
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
adminPort: 8001
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
annotations:
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: "/"
|
||||||
|
ingress.kubernetes.io/rewrite-target: "/"
|
||||||
|
tls: []
|
||||||
|
|
||||||
|
resources: {}
|
||||||
|
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
|
|
||||||
|
env: {}
|
||||||
|
|
||||||
|
envoy:
|
||||||
|
configPath: /etc/envoy
|
||||||
|
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
path: /ready
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 15
|
||||||
|
port: 8001
|
||||||
|
readiness:
|
||||||
|
path: /ready
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 60
|
||||||
|
port: 8001
|
21
deploy/k8s/archived/helm/apigwwm/.helmignore
Normal file
21
deploy/k8s/archived/helm/apigwwm/.helmignore
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
5
deploy/k8s/archived/helm/apigwwm/Chart.yaml
Normal file
5
deploy/k8s/archived/helm/apigwwm/Chart.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
appVersion: "1.0"
|
||||||
|
description: A Helm chart for Kubernetes
|
||||||
|
name: apigwwm
|
||||||
|
version: 0.1.0
|
75
deploy/k8s/archived/helm/apigwwm/envoy.yaml
Normal file
75
deploy/k8s/archived/helm/apigwwm/envoy.yaml
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
admin:
|
||||||
|
access_log_path: "/dev/null"
|
||||||
|
address:
|
||||||
|
socket_address:
|
||||||
|
address: 0.0.0.0
|
||||||
|
port_value: 8001
|
||||||
|
static_resources:
|
||||||
|
listeners:
|
||||||
|
- address:
|
||||||
|
socket_address:
|
||||||
|
address: 0.0.0.0
|
||||||
|
port_value: 80
|
||||||
|
filter_chains:
|
||||||
|
- filters:
|
||||||
|
- name: envoy.http_connection_manager
|
||||||
|
config:
|
||||||
|
codec_type: auto
|
||||||
|
stat_prefix: ingress_http
|
||||||
|
route_config:
|
||||||
|
name: eshop_backend_route
|
||||||
|
virtual_hosts:
|
||||||
|
- name: eshop_backend
|
||||||
|
domains:
|
||||||
|
- "*"
|
||||||
|
routes:
|
||||||
|
- name: "m-short"
|
||||||
|
match:
|
||||||
|
prefix: "/m/"
|
||||||
|
route:
|
||||||
|
auto_host_rewrite: true
|
||||||
|
prefix_rewrite: "/marketing-api/"
|
||||||
|
cluster: marketing
|
||||||
|
- name: "m-long"
|
||||||
|
match:
|
||||||
|
prefix: "/marketing-api/"
|
||||||
|
route:
|
||||||
|
auto_host_rewrite: true
|
||||||
|
cluster: marketing
|
||||||
|
http_filters:
|
||||||
|
- name: envoy.router
|
||||||
|
access_log:
|
||||||
|
- name: envoy.file_access_log
|
||||||
|
filter:
|
||||||
|
not_health_check_filter: {}
|
||||||
|
config:
|
||||||
|
json_format:
|
||||||
|
time: "%START_TIME%"
|
||||||
|
protocol: "%PROTOCOL%"
|
||||||
|
duration: "%DURATION%"
|
||||||
|
request_method: "%REQ(:METHOD)%"
|
||||||
|
request_host: "%REQ(HOST)%"
|
||||||
|
path: "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%"
|
||||||
|
response_flags: "%RESPONSE_FLAGS%"
|
||||||
|
route_name: "%ROUTE_NAME%"
|
||||||
|
upstream_host: "%UPSTREAM_HOST%"
|
||||||
|
upstream_cluster: "%UPSTREAM_CLUSTER%"
|
||||||
|
upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%"
|
||||||
|
path: "/tmp/access.log"
|
||||||
|
clusters:
|
||||||
|
- name: marketing
|
||||||
|
connect_timeout: 0.25s
|
||||||
|
type: strict_dns
|
||||||
|
lb_policy: round_robin
|
||||||
|
hosts:
|
||||||
|
- socket_address:
|
||||||
|
address: marketing-api
|
||||||
|
port_value: 80
|
||||||
|
- name: locations
|
||||||
|
connect_timeout: 0.25s
|
||||||
|
type: strict_dns
|
||||||
|
lb_policy: round_robin
|
||||||
|
hosts:
|
||||||
|
- socket_address:
|
||||||
|
address: locations-api
|
||||||
|
port_value: 80
|
2
deploy/k8s/archived/helm/apigwwm/templates/NOTES.txt
Normal file
2
deploy/k8s/archived/helm/apigwwm/templates/NOTES.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
eShop API Gateway for Web Marketing services installed
|
||||||
|
------------------------------------------------------
|
32
deploy/k8s/archived/helm/apigwwm/templates/_helpers.tpl
Normal file
32
deploy/k8s/archived/helm/apigwwm/templates/_helpers.tpl
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "apigwwm.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "apigwwm.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride -}}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- if contains $name .Release.Name -}}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "apigwwm.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
52
deploy/k8s/archived/helm/apigwwm/templates/_names.tpl
Normal file
52
deploy/k8s/archived/helm/apigwwm/templates/_names.tpl
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
{{- define "suffix-name" -}}
|
||||||
|
{{- if .Values.app.name -}}
|
||||||
|
{{- .Values.app.name -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Release.Name -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "sql-name" -}}
|
||||||
|
{{- if .Values.inf.sql.host -}}
|
||||||
|
{{- .Values.inf.sql.host -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s" "sql-data" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "mongo-name" -}}
|
||||||
|
{{- if .Values.inf.mongo.host -}}
|
||||||
|
{{- .Values.inf.mongo.host -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s" "nosql-data" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "url-of" -}}
|
||||||
|
{{- $name := first .}}
|
||||||
|
{{- $ctx := last .}}
|
||||||
|
{{- if eq $name "" -}}
|
||||||
|
{{- $ctx.Values.inf.k8s.dns -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just <dns>/<name> */}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{{- define "pathBase" -}}
|
||||||
|
{{- if .Values.inf.k8s.suffix -}}
|
||||||
|
{{- $suffix := include "suffix-name" . -}}
|
||||||
|
{{- printf "%s-%s" .Values.pathBase $suffix -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Values.pathBase -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "fqdn-image" -}}
|
||||||
|
{{- if .Values.inf.registry -}}
|
||||||
|
{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Values.image.repository -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
110
deploy/k8s/archived/helm/apigwwm/templates/deployment.yaml
Normal file
110
deploy/k8s/archived/helm/apigwwm/templates/deployment.yaml
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
{{- $name := include "apigwwm.fullname" . -}}
|
||||||
|
{{- $cfgname := printf "%s-%s" "cfg" $name -}}
|
||||||
|
{{- $envoycfgname := printf "%s-%s" "envoy" $name -}}
|
||||||
|
apiVersion: apps/v1beta2
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ template "apigwwm.fullname" . }}
|
||||||
|
labels:
|
||||||
|
ufo: {{ $cfgname}}
|
||||||
|
app: {{ template "apigwwm.name" . }}
|
||||||
|
chart: {{ template "apigwwm.chart" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: {{ template "apigwwm.name" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: {{ template "apigwwm.name" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
{{ if .Values.inf.mesh.enabled -}}
|
||||||
|
annotations:
|
||||||
|
linkerd.io/inject: enabled
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{ if .Values.inf.registry -}}
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: {{ .Values.inf.registry.secretName }}
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: {{ $envoycfgname }}
|
||||||
|
items:
|
||||||
|
- key: envoy.yaml
|
||||||
|
path: envoy.yaml
|
||||||
|
containers:
|
||||||
|
- name: {{ .Chart.Name }}
|
||||||
|
{{ if .Values.probes -}}
|
||||||
|
{{- if .Values.probes.liveness -}}
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
port: {{ .Values.probes.liveness.port }}
|
||||||
|
path: {{ .Values.probes.liveness.path }}
|
||||||
|
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if .Values.probes -}}
|
||||||
|
{{- if .Values.probes.readiness }}
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
port: {{ .Values.probes.readiness.port }}
|
||||||
|
path: {{ .Values.probes.readiness.path }}
|
||||||
|
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
|
||||||
|
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
volumeMounts:
|
||||||
|
- name: config
|
||||||
|
mountPath: {{ .Values.envoy.configPath }}
|
||||||
|
env:
|
||||||
|
- name: PATH_BASE
|
||||||
|
value: {{ include "pathBase" . }}
|
||||||
|
- name: k8sname
|
||||||
|
value: {{ .Values.clusterName }}
|
||||||
|
{{- if .Values.env.values -}}
|
||||||
|
{{- range .Values.env.values }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
value: {{ .value | quote }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if .Values.env.configmap -}}
|
||||||
|
{{- range .Values.env.configmap }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: {{ $cfgname }}
|
||||||
|
key: {{ .key }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
- name: admin
|
||||||
|
containerPort: 8001
|
||||||
|
protocol: TCP
|
||||||
|
resources:
|
||||||
|
{{ toYaml .Values.resources | indent 12 }}
|
||||||
|
{{- with .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
|
14
deploy/k8s/archived/helm/apigwwm/templates/envoy-cm.yaml
Normal file
14
deploy/k8s/archived/helm/apigwwm/templates/envoy-cm.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{{- $name := include "apigwwm.fullname" . -}}
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: "envoy-{{ $name }}"
|
||||||
|
labels:
|
||||||
|
app: {{ template "apigwwm.name" . }}
|
||||||
|
chart: {{ template "apigwwm.chart" .}}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
data:
|
||||||
|
{{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 -}}
|
||||||
|
|
47
deploy/k8s/archived/helm/apigwwm/templates/ingress.yaml
Normal file
47
deploy/k8s/archived/helm/apigwwm/templates/ingress.yaml
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{{- if .Values.ingress.enabled -}}
|
||||||
|
{{- $ingressPath := include "pathBase" . -}}
|
||||||
|
{{- $serviceName := .Values.app.svc.webmarketingapigw -}}
|
||||||
|
|
||||||
|
apiVersion: extensions/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: {{ template "apigwwm.fullname" . }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "apigwwm.name" . }}
|
||||||
|
chart: {{ template "apigwwm.chart" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
{{- with .Values.ingress.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{ toYaml . | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if and .Values.inf.tls.enabled .Values.inf.tls.issuer }}
|
||||||
|
cert-manager.io/issuer: {{ .Values.inf.tls.issuer }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.inf.mesh.enabled }}
|
||||||
|
{{- with .Values.ingress.mesh.annotations }}
|
||||||
|
{{ toYaml . | indent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.ingress.tls }}
|
||||||
|
tls:
|
||||||
|
{{- range .Values.ingress.tls }}
|
||||||
|
- hosts:
|
||||||
|
{{- range .hosts }}
|
||||||
|
- {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
secretName: {{ .secretName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
rules:
|
||||||
|
{{- range .Values.ingress.hosts }}
|
||||||
|
- host: {{ . }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: {{ $ingressPath }}
|
||||||
|
backend:
|
||||||
|
serviceName: {{ $serviceName }}
|
||||||
|
servicePort: http
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
23
deploy/k8s/archived/helm/apigwwm/templates/service.yaml
Normal file
23
deploy/k8s/archived/helm/apigwwm/templates/service.yaml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.app.svc.webmarketingapigw }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "apigwwm.name" . }}
|
||||||
|
chart: {{ template "apigwwm.chart" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.service.port }}
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
- port: {{ .Values.service.adminPort }}
|
||||||
|
targetPort: admin
|
||||||
|
protocol: TCP
|
||||||
|
name: admin
|
||||||
|
selector:
|
||||||
|
app: {{ template "apigwwm.name" . }}
|
||||||
|
release: {{ .Release.Name }}
|
46
deploy/k8s/archived/helm/apigwwm/values.yaml
Normal file
46
deploy/k8s/archived/helm/apigwwm/values.yaml
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
replicaCount: 1
|
||||||
|
clusterName: eshop-aks
|
||||||
|
pathBase: /webmarketingapigw
|
||||||
|
|
||||||
|
image:
|
||||||
|
repository: envoyproxy/envoy
|
||||||
|
tag: v1.11.1
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
adminPort: 8001
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
annotations:
|
||||||
|
nginx.ingress.kubernetes.io/rewrite-target: "/"
|
||||||
|
ingress.kubernetes.io/rewrite-target: "/"
|
||||||
|
tls: []
|
||||||
|
|
||||||
|
resources: {}
|
||||||
|
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
|
|
||||||
|
# env defines the environment variables that will be declared in the pod
|
||||||
|
env: {}
|
||||||
|
|
||||||
|
envoy:
|
||||||
|
configPath: /etc/envoy
|
||||||
|
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
path: /ready
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 15
|
||||||
|
port: 8001
|
||||||
|
readiness:
|
||||||
|
path: /ready
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 60
|
||||||
|
port: 8001
|
@ -13,10 +13,14 @@ app: # app global settings
|
|||||||
spa: "" # ingress entry for web spa
|
spa: "" # ingress entry for web spa
|
||||||
status: webstatus # ingress entry for web status
|
status: webstatus # ingress entry for web status
|
||||||
webshoppingapigw: webshoppingapigw # ingress entry for web shopping Agw
|
webshoppingapigw: webshoppingapigw # ingress entry for web shopping Agw
|
||||||
|
webmarketingapigw: webmarketingapigw # ingress entry for web mkg Agw
|
||||||
|
mobilemarketingapigw: mobilemarketingapigw # ingress entry for mobile mkg Agw
|
||||||
mobileshoppingapigw: mobileshoppingapigw # ingress entry for mobile shopping Agw
|
mobileshoppingapigw: mobileshoppingapigw # ingress entry for mobile shopping Agw
|
||||||
webshoppingagg: webshoppingagg # ingress entry for web shopping aggregator
|
webshoppingagg: webshoppingagg # ingress entry for web shopping aggregator
|
||||||
mobileshoppingagg: mobileshoppingagg # ingress entry for mobile shopping aggregator
|
mobileshoppingagg: mobileshoppingagg # ingress entry for mobile shopping aggregator
|
||||||
payment: payment-api # ingress entry for payment api
|
payment: payment-api # ingress entry for payment api
|
||||||
|
locations: locations-api # ingress entry for locations api
|
||||||
|
marketing: marketing-api # ingress entry for marketing api
|
||||||
webhooks: webhooks-api # ingress entry for webhooks api
|
webhooks: webhooks-api # ingress entry for webhooks api
|
||||||
webhooksweb: webhooks-web # ingress entry for webhooks web demo client
|
webhooksweb: webhooks-web # ingress entry for webhooks web demo client
|
||||||
svc:
|
svc:
|
||||||
@ -30,9 +34,13 @@ app: # app global settings
|
|||||||
spa: webspa # service name for web spa
|
spa: webspa # service name for web spa
|
||||||
status: webstatus # service name for web status
|
status: webstatus # service name for web status
|
||||||
webshoppingapigw: webshoppingapigw # service name for web shopping Agw
|
webshoppingapigw: webshoppingapigw # service name for web shopping Agw
|
||||||
|
webmarketingapigw: webmarketingapigw # service name for web mkg Agw
|
||||||
|
mobilemarketingapigw: mobilemarketingapigw # service name for mobile mkg Agw
|
||||||
mobileshoppingapigw: mobileshoppingapigw # service name for mobile shopping Agw
|
mobileshoppingapigw: mobileshoppingapigw # service name for mobile shopping Agw
|
||||||
webshoppingagg: webshoppingagg # service name for web shopping aggregator
|
webshoppingagg: webshoppingagg # service name for web shopping aggregator
|
||||||
mobileshoppingagg: mobileshoppingagg # service name for mobile shopping aggregator
|
mobileshoppingagg: mobileshoppingagg # service name for mobile shopping aggregator
|
||||||
payment: payment-api # service name for payment api
|
payment: payment-api # service name for payment api
|
||||||
|
locations: locations-api # service name for locations api
|
||||||
|
marketing: marketing-api # service name for marketing ap
|
||||||
webhooks: webhooks-api # service name for webhooks api
|
webhooks: webhooks-api # service name for webhooks api
|
||||||
webhooksweb: webhooks-client # service name for webhooks web
|
webhooksweb: webhooks-client # service name for webhooks web
|
||||||
|
@ -12,6 +12,7 @@ metadata:
|
|||||||
data:
|
data:
|
||||||
basket__ConnectionString: {{ .Values.inf.redis.basket.constr }}
|
basket__ConnectionString: {{ .Values.inf.redis.basket.constr }}
|
||||||
urls__IdentityUrl: http://{{ .Values.app.svc.identity }}
|
urls__IdentityUrl: http://{{ .Values.app.svc.identity }}
|
||||||
|
basket__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
|
||||||
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
|
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
|
||||||
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
|
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
|
||||||
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
|
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
|
@ -36,6 +36,8 @@ env:
|
|||||||
key: all__UseAzureServiceBus
|
key: all__UseAzureServiceBus
|
||||||
- name: IdentityUrl
|
- name: IdentityUrl
|
||||||
key: urls__IdentityUrl
|
key: urls__IdentityUrl
|
||||||
|
- name: UseLoadTest
|
||||||
|
key: basket__EnableLoadTest
|
||||||
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
|
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
|
||||||
values:
|
values:
|
||||||
- name: OrchestratorType
|
- name: OrchestratorType
|
||||||
|
@ -113,7 +113,7 @@ if (-not [string]::IsNullOrEmpty($registry)) {
|
|||||||
Write-Host "Begin eShopOnContainers installation using Helm" -ForegroundColor Green
|
Write-Host "Begin eShopOnContainers installation using Helm" -ForegroundColor Green
|
||||||
|
|
||||||
$infras = ("sql-data", "nosql-data", "rabbitmq", "keystore-data", "basket-data")
|
$infras = ("sql-data", "nosql-data", "rabbitmq", "keystore-data", "basket-data")
|
||||||
$charts = ("eshop-common", "basket-api","catalog-api", "identity-api", "mobileshoppingagg","ordering-api","ordering-backgroundtasks","ordering-signalrhub", "payment-api", "webmvc", "webshoppingagg", "webspa", "webstatus", "webhooks-api", "webhooks-web")
|
$charts = ("eshop-common", "basket-api","catalog-api", "identity-api", "locations-api", "marketing-api", "mobileshoppingagg","ordering-api","ordering-backgroundtasks","ordering-signalrhub", "payment-api", "webmvc", "webshoppingagg", "webspa", "webstatus", "webhooks-api", "webhooks-web")
|
||||||
$gateways = ("apigwmm", "apigwms", "apigwwm", "apigwws")
|
$gateways = ("apigwmm", "apigwms", "apigwwm", "apigwws")
|
||||||
|
|
||||||
if ($deployInfrastructure) {
|
if ($deployInfrastructure) {
|
||||||
|
@ -142,7 +142,7 @@ fi
|
|||||||
|
|
||||||
if [[ $push_images ]]; then
|
if [[ $push_images ]]; then
|
||||||
echo "#################### Pushing images to the container registry ####################"
|
echo "#################### Pushing images to the container registry ####################"
|
||||||
services=(basket.api catalog.api identity.api ordering.api payment.api webmvc webspa webstatus)
|
services=(basket.api catalog.api identity.api ordering.api marketing.api payment.api locations.api webmvc webspa webstatus)
|
||||||
|
|
||||||
if [[ -z "$(docker image ls -q --filter=reference=eshop/$service:$image_tag)" ]]; then
|
if [[ -z "$(docker image ls -q --filter=reference=eshop/$service:$image_tag)" ]]; then
|
||||||
image_tag=linux-$image_tag
|
image_tag=linux-$image_tag
|
||||||
@ -209,7 +209,7 @@ fi
|
|||||||
|
|
||||||
echo "#################### Begin $app_name installation using Helm ####################"
|
echo "#################### Begin $app_name installation using Helm ####################"
|
||||||
infras=(sql-data nosql-data rabbitmq keystore-data basket-data)
|
infras=(sql-data nosql-data rabbitmq keystore-data basket-data)
|
||||||
charts=(eshop-common apigwms apigwws basket-api catalog-api identity-api mobileshoppingagg ordering-api ordering-backgroundtasks ordering-signalrhub payment-api webmvc webshoppingagg webspa webstatus webhooks-api webhooks-web)
|
charts=(eshop-common apigwmm apigwms apigwwm apigwws basket-api catalog-api identity-api locations-api marketing-api mobileshoppingagg ordering-api ordering-backgroundtasks ordering-signalrhub payment-api webmvc webshoppingagg webspa webstatus webhooks-api webhooks-web)
|
||||||
|
|
||||||
if [[ !$skip_infrastructure ]]; then
|
if [[ !$skip_infrastructure ]]; then
|
||||||
for infra in "${infras[@]}"
|
for infra in "${infras[@]}"
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
{{- $sqlsrv := include "sql-name" . -}}
|
{{- $sqlsrv := include "sql-name" . -}}
|
||||||
{{- $mvc_url := include "url-of" (list .Values.app.ingress.entries.mvc .) -}}
|
{{- $mvc_url := include "url-of" (list .Values.app.ingress.entries.mvc .) -}}
|
||||||
{{- $spa_url := include "url-of" (list .Values.app.ingress.entries.spa .) -}}
|
{{- $spa_url := include "url-of" (list .Values.app.ingress.entries.spa .) -}}
|
||||||
|
{{- $locations_url := include "url-of" (list .Values.app.ingress.entries.locations .) -}}
|
||||||
|
{{- $marketing_url := include "url-of" (list .Values.app.ingress.entries.marketing .) -}}
|
||||||
{{- $basket_url := include "url-of" (list .Values.app.ingress.entries.basket .) -}}
|
{{- $basket_url := include "url-of" (list .Values.app.ingress.entries.basket .) -}}
|
||||||
{{- $ordering_url := include "url-of" (list .Values.app.ingress.entries.ordering .) -}}
|
{{- $ordering_url := include "url-of" (list .Values.app.ingress.entries.ordering .) -}}
|
||||||
{{- $mobileshoppingagg := include "url-of" (list .Values.app.ingress.entries.mobileshoppingagg .) -}}
|
{{- $mobileshoppingagg := include "url-of" (list .Values.app.ingress.entries.mobileshoppingagg .) -}}
|
||||||
@ -25,6 +27,8 @@ data:
|
|||||||
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
|
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
|
||||||
mvc_e: http://{{ $mvc_url }}
|
mvc_e: http://{{ $mvc_url }}
|
||||||
spa_e: http://{{ $spa_url }}
|
spa_e: http://{{ $spa_url }}
|
||||||
|
locations_e: http://{{ $locations_url }}
|
||||||
|
marketing_e: http://{{ $marketing_url }}
|
||||||
basket_e: http://{{ $basket_url }}
|
basket_e: http://{{ $basket_url }}
|
||||||
ordering_e: http://{{ $ordering_url }}
|
ordering_e: http://{{ $ordering_url }}
|
||||||
mobileshoppingagg_e: http://{{ $mobileshoppingagg }}
|
mobileshoppingagg_e: http://{{ $mobileshoppingagg }}
|
||||||
|
@ -40,6 +40,10 @@ env:
|
|||||||
key: mvc_e
|
key: mvc_e
|
||||||
- name: SpaClient
|
- name: SpaClient
|
||||||
key: spa_e
|
key: spa_e
|
||||||
|
- name: LocationApiClient
|
||||||
|
key: locations_e
|
||||||
|
- name: MarketingApiClient
|
||||||
|
key: marketing_e
|
||||||
- name: BasketApiClient
|
- name: BasketApiClient
|
||||||
key: basket_e
|
key: basket_e
|
||||||
- name: OrderingApiClient
|
- name: OrderingApiClient
|
||||||
|
@ -19,8 +19,16 @@ inf:
|
|||||||
db: OrderingDb # Ordering API SQL db name
|
db: OrderingDb # Ordering API SQL db name
|
||||||
identity:
|
identity:
|
||||||
db: IdentityDb # Ordering API SQL db name
|
db: IdentityDb # Ordering API SQL db name
|
||||||
|
marketing:
|
||||||
|
db: MarketingDb # Marketing API SQL db name
|
||||||
webhooks:
|
webhooks:
|
||||||
db: WebhooksDb # Webhooks DB
|
db: WebhooksDb # Webhooks DB
|
||||||
|
mongo:
|
||||||
|
# host: my-nosql-data # Uncomment to use specify custom mongo host. By default nosql-data is used
|
||||||
|
locations:
|
||||||
|
database: LocationsDb
|
||||||
|
marketing:
|
||||||
|
database: MarketingDb
|
||||||
redis: # inf.redis defines the redis' connection strings
|
redis: # inf.redis defines the redis' connection strings
|
||||||
basket:
|
basket:
|
||||||
svc: basket-data # Name of k8s svc for basket redis
|
svc: basket-data # Name of k8s svc for basket redis
|
||||||
@ -38,6 +46,7 @@ inf:
|
|||||||
dns: "" # k8s external DNS. This value or ip value MUST BE PROVIDED
|
dns: "" # k8s external DNS. This value or ip value MUST BE PROVIDED
|
||||||
local: false # True when deploying on "local K8s" provided by Docker Desktop.
|
local: false # True when deploying on "local K8s" provided by Docker Desktop.
|
||||||
misc: # inf.misc contains miscellaneous configuration related to infrastructure
|
misc: # inf.misc contains miscellaneous configuration related to infrastructure
|
||||||
|
useLoadTest: false # If running under loading test or not
|
||||||
useAzureStorage: false # If catalog api uses azure storage or not
|
useAzureStorage: false # If catalog api uses azure storage or not
|
||||||
# registry: # Uncomment "registry" to specify registry secret
|
# registry: # Uncomment "registry" to specify registry secret
|
||||||
# secretName: # secretName is the name of the secret inside k8s
|
# secretName: # secretName is the name of the secret inside k8s
|
||||||
|
21
deploy/k8s/archived/helm/locations-api/.helmignore
Normal file
21
deploy/k8s/archived/helm/locations-api/.helmignore
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
5
deploy/k8s/archived/helm/locations-api/Chart.yaml
Normal file
5
deploy/k8s/archived/helm/locations-api/Chart.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
appVersion: "1.0"
|
||||||
|
description: A Helm chart for Kubernetes
|
||||||
|
name: locations-api
|
||||||
|
version: 0.1.0
|
@ -0,0 +1,9 @@
|
|||||||
|
eShop Locations API installed.
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
This API is not directly exposed outside cluster. If need to access it use:
|
||||||
|
|
||||||
|
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "locations-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||||
|
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||||
|
kubectl port-forward $POD_NAME 8080:80
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "locations-api.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "locations-api.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride -}}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- if contains $name .Release.Name -}}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "locations-api.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
52
deploy/k8s/archived/helm/locations-api/templates/_names.tpl
Normal file
52
deploy/k8s/archived/helm/locations-api/templates/_names.tpl
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
{{- define "suffix-name" -}}
|
||||||
|
{{- if .Values.app.name -}}
|
||||||
|
{{- .Values.app.name -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Release.Name -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "sql-name" -}}
|
||||||
|
{{- if .Values.inf.sql.host -}}
|
||||||
|
{{- .Values.inf.sql.host -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s" "sql-data" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "mongo-name" -}}
|
||||||
|
{{- if .Values.inf.mongo.host -}}
|
||||||
|
{{- .Values.inf.mongo.host -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s" "nosql-data" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "url-of" -}}
|
||||||
|
{{- $name := first .}}
|
||||||
|
{{- $ctx := last .}}
|
||||||
|
{{- if eq $name "" -}}
|
||||||
|
{{- $ctx.Values.inf.k8s.dns -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just <dns>/<name> */}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{{- define "pathBase" -}}
|
||||||
|
{{- if .Values.inf.k8s.suffix -}}
|
||||||
|
{{- $suffix := include "suffix-name" . -}}
|
||||||
|
{{- printf "%s-%s" .Values.pathBase $suffix -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Values.pathBase -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "fqdn-image" -}}
|
||||||
|
{{- if .Values.inf.registry -}}
|
||||||
|
{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Values.image.repository -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
@ -0,0 +1,22 @@
|
|||||||
|
{{- $name := include "locations-api.fullname" . -}}
|
||||||
|
{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}}
|
||||||
|
{{- $mongo := include "mongo-name" . -}}
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: "cfg-{{ $name }}"
|
||||||
|
labels:
|
||||||
|
app: {{ template "locations-api.name" . }}
|
||||||
|
chart: {{ template "locations-api.chart" .}}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
data:
|
||||||
|
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
|
||||||
|
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
|
||||||
|
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
|
||||||
|
all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
|
||||||
|
internalurls__IdentityUrl: http://{{ .Values.app.svc.identity }}
|
||||||
|
urls__IdentityUrl: {{ $identity }}
|
||||||
|
locations__ConnectionString: mongodb://{{ $mongo }}
|
||||||
|
locations__Database: {{ .Values.inf.mongo.locations.database }}
|
@ -0,0 +1,96 @@
|
|||||||
|
{{- $name := include "locations-api.fullname" . -}}
|
||||||
|
{{- $cfgname := printf "%s-%s" "cfg" $name -}}
|
||||||
|
apiVersion: apps/v1beta2
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ template "locations-api.fullname" . }}
|
||||||
|
labels:
|
||||||
|
ufo: {{ $cfgname}}
|
||||||
|
app: {{ template "locations-api.name" . }}
|
||||||
|
chart: {{ template "locations-api.chart" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: {{ template "locations-api.name" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: {{ template "locations-api.name" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
{{ if .Values.inf.mesh.enabled -}}
|
||||||
|
annotations:
|
||||||
|
linkerd.io/inject: enabled
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{ if .Values.inf.registry -}}
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: {{ .Values.inf.registry.secretName }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: {{ .Chart.Name }}
|
||||||
|
{{ if .Values.probes -}}
|
||||||
|
{{- if .Values.probes.liveness -}}
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
port: {{ .Values.probes.liveness.port }}
|
||||||
|
path: {{ .Values.probes.liveness.path }}
|
||||||
|
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if .Values.probes -}}
|
||||||
|
{{- if .Values.probes.readiness }}
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
port: {{ .Values.probes.readiness.port }}
|
||||||
|
path: {{ .Values.probes.readiness.path }}
|
||||||
|
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
|
||||||
|
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
env:
|
||||||
|
- name: PATH_BASE
|
||||||
|
value: {{ include "pathBase" . }}
|
||||||
|
- name: k8sname
|
||||||
|
value: {{ .Values.clusterName }}
|
||||||
|
{{- if .Values.env.values -}}
|
||||||
|
{{- range .Values.env.values }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
value: {{ .value | quote }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if .Values.env.configmap -}}
|
||||||
|
{{- range .Values.env.configmap }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: {{ $cfgname }}
|
||||||
|
key: {{ .key }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
resources:
|
||||||
|
{{ toYaml .Values.resources | indent 12 }}
|
||||||
|
{{- with .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
|
@ -0,0 +1,19 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.app.svc.locations }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "locations-api.name" . }}
|
||||||
|
chart: {{ template "locations-api.chart" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.service.port }}
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: {{ template "locations-api.name" . }}
|
||||||
|
release: {{ .Release.Name }}
|
66
deploy/k8s/archived/helm/locations-api/values.yaml
Normal file
66
deploy/k8s/archived/helm/locations-api/values.yaml
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
replicaCount: 1
|
||||||
|
clusterName: eshop-aks
|
||||||
|
pathBase: /locations-api
|
||||||
|
|
||||||
|
image:
|
||||||
|
repository: eshop/locations.api
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
enabled: false
|
||||||
|
annotations: {}
|
||||||
|
tls: []
|
||||||
|
|
||||||
|
resources: {}
|
||||||
|
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
|
|
||||||
|
# env defines the environment variables that will be declared in the pod
|
||||||
|
env:
|
||||||
|
urls:
|
||||||
|
# configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap).
|
||||||
|
configmap:
|
||||||
|
- name: ApplicationInsights__InstrumentationKey
|
||||||
|
key: all__InstrumentationKey
|
||||||
|
- name: EventBusConnection
|
||||||
|
key: all__EventBusConnection
|
||||||
|
- name: AzureServiceBusEnabled
|
||||||
|
key: all__UseAzureServiceBus
|
||||||
|
- name: UseLoadTest
|
||||||
|
key: all_EnableLoadTest
|
||||||
|
- name: IdentityUrl
|
||||||
|
key: internalurls__IdentityUrl
|
||||||
|
- name: IdentityUrlExternal
|
||||||
|
key: urls__IdentityUrl
|
||||||
|
- name: ConnectionString
|
||||||
|
key: locations__ConnectionString
|
||||||
|
- name: Database
|
||||||
|
key: locations__Database
|
||||||
|
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
|
||||||
|
values:
|
||||||
|
- name: ASPNETCORE_ENVIRONMENT
|
||||||
|
value: Development
|
||||||
|
- name: OrchestratorType
|
||||||
|
value: 'K8S'
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
path: /liveness
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 15
|
||||||
|
port: 80
|
||||||
|
readiness:
|
||||||
|
path: /hc
|
||||||
|
timeoutSeconds: 5
|
||||||
|
initialDelaySeconds: 90
|
||||||
|
periodSeconds: 60
|
||||||
|
port: 80
|
21
deploy/k8s/archived/helm/marketing-api/.helmignore
Normal file
21
deploy/k8s/archived/helm/marketing-api/.helmignore
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
5
deploy/k8s/archived/helm/marketing-api/Chart.yaml
Normal file
5
deploy/k8s/archived/helm/marketing-api/Chart.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
appVersion: "1.0"
|
||||||
|
description: A Helm chart for Kubernetes
|
||||||
|
name: marketing-api
|
||||||
|
version: 0.1.0
|
@ -0,0 +1,9 @@
|
|||||||
|
eShop Marketing API installed.
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
This API is not directly exposed outside cluster. If need to access it use:
|
||||||
|
|
||||||
|
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "marketing-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||||
|
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||||
|
kubectl port-forward $POD_NAME 8080:80
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "marketing-api.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "marketing-api.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride -}}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- if contains $name .Release.Name -}}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "marketing-api.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
60
deploy/k8s/archived/helm/marketing-api/templates/_names.tpl
Normal file
60
deploy/k8s/archived/helm/marketing-api/templates/_names.tpl
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
{{- define "suffix-name" -}}
|
||||||
|
{{- if .Values.app.name -}}
|
||||||
|
{{- .Values.app.name -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Release.Name -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "sql-name" -}}
|
||||||
|
{{- if .Values.inf.sql.host -}}
|
||||||
|
{{- .Values.inf.sql.host -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s" "sql-data" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "mongo-name" -}}
|
||||||
|
{{- if .Values.inf.mongo.host -}}
|
||||||
|
{{- .Values.inf.mongo.host -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s" "nosql-data" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "url-of" -}}
|
||||||
|
{{- $name := first .}}
|
||||||
|
{{- $ctx := last .}}
|
||||||
|
{{- if eq $name "" -}}
|
||||||
|
{{- $ctx.Values.inf.k8s.dns -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just <dns>/<name> */}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{{- define "pathBase" -}}
|
||||||
|
{{- if .Values.inf.k8s.suffix -}}
|
||||||
|
{{- $suffix := include "suffix-name" . -}}
|
||||||
|
{{- printf "%s-%s" .Values.pathBase $suffix -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Values.pathBase -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "fqdn-image" -}}
|
||||||
|
{{- if .Values.inf.registry -}}
|
||||||
|
{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Values.image.repository -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "protocol" -}}
|
||||||
|
{{- if .Values.inf.tls.enabled -}}
|
||||||
|
{{- printf "%s" "https" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s" "http" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
@ -0,0 +1,27 @@
|
|||||||
|
{{- $name := include "marketing-api.fullname" . -}}
|
||||||
|
{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}}
|
||||||
|
{{- $webshoppingapigw := include "url-of" (list .Values.app.ingress.entries.webshoppingapigw .) -}}
|
||||||
|
{{- $mongo := include "mongo-name" . -}}
|
||||||
|
{{- $sqlsrv := include "sql-name" . -}}
|
||||||
|
{{- $protocol := include "protocol" . -}}
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: "cfg-{{ $name }}"
|
||||||
|
labels:
|
||||||
|
app: {{ template "marketing-api.name" . }}
|
||||||
|
chart: {{ template "marketing-api.chart" .}}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
data:
|
||||||
|
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
|
||||||
|
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
|
||||||
|
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
|
||||||
|
all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
|
||||||
|
internalurls__IdentityUrl: http://{{ .Values.app.svc.identity }}
|
||||||
|
urls__IdentityUrl: {{ $protocol }}://{{ $identity }}
|
||||||
|
marketing__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.marketing.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }};
|
||||||
|
marketing__MongoConnectionString: mongodb://{{ $mongo }}
|
||||||
|
marketing__MongoDatabase: {{ .Values.inf.mongo.marketing.database }}
|
||||||
|
marketing__PicBaseUrl: {{ $protocol }}://{{ $webshoppingapigw }}/c/api/v1/catalog/items/[0]/pic/
|
@ -0,0 +1,96 @@
|
|||||||
|
{{- $name := include "marketing-api.fullname" . -}}
|
||||||
|
{{- $cfgname := printf "%s-%s" "cfg" $name -}}
|
||||||
|
apiVersion: apps/v1beta2
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ template "marketing-api.fullname" . }}
|
||||||
|
labels:
|
||||||
|
ufo: {{ $cfgname}}
|
||||||
|
app: {{ template "marketing-api.name" . }}
|
||||||
|
chart: {{ template "marketing-api.chart" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: {{ template "marketing-api.name" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: {{ template "marketing-api.name" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
{{ if .Values.inf.mesh.enabled -}}
|
||||||
|
annotations:
|
||||||
|
linkerd.io/inject: enabled
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{ if .Values.inf.registry -}}
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: {{ .Values.inf.registry.secretName }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: {{ .Chart.Name }}
|
||||||
|
{{ if .Values.probes -}}
|
||||||
|
{{- if .Values.probes.liveness -}}
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
port: {{ .Values.probes.liveness.port }}
|
||||||
|
path: {{ .Values.probes.liveness.path }}
|
||||||
|
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if .Values.probes -}}
|
||||||
|
{{- if .Values.probes.readiness }}
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
port: {{ .Values.probes.readiness.port }}
|
||||||
|
path: {{ .Values.probes.readiness.path }}
|
||||||
|
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
|
||||||
|
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
env:
|
||||||
|
- name: PATH_BASE
|
||||||
|
value: {{ include "pathBase" . }}
|
||||||
|
- name: k8sname
|
||||||
|
value: {{ .Values.clusterName }}
|
||||||
|
{{- if .Values.env.values -}}
|
||||||
|
{{- range .Values.env.values }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
value: {{ .value | quote }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if .Values.env.configmap -}}
|
||||||
|
{{- range .Values.env.configmap }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: {{ $cfgname }}
|
||||||
|
key: {{ .key }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
resources:
|
||||||
|
{{ toYaml .Values.resources | indent 12 }}
|
||||||
|
{{- with .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
|
@ -0,0 +1,19 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.app.svc.marketing }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "marketing-api.name" . }}
|
||||||
|
chart: {{ template "marketing-api.chart" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.service.port }}
|
||||||
|
targetPort: http
|
||||||
|
protocol: TCP
|
||||||
|
name: http
|
||||||
|
selector:
|
||||||
|
app: {{ template "marketing-api.name" . }}
|
||||||
|
release: {{ .Release.Name }}
|
70
deploy/k8s/archived/helm/marketing-api/values.yaml
Normal file
70
deploy/k8s/archived/helm/marketing-api/values.yaml
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
replicaCount: 1
|
||||||
|
clusterName: eshop-aks
|
||||||
|
pathBase: /marketing-api
|
||||||
|
|
||||||
|
image:
|
||||||
|
repository: eshop/marketing.api
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
enabled: false
|
||||||
|
annotations: {}
|
||||||
|
tls: []
|
||||||
|
|
||||||
|
resources: {}
|
||||||
|
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
|
|
||||||
|
# env defines the environment variables that will be declared in the pod
|
||||||
|
env:
|
||||||
|
urls:
|
||||||
|
# configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap).
|
||||||
|
configmap:
|
||||||
|
- name: ApplicationInsights__InstrumentationKey
|
||||||
|
key: all__InstrumentationKey
|
||||||
|
- name: EventBusConnection
|
||||||
|
key: all__EventBusConnection
|
||||||
|
- name: AzureServiceBusEnabled
|
||||||
|
key: all__UseAzureServiceBus
|
||||||
|
- name: UseLoadTest
|
||||||
|
key: all_EnableLoadTest
|
||||||
|
- name: IdentityUrl
|
||||||
|
key: internalurls__IdentityUrl
|
||||||
|
- name: IdentityUrlExternal
|
||||||
|
key: urls__IdentityUrl
|
||||||
|
- name: ConnectionString
|
||||||
|
key: marketing__ConnectionString
|
||||||
|
- name: MongoConnectionString
|
||||||
|
key: marketing__MongoConnectionString
|
||||||
|
- name: MongoDatabase
|
||||||
|
key: marketing__MongoDatabase
|
||||||
|
- name: PicBaseUrl
|
||||||
|
key: marketing__PicBaseUrl
|
||||||
|
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
|
||||||
|
values:
|
||||||
|
- name: ASPNETCORE_ENVIRONMENT
|
||||||
|
value: Development
|
||||||
|
- name: OrchestratorType
|
||||||
|
value: 'K8S'
|
||||||
|
probes:
|
||||||
|
liveness:
|
||||||
|
path: /liveness
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 15
|
||||||
|
port: 80
|
||||||
|
readiness:
|
||||||
|
path: /hc
|
||||||
|
timeoutSeconds: 5
|
||||||
|
initialDelaySeconds: 90
|
||||||
|
periodSeconds: 60
|
||||||
|
port: 80
|
@ -1,4 +1,4 @@
|
|||||||
eShop Mobile Shopping Aggregator is installed
|
eShop Mobile Marketing Aggregator is installed
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
|
|
||||||
This API is not directly exposed outside cluster. If need to access it use:
|
This API is not directly exposed outside cluster. If need to access it use:
|
||||||
|
@ -11,6 +11,7 @@ metadata:
|
|||||||
heritage: {{ .Release.Service }}
|
heritage: {{ .Release.Service }}
|
||||||
data:
|
data:
|
||||||
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
|
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
|
||||||
|
all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
|
||||||
mobileshoppingagg__keystore: {{ .Values.inf.redis.keystore.constr }}
|
mobileshoppingagg__keystore: {{ .Values.inf.redis.keystore.constr }}
|
||||||
internalurls__basket: http://{{ .Values.app.svc.basket }}
|
internalurls__basket: http://{{ .Values.app.svc.basket }}
|
||||||
internalurls__catalog: http://{{ .Values.app.svc.catalog }}
|
internalurls__catalog: http://{{ .Values.app.svc.catalog }}
|
||||||
@ -20,7 +21,9 @@ data:
|
|||||||
internalurls__catalog__hc: http://{{ .Values.app.svc.catalog }}/hc
|
internalurls__catalog__hc: http://{{ .Values.app.svc.catalog }}/hc
|
||||||
internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc
|
internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc
|
||||||
internalurls__ordering__hc: http://{{ .Values.app.svc.ordering }}/hc
|
internalurls__ordering__hc: http://{{ .Values.app.svc.ordering }}/hc
|
||||||
|
internalurls__marketing__hc: http://{{ .Values.app.svc.marketing }}/hc
|
||||||
internalurls__payment__hc: http://{{ .Values.app.svc.payment }}/hc
|
internalurls__payment__hc: http://{{ .Values.app.svc.payment }}/hc
|
||||||
|
internalurls__location__hc: http://{{ .Values.app.svc.locations }}/hc
|
||||||
internalurls__grpcBasket: "http://{{ .Values.app.svc.basket }}:{{ .Values.service.grpcPort }}"
|
internalurls__grpcBasket: "http://{{ .Values.app.svc.basket }}:{{ .Values.service.grpcPort }}"
|
||||||
internalurls__grpcCatalog: "http://{{ .Values.app.svc.catalog }}:{{ .Values.service.grpcPort }}"
|
internalurls__grpcCatalog: "http://{{ .Values.app.svc.catalog }}:{{ .Values.service.grpcPort }}"
|
||||||
internalurls__grpcOrdering: "http://{{ .Values.app.svc.ordering }}:{{ .Values.service.grpcPort }}"
|
internalurls__grpcOrdering: "http://{{ .Values.app.svc.ordering }}:{{ .Values.service.grpcPort }}"
|
||||||
|
@ -49,8 +49,12 @@ env:
|
|||||||
key: internalurls__identity__hc
|
key: internalurls__identity__hc
|
||||||
- name: OrderingUrlHC
|
- name: OrderingUrlHC
|
||||||
key: internalurls__ordering__hc
|
key: internalurls__ordering__hc
|
||||||
|
- name: MarketingUrlHC
|
||||||
|
key: internalurls__marketing__hc
|
||||||
- name: PaymentUrlHC
|
- name: PaymentUrlHC
|
||||||
key: internalurls__payment__hc
|
key: internalurls__payment__hc
|
||||||
|
- name: LocationUrlHC
|
||||||
|
key: internalurls__location__hc
|
||||||
- name: urls__grpcBasket
|
- name: urls__grpcBasket
|
||||||
key: internalurls__grpcBasket
|
key: internalurls__grpcBasket
|
||||||
- name: urls__grpcCatalog
|
- name: urls__grpcCatalog
|
||||||
|
@ -12,6 +12,7 @@ metadata:
|
|||||||
heritage: {{ .Release.Service }}
|
heritage: {{ .Release.Service }}
|
||||||
data:
|
data:
|
||||||
ordering__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.ordering.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }};
|
ordering__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.ordering.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }};
|
||||||
|
ordering__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
|
||||||
urls__IdentityUrl: http://{{ .Values.app.svc.identity }}
|
urls__IdentityUrl: http://{{ .Values.app.svc.identity }}
|
||||||
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
|
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
|
||||||
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
|
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
|
||||||
|
@ -41,6 +41,8 @@ env:
|
|||||||
key: all__EventBusConnection
|
key: all__EventBusConnection
|
||||||
- name: AzureServiceBusEnabled
|
- name: AzureServiceBusEnabled
|
||||||
key: all__UseAzureServiceBus
|
key: all__UseAzureServiceBus
|
||||||
|
- name: UseLoadTest
|
||||||
|
key: ordering__EnableLoadTest
|
||||||
- name: IdentityUrl
|
- name: IdentityUrl
|
||||||
key: urls__IdentityUrl
|
key: urls__IdentityUrl
|
||||||
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
|
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
|
||||||
|
@ -13,6 +13,7 @@ metadata:
|
|||||||
heritage: {{ .Release.Service }}
|
heritage: {{ .Release.Service }}
|
||||||
data:
|
data:
|
||||||
ordering__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.ordering.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }};
|
ordering__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.ordering.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }};
|
||||||
|
ordering__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
|
||||||
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
|
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
|
||||||
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
|
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
|
||||||
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
|
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
|
||||||
|
@ -44,6 +44,8 @@ env:
|
|||||||
key: all__EventBusConnection
|
key: all__EventBusConnection
|
||||||
- name: AzureServiceBusEnabled
|
- name: AzureServiceBusEnabled
|
||||||
key: all__UseAzureServiceBus
|
key: all__UseAzureServiceBus
|
||||||
|
- name: UseLoadTest
|
||||||
|
key: ordering__EnableLoadTest
|
||||||
- name: CheckUpdateTime
|
- name: CheckUpdateTime
|
||||||
key: graceperiodmanager__CheckUpdateTime
|
key: graceperiodmanager__CheckUpdateTime
|
||||||
- name: GracePeriodTime
|
- name: GracePeriodTime
|
||||||
|
@ -16,8 +16,10 @@ metadata:
|
|||||||
data:
|
data:
|
||||||
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
|
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
|
||||||
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
|
all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
|
||||||
|
all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
|
||||||
webmvc__keystore: {{ .Values.inf.redis.keystore.constr }}
|
webmvc__keystore: {{ .Values.inf.redis.keystore.constr }}
|
||||||
internalurls__apigwws: http://{{ .Values.app.svc.webshoppingapigw }}
|
internalurls__apigwws: http://{{ .Values.app.svc.webshoppingapigw }}
|
||||||
|
internalurls__apigwwm: http://{{ .Values.app.svc.webmarketingapigw }}
|
||||||
internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc
|
internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc
|
||||||
urls__apigwws: {{ $protocol }}://{{ $webshoppingapigw }}
|
urls__apigwws: {{ $protocol }}://{{ $webshoppingapigw }}
|
||||||
urls__mvc: {{ $protocol }}://{{ $mvc }}
|
urls__mvc: {{ $protocol }}://{{ $mvc }}
|
||||||
|
@ -32,6 +32,8 @@ env:
|
|||||||
configmap:
|
configmap:
|
||||||
- name: ApplicationInsights__InstrumentationKey
|
- name: ApplicationInsights__InstrumentationKey
|
||||||
key: all__InstrumentationKey
|
key: all__InstrumentationKey
|
||||||
|
- name: UseLoadTest
|
||||||
|
key: all_EnableLoadTest
|
||||||
- name: DPConnectionString
|
- name: DPConnectionString
|
||||||
key: webmvc__keystore
|
key: webmvc__keystore
|
||||||
- name: PurchaseUrl
|
- name: PurchaseUrl
|
||||||
@ -42,6 +44,8 @@ env:
|
|||||||
key: urls__mvc
|
key: urls__mvc
|
||||||
- name: IdentityUrl
|
- name: IdentityUrl
|
||||||
key: urls__IdentityUrl
|
key: urls__IdentityUrl
|
||||||
|
- name: MarketingUrl
|
||||||
|
key: internalurls__apigwwm
|
||||||
- name: IdentityUrlHC
|
- name: IdentityUrlHC
|
||||||
key: internalurls__identity__hc
|
key: internalurls__identity__hc
|
||||||
- name: SignalrHubUrl
|
- name: SignalrHubUrl
|
||||||
|
@ -11,6 +11,7 @@ metadata:
|
|||||||
heritage: {{ .Release.Service }}
|
heritage: {{ .Release.Service }}
|
||||||
data:
|
data:
|
||||||
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
|
all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
|
||||||
|
all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
|
||||||
webshoppingagg__keystore: {{ .Values.inf.redis.keystore.constr }}
|
webshoppingagg__keystore: {{ .Values.inf.redis.keystore.constr }}
|
||||||
internalurls__basket: http://{{ .Values.app.svc.basket }}
|
internalurls__basket: http://{{ .Values.app.svc.basket }}
|
||||||
internalurls__catalog: http://{{ .Values.app.svc.catalog }}
|
internalurls__catalog: http://{{ .Values.app.svc.catalog }}
|
||||||
@ -20,7 +21,9 @@ data:
|
|||||||
internalurls__catalog__hc: http://{{ .Values.app.svc.catalog }}/hc
|
internalurls__catalog__hc: http://{{ .Values.app.svc.catalog }}/hc
|
||||||
internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc
|
internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc
|
||||||
internalurls__ordering__hc: http://{{ .Values.app.svc.ordering }}/hc
|
internalurls__ordering__hc: http://{{ .Values.app.svc.ordering }}/hc
|
||||||
|
internalurls__marketing__hc: http://{{ .Values.app.svc.marketing }}/hc
|
||||||
internalurls__payment__hc: http://{{ .Values.app.svc.payment }}/hc
|
internalurls__payment__hc: http://{{ .Values.app.svc.payment }}/hc
|
||||||
|
internalurls__location__hc: http://{{ .Values.app.svc.locations }}/hc
|
||||||
internalurls__grpcBasket: "http://{{ .Values.app.svc.basket }}:{{ .Values.service.grpcPort }}"
|
internalurls__grpcBasket: "http://{{ .Values.app.svc.basket }}:{{ .Values.service.grpcPort }}"
|
||||||
internalurls__grpcCatalog: "http://{{ .Values.app.svc.catalog }}:{{ .Values.service.grpcPort }}"
|
internalurls__grpcCatalog: "http://{{ .Values.app.svc.catalog }}:{{ .Values.service.grpcPort }}"
|
||||||
internalurls__grpcOrdering: "http://{{ .Values.app.svc.ordering }}:{{ .Values.service.grpcPort }}"
|
internalurls__grpcOrdering: "http://{{ .Values.app.svc.ordering }}:{{ .Values.service.grpcPort }}"
|
||||||
|
@ -49,8 +49,12 @@ env:
|
|||||||
key: internalurls__identity__hc
|
key: internalurls__identity__hc
|
||||||
- name: OrderingUrlHC
|
- name: OrderingUrlHC
|
||||||
key: internalurls__ordering__hc
|
key: internalurls__ordering__hc
|
||||||
|
- name: MarketingUrlHC
|
||||||
|
key: internalurls__marketing__hc
|
||||||
- name: PaymentUrlHC
|
- name: PaymentUrlHC
|
||||||
key: internalurls__payment__hc
|
key: internalurls__payment__hc
|
||||||
|
- name: LocationUrlHC
|
||||||
|
key: internalurls__location__hc
|
||||||
- name: urls__grpcBasket
|
- name: urls__grpcBasket
|
||||||
key: internalurls__grpcBasket
|
key: internalurls__grpcBasket
|
||||||
- name: urls__grpcCatalog
|
- name: urls__grpcCatalog
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{{- $name := include "webspa.fullname" . -}}
|
{{- $name := include "webspa.fullname" . -}}
|
||||||
{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}}
|
{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}}
|
||||||
{{- $webshoppingapigw := include "url-of" (list .Values.app.ingress.entries.webshoppingapigw .) -}}
|
{{- $webshoppingapigw := include "url-of" (list .Values.app.ingress.entries.webshoppingapigw .) -}}
|
||||||
|
{{- $webmarketingapigw := include "url-of" (list .Values.app.ingress.entries.webmarketingapigw .) -}}
|
||||||
{{- $spa := include "url-of" (list .Values.app.ingress.entries.spa .) -}}
|
{{- $spa := include "url-of" (list .Values.app.ingress.entries.spa .) -}}
|
||||||
{{- $mongo := include "mongo-name" . -}}
|
{{- $mongo := include "mongo-name" . -}}
|
||||||
{{- $protocol := include "protocol" . -}}
|
{{- $protocol := include "protocol" . -}}
|
||||||
@ -23,3 +24,4 @@ data:
|
|||||||
urls__apigwws: {{ $protocol }}://{{ $webshoppingapigw }}
|
urls__apigwws: {{ $protocol }}://{{ $webshoppingapigw }}
|
||||||
urls__spa: {{ $protocol }}://{{ $spa }}
|
urls__spa: {{ $protocol }}://{{ $spa }}
|
||||||
urls__IdentityUrl: {{ $protocol }}://{{ $identity }}
|
urls__IdentityUrl: {{ $protocol }}://{{ $identity }}
|
||||||
|
urls__apigwwm: {{ $protocol }}://{{ $webmarketingapigw }}
|
@ -32,6 +32,8 @@ env:
|
|||||||
configmap:
|
configmap:
|
||||||
- name: ApplicationInsights__InstrumentationKey
|
- name: ApplicationInsights__InstrumentationKey
|
||||||
key: all__InstrumentationKey
|
key: all__InstrumentationKey
|
||||||
|
- name: UseLoadTest
|
||||||
|
key: all_EnableLoadTest
|
||||||
- name: DPConnectionString
|
- name: DPConnectionString
|
||||||
key: webspa__keystore
|
key: webspa__keystore
|
||||||
- name: PurchaseUrl
|
- name: PurchaseUrl
|
||||||
@ -40,6 +42,8 @@ env:
|
|||||||
key: urls__spa
|
key: urls__spa
|
||||||
- name: IdentityUrl
|
- name: IdentityUrl
|
||||||
key: urls__IdentityUrl
|
key: urls__IdentityUrl
|
||||||
|
- name: MarketingUrl
|
||||||
|
key: urls__apigwwm
|
||||||
- name: IdentityUrlHC
|
- name: IdentityUrlHC
|
||||||
key: internalurls__identity__hc
|
key: internalurls__identity__hc
|
||||||
- name: SignalrHubUrl
|
- name: SignalrHubUrl
|
||||||
|
@ -24,8 +24,12 @@ data:
|
|||||||
internalurls__spa__hc: http://{{ .Values.app.svc.spa }}/hc
|
internalurls__spa__hc: http://{{ .Values.app.svc.spa }}/hc
|
||||||
name__apigwws__hc: Web Shopping API GW HTTP Check
|
name__apigwws__hc: Web Shopping API GW HTTP Check
|
||||||
internalurls__apigwws__hc: http://{{ .Values.app.svc.webshoppingapigw }}:8001/ready
|
internalurls__apigwws__hc: http://{{ .Values.app.svc.webshoppingapigw }}:8001/ready
|
||||||
|
name__apigwwm__hc: Web Marketing API GW HTTP Check
|
||||||
|
internalurls__apigwwm__hc: http://{{ .Values.app.svc.webmarketingapigw }}:8001/ready
|
||||||
name__apigwms__hc: Mobile Shopping API GW HTTP Check
|
name__apigwms__hc: Mobile Shopping API GW HTTP Check
|
||||||
internalurls__apigwms__hc: http://{{ .Values.app.svc.mobileshoppingapigw }}:8001/ready
|
internalurls__apigwms__hc: http://{{ .Values.app.svc.mobileshoppingapigw }}:8001/ready
|
||||||
|
name__apigwmm__hc: Mobile Marketing API GW HTTP Check
|
||||||
|
internalurls__apigwmm__hc: http://{{ .Values.app.svc.mobilemarketingapigw }}:8001/ready
|
||||||
name__apigwwsagg__hc: Web Shopping Aggregator GW HTTP Check
|
name__apigwwsagg__hc: Web Shopping Aggregator GW HTTP Check
|
||||||
internalurls__apigwwsagg__hc: http://{{ .Values.app.svc.webshoppingagg }}/hc
|
internalurls__apigwwsagg__hc: http://{{ .Values.app.svc.webshoppingagg }}/hc
|
||||||
name__apigwmsagg__hc: Mobile Shopping Aggregator HTTP Check
|
name__apigwmsagg__hc: Mobile Shopping Aggregator HTTP Check
|
||||||
@ -40,6 +44,10 @@ data:
|
|||||||
internalurls__catalog__hc: http://{{ .Values.app.svc.catalog }}/hc
|
internalurls__catalog__hc: http://{{ .Values.app.svc.catalog }}/hc
|
||||||
name__identity__hc: Identity HTTP Check
|
name__identity__hc: Identity HTTP Check
|
||||||
internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc
|
internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc
|
||||||
|
name__marketing__hc: Marketing HTTP Check
|
||||||
|
internalurls__marketing__hc: http://{{ .Values.app.svc.marketing }}/hc
|
||||||
|
name__locations__hc: Locations HTTP Check
|
||||||
|
internalurls__locations__hc: http://{{ .Values.app.svc.locations }}/hc
|
||||||
name__payment__hc: Payment HTTP Check
|
name__payment__hc: Payment HTTP Check
|
||||||
internalurls__payment__hc: http://{{ .Values.app.svc.payment }}/hc
|
internalurls__payment__hc: http://{{ .Values.app.svc.payment }}/hc
|
||||||
name__signalrhub__hc: Ordering SignalR Hub HTTP Check
|
name__signalrhub__hc: Ordering SignalR Hub HTTP Check
|
||||||
|
@ -67,16 +67,24 @@ env:
|
|||||||
- name: HealthChecks-UI__HealthChecks__7__Uri
|
- name: HealthChecks-UI__HealthChecks__7__Uri
|
||||||
key: internalurls__identity__hc
|
key: internalurls__identity__hc
|
||||||
- name: HealthChecks-UI__HealthChecks__8__Name
|
- name: HealthChecks-UI__HealthChecks__8__Name
|
||||||
key: name__payment__hc
|
key: name__marketing__hc
|
||||||
- name: HealthChecks-UI__HealthChecks__8__Uri
|
- name: HealthChecks-UI__HealthChecks__8__Uri
|
||||||
key: internalurls__payment__hc
|
key: internalurls__marketing__hc
|
||||||
- name: HealthChecks-UI__HealthChecks__9__Name
|
- name: HealthChecks-UI__HealthChecks__9__Name
|
||||||
key: name__signalrhub__hc
|
key: name__locations__hc
|
||||||
- name: HealthChecks-UI__HealthChecks__9__Uri
|
- name: HealthChecks-UI__HealthChecks__9__Uri
|
||||||
key: internalurls__signalrhub__hc
|
key: internalurls__locations__hc
|
||||||
- name: HealthChecks-UI__HealthChecks__10__Name
|
- name: HealthChecks-UI__HealthChecks__10__Name
|
||||||
key: name__orderingbackground__hc
|
key: name__payment__hc
|
||||||
- name: HealthChecks-UI__HealthChecks__10__Uri
|
- name: HealthChecks-UI__HealthChecks__10__Uri
|
||||||
|
key: internalurls__payment__hc
|
||||||
|
- name: HealthChecks-UI__HealthChecks__11__Name
|
||||||
|
key: name__signalrhub__hc
|
||||||
|
- name: HealthChecks-UI__HealthChecks__11__Uri
|
||||||
|
key: internalurls__signalrhub__hc
|
||||||
|
- name: HealthChecks-UI__HealthChecks__12__Name
|
||||||
|
key: name__orderingbackground__hc
|
||||||
|
- name: HealthChecks-UI__HealthChecks__12__Uri
|
||||||
key: internalurls__orderingbackground__hc
|
key: internalurls__orderingbackground__hc
|
||||||
|
|
||||||
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
|
# values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value)
|
||||||
|
21
deploy/k8s/helm/apigwmm/.helmignore
Normal file
21
deploy/k8s/helm/apigwmm/.helmignore
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Patterns to ignore when building packages.
|
||||||
|
# This supports shell glob matching, relative path matching, and
|
||||||
|
# negation (prefixed with !). Only one pattern per line.
|
||||||
|
.DS_Store
|
||||||
|
# Common VCS dirs
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.bzr/
|
||||||
|
.bzrignore
|
||||||
|
.hg/
|
||||||
|
.hgignore
|
||||||
|
.svn/
|
||||||
|
# Common backup files
|
||||||
|
*.swp
|
||||||
|
*.bak
|
||||||
|
*.tmp
|
||||||
|
*~
|
||||||
|
# Various IDEs
|
||||||
|
.project
|
||||||
|
.idea/
|
||||||
|
*.tmproj
|
5
deploy/k8s/helm/apigwmm/Chart.yaml
Normal file
5
deploy/k8s/helm/apigwmm/Chart.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
appVersion: "1.0"
|
||||||
|
description: A Helm chart for Kubernetes
|
||||||
|
name: apigwmm
|
||||||
|
version: 0.1.0
|
75
deploy/k8s/helm/apigwmm/envoy.yaml
Normal file
75
deploy/k8s/helm/apigwmm/envoy.yaml
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
admin:
|
||||||
|
access_log_path: "/dev/null"
|
||||||
|
address:
|
||||||
|
socket_address:
|
||||||
|
address: 0.0.0.0
|
||||||
|
port_value: 8001
|
||||||
|
static_resources:
|
||||||
|
listeners:
|
||||||
|
- address:
|
||||||
|
socket_address:
|
||||||
|
address: 0.0.0.0
|
||||||
|
port_value: 80
|
||||||
|
filter_chains:
|
||||||
|
- filters:
|
||||||
|
- name: envoy.http_connection_manager
|
||||||
|
config:
|
||||||
|
codec_type: auto
|
||||||
|
stat_prefix: ingress_http
|
||||||
|
route_config:
|
||||||
|
name: eshop_backend_route
|
||||||
|
virtual_hosts:
|
||||||
|
- name: eshop_backend
|
||||||
|
domains:
|
||||||
|
- "*"
|
||||||
|
routes:
|
||||||
|
- name: "m-short"
|
||||||
|
match:
|
||||||
|
prefix: "/m/"
|
||||||
|
route:
|
||||||
|
auto_host_rewrite: true
|
||||||
|
prefix_rewrite: "/marketing-api/"
|
||||||
|
cluster: marketing
|
||||||
|
- name: "m-long"
|
||||||
|
match:
|
||||||
|
prefix: "/marketing-api/"
|
||||||
|
route:
|
||||||
|
auto_host_rewrite: true
|
||||||
|
cluster: marketing
|
||||||
|
http_filters:
|
||||||
|
- name: envoy.router
|
||||||
|
access_log:
|
||||||
|
- name: envoy.file_access_log
|
||||||
|
filter:
|
||||||
|
not_health_check_filter: {}
|
||||||
|
config:
|
||||||
|
json_format:
|
||||||
|
time: "%START_TIME%"
|
||||||
|
protocol: "%PROTOCOL%"
|
||||||
|
duration: "%DURATION%"
|
||||||
|
request_method: "%REQ(:METHOD)%"
|
||||||
|
request_host: "%REQ(HOST)%"
|
||||||
|
path: "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%"
|
||||||
|
response_flags: "%RESPONSE_FLAGS%"
|
||||||
|
route_name: "%ROUTE_NAME%"
|
||||||
|
upstream_host: "%UPSTREAM_HOST%"
|
||||||
|
upstream_cluster: "%UPSTREAM_CLUSTER%"
|
||||||
|
upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%"
|
||||||
|
path: "/tmp/access.log"
|
||||||
|
clusters:
|
||||||
|
- name: marketing
|
||||||
|
connect_timeout: 0.25s
|
||||||
|
type: logical_dns
|
||||||
|
lb_policy: round_robin
|
||||||
|
hosts:
|
||||||
|
- socket_address:
|
||||||
|
address: marketing-api
|
||||||
|
port_value: 80
|
||||||
|
- name: locations
|
||||||
|
connect_timeout: 0.25s
|
||||||
|
type: logical_dns
|
||||||
|
lb_policy: round_robin
|
||||||
|
hosts:
|
||||||
|
- socket_address:
|
||||||
|
address: locations-api
|
||||||
|
port_value: 80
|
2
deploy/k8s/helm/apigwmm/templates/NOTES.txt
Normal file
2
deploy/k8s/helm/apigwmm/templates/NOTES.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
eShop API Gateway for Mobile Marketing services installed
|
||||||
|
----------------------------------------------------------
|
32
deploy/k8s/helm/apigwmm/templates/_helpers.tpl
Normal file
32
deploy/k8s/helm/apigwmm/templates/_helpers.tpl
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "apigwmm.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "apigwmm.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride -}}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- if contains $name .Release.Name -}}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "apigwmm.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
52
deploy/k8s/helm/apigwmm/templates/_names.tpl
Normal file
52
deploy/k8s/helm/apigwmm/templates/_names.tpl
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
{{- define "suffix-name" -}}
|
||||||
|
{{- if .Values.app.name -}}
|
||||||
|
{{- .Values.app.name -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Release.Name -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "sql-name" -}}
|
||||||
|
{{- if .Values.inf.sql.host -}}
|
||||||
|
{{- .Values.inf.sql.host -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s" "sql-data" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "mongo-name" -}}
|
||||||
|
{{- if .Values.inf.mongo.host -}}
|
||||||
|
{{- .Values.inf.mongo.host -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s" "nosql-data" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "url-of" -}}
|
||||||
|
{{- $name := first .}}
|
||||||
|
{{- $ctx := last .}}
|
||||||
|
{{- if eq $name "" -}}
|
||||||
|
{{- $ctx.Values.inf.k8s.dns -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just <dns>/<name> */}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{{- define "pathBase" -}}
|
||||||
|
{{- if .Values.inf.k8s.suffix -}}
|
||||||
|
{{- $suffix := include "suffix-name" . -}}
|
||||||
|
{{- printf "%s-%s" .Values.pathBase $suffix -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Values.pathBase -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- define "fqdn-image" -}}
|
||||||
|
{{- if .Values.inf.registry -}}
|
||||||
|
{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- .Values.image.repository -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
110
deploy/k8s/helm/apigwmm/templates/deployment.yaml
Normal file
110
deploy/k8s/helm/apigwmm/templates/deployment.yaml
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
{{- $name := include "apigwmm.fullname" . -}}
|
||||||
|
{{- $cfgname := printf "%s-%s" "cfg" $name -}}
|
||||||
|
{{- $envoycfgname := printf "%s-%s" "envoy" $name -}}
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ template "apigwmm.fullname" . }}
|
||||||
|
labels:
|
||||||
|
ufo: {{ $cfgname}}
|
||||||
|
app: {{ template "apigwmm.name" . }}
|
||||||
|
chart: {{ template "apigwmm.chart" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
heritage: {{ .Release.Service }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: {{ template "apigwmm.name" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: {{ template "apigwmm.name" . }}
|
||||||
|
release: {{ .Release.Name }}
|
||||||
|
{{ if .Values.inf.mesh.enabled -}}
|
||||||
|
annotations:
|
||||||
|
linkerd.io/inject: enabled
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{ if .Values.inf.registry -}}
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: {{ .Values.inf.registry.secretName }}
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: {{ $envoycfgname }}
|
||||||
|
items:
|
||||||
|
- key: envoy.yaml
|
||||||
|
path: envoy.yaml
|
||||||
|
containers:
|
||||||
|
- name: {{ .Chart.Name }}
|
||||||
|
{{ if .Values.probes -}}
|
||||||
|
{{- if .Values.probes.liveness -}}
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
port: {{ .Values.probes.liveness.port }}
|
||||||
|
path: {{ .Values.probes.liveness.path }}
|
||||||
|
initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.probes.liveness.periodSeconds }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if .Values.probes -}}
|
||||||
|
{{- if .Values.probes.readiness }}
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
port: {{ .Values.probes.readiness.port }}
|
||||||
|
path: {{ .Values.probes.readiness.path }}
|
||||||
|
initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }}
|
||||||
|
periodSeconds: {{ .Values.probes.readiness.periodSeconds }}
|
||||||
|
timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}"
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
volumeMounts:
|
||||||
|
- name: config
|
||||||
|
mountPath: {{ .Values.envoy.configPath }}
|
||||||
|
env:
|
||||||
|
- name: PATH_BASE
|
||||||
|
value: {{ include "pathBase" . }}
|
||||||
|
- name: k8sname
|
||||||
|
value: {{ .Values.clusterName }}
|
||||||
|
{{- if .Values.env.values -}}
|
||||||
|
{{- range .Values.env.values }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
value: {{ .value | quote }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if .Values.env.configmap -}}
|
||||||
|
{{- range .Values.env.configmap }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: {{ $cfgname }}
|
||||||
|
key: {{ .key }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
- name: admin
|
||||||
|
containerPort: 8001
|
||||||
|
protocol: TCP
|
||||||
|
resources:
|
||||||
|
{{ toYaml .Values.resources | indent 12 }}
|
||||||
|
{{- with .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{ toYaml . | indent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user