diff --git a/.env b/.env index f77f64682..c8fcdfcf2 100644 --- a/.env +++ b/.env @@ -21,3 +21,7 @@ ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=10.121.122.92 #ESHOP_AZURE_STORAGE_CATALOG_KEY= #ESHOP_AZURE_STORAGE_MARKETING_NAME= #ESHOP_AZURE_STORAGE_MARKETING_KEY= +#ESHOP_SERVICE_BUS_USERNAME= +#ESHOP_SERVICE_BUS_PASSWORD= +#INSTRUMENTATION_KEY= +#USE_LOADTEST= \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index ef8281262..f2943e52e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -62,3 +62,10 @@ #*.PDF diff=astextplain #*.rtf diff=astextplain #*.RTF diff=astextplain + + +############################################################################### +# Certificates are binary +############################################################################### +*.pfx binary + diff --git a/.gitignore b/.gitignore index 548ad2340..a8d5986bc 100644 --- a/.gitignore +++ b/.gitignore @@ -259,3 +259,4 @@ pub/ .eshopdocker_* /src/Web/WebMVC/wwwroot/lib /src/Web/WebMVC/wwwroot/css/site.min.css +**/.kube/** diff --git a/README.md b/README.md index b3b9db873..fce0146db 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # eShopOnContainers - Microservices Architecture and Containers based Reference Application (**BETA state** - Visual Studio 2017 and CLI environments compatible) Sample .NET Core reference application, powered by Microsoft, based on a simplified microservices architecture and Docker containers.

+**Note Visual Studio 2017 version required**: This is important as of Oct. 11th 2017. For working with Docker and docker-compose files (needed with eShopOnContainers), do not migrate to VS 2017 15.4 as it has a bug when using TAGs in the docker-compose files. +Please, either use VS 2017 15.35 or VS 2017 15.5 Preview 1 (bug is fixed here) or later. +VS Preview installs next to your stable Visual Studio IDE, allowing you to use either independently. +Download of Preview here: https://www.visualstudio.com/vs/preview/ + **Note for Pull Requests**: We accept pull request from the community. When doing it, please do it onto the DEV branch which is the consolidated work-in-progress branch. Do not request it onto Master, if possible. ## Moving to .NET Core 2.0 "wave" @@ -8,7 +13,7 @@ NOTE: During August/September 2017 we'll be moving the solution to .NET Core "wa >**PLEASE** Read our [branch guide](./branch-guide.md) to know about our branching policy > ### DISCLAIMER -> **IMPORTANT:** The current state of this sample application is **BETA**, consider it version a 0.1 foundational version, therefore, many areas could be improved and change significantly while refactoring current code and implementing new features. Feedback with improvements and pull requests from the community will be highly appreciated and accepted. +> **IMPORTANT:** The current state of this sample application is **BETA**, consider it version 0.1, a foundational version. Therefore, many areas could be improved and change significantly while refactoring current code and implementing new features. Feedback with improvements and pull requests from the community will be highly appreciated and accepted. > > This reference application proposes a simplified microservice oriented architecture implementation to introduce technologies like .NET Core with Docker containers through a comprehensive application. The chosen domain is an eShop/eCommerce but simply because it is a well-know domain by most people/developers. However, this sample application should not be considered as an "eCommerce reference model", at all. The implemented business domain might not be ideal from an eCommerce business point of view. It is neither trying to solve all the problems in a large, scalable and mission-critical distributed system. It is just a bootstrap for developers to easily get started in the world of Docker containers and microservices with .NET Core. @@ -18,7 +23,7 @@ However, this sample application should not be considered as an "eCommerce refer > > Read the planned Roadmap and Milestones for future releases of eShopOnContainers within the Wiki for further info about possible new implementations and provide feedback at the ISSUES section if you'd like to see any specific scenario implemented or improved. Also, feel free to discuss on any current issue. -**Architecture overview**: This reference application is cross-platform either at the server and client side, thanks to .NET Core services capable of running on Linux or Windows containers depending on your Docker host, and to Xamarin for mobile apps running on Android, iOS or Windows/UWP plus any browser for the client web apps. +**Architecture overview**: This reference application is cross-platform at the server and client side, thanks to .NET Core services capable of running on Linux or Windows containers depending on your Docker host, and to Xamarin for mobile apps running on Android, iOS or Windows/UWP plus any browser for the client web apps. The architecture proposes a simplified microservice oriented architecture implementation with multiple autonomous microservices (each one owning its own data/db) and implementing different approaches within each microservice (simple CRUD vs. DDD/CQRS patterns) using Http as the communication protocol between the client apps and the microservices and supports asynchronous communication for data updates propagation across multiple services based on Integration Events and an Event Bus (a light message broker, to choose between RabbitMQ or Azure Service Bus, underneath) plus other features defined at the roadmap.

@@ -35,15 +40,21 @@ The architecture proposes a simplified microservice oriented architecture implem The microservices are different in type, meaning different internal architecture patterns approaches depending on it purpose, as shown in the image below.

+ +

+ +> The sample code in this repo is NOT making use of Azure API Management in order to be able to provide an "F5 experience" in Visual Studio (or CLI) of the sample with no up-front dependencies in Azure. But you should evaluate API Gateways alternatives when building for production. + +The microservices are different in type, meaning different internal architecture pattern approaches depending on its purpose, as shown in the image below. +

-Additional miroservice styles with other frameworks and No-SQL databases will be added, eventually. This is a great opportunity for pull requests from the community, like a new microservice using Nancy, or even other languages like Node, Go, Python or data containers with MongoDB with Azure DocDB compatibility, PostgreSQL, RavenDB, Event Store, MySql, etc. You name it! :) > ### Important Note on Database Servers/Containers -> In this solution's current configuration for a development environment, the SQL databases are automatically deployed with sample data into a single SQL Server for Linux container (a single shared Docker container for SQL databases) so the whole solution can be up and running without any dependency to any cloud or specific server. Each database could also be deployed as a single Docker container, but then you'd need more then 8GB or memory RAM assigned to Docker in your development machine in order to be able to run 3 SQL Server Docker containers in your Docker Linux host in "Docker for Windows" or "Docker for Mac" development environments. ->

A similar case is defined in regards Redis cache running as a container for the development environment. ->

However, in a real production environment it is recommended to have your databases (SQL Server and Redis, in this case) in HA (High Available) services like Azure SQL Database, Redis as a service or any other clustering system. If you want to change to a production configuration, you'll just need to change the connection strings once you have set up the servers in a HA cloud or on-premises. +> In this solution's current configuration for a development environment, the SQL databases are automatically deployed with sample data into a single SQL Server for Linux container (a single shared Docker container for SQL databases) so the whole solution can be up and running without any dependency to any cloud or specific server. Each database could also be deployed as a single Docker container, but then you'd need more than 8GB of RAM assigned to Docker in your development machine in order to be able to run 3 SQL Server Docker containers in your Docker Linux host in "Docker for Windows" or "Docker for Mac" development environments. +>

A similar case is defined in regard to Redis cache running as a container for the development environment. Or a No-SQL database (MongoDB) running as a container. +>

However, in a real production environment it is recommended to have your databases (SQL Server, Redis, and the NO-SQL database, in this case) in HA (High Available) services like Azure SQL Database, Redis as a service and Azure CosmosDB instead the MongoDB container (as both systems share the same access protocol). If you want to change to a production configuration, you'll just need to change the connection strings once you have set up the servers in a HA cloud or on-premises. ## Related documentation and guidance While developing this reference application, we've been creating a reference Guide/eBook focusing on architecting and developing containerized and microservice based .NET Applications (download link available below) which explains in detail how to develop this kind of architectural style (microservices, Docker containers, Domain-Driven Design for certain microservices) plus other simpler architectural styles, like monolithic apps that can also live as Docker containers. @@ -75,7 +86,7 @@ The screenshot below shows the VS Solution structure for those microservices/con Finally, those microservices are consumed by multiple client web and mobile apps, as described below.
-*MVC Application (ASP.NET Core)*: Its an MVC application where you can find interesting scenarios on how to consume HTTP-based microservices from C# running in the server side, as it is a typical ASP.NET Core MVC application. Since it is a server-side application, access to other containers/microservices is done within the internal Docker Host network with its internal name resolution. +*MVC Application (ASP.NET Core)*: It's an MVC application where you can find interesting scenarios on how to consume HTTP-based microservices from C# running in the server side, as it is a typical ASP.NET Core MVC application. Since it is a server-side application, access to other containers/microservices is done within the internal Docker Host network with its internal name resolution.
*SPA (Single Page Application)*: Providing similar "eShop business functionality" but developed with Angular 2, Typescript and slightly using ASP.NET Core MVC. This is another approach for client web applications to be used when you want to have a more modern client behavior which is not behaving with the typical browser round-trip on every action but behaving like a Single-Page-Application which is more similar to a desktop app usage experience. The consumption of the HTTP-based microservices is done from TypeScript/JavaScript in the client browser, so the client calls to the microservices come from out of the Docker Host internal network (Like from your network or even from the Internet). @@ -103,7 +114,7 @@ https://github.com/dotnet/eShopOnContainers/wiki/04.-Setting-eShopOnContainer-so See at the Wiki the posts on setup/instructions about how to deploy to Kubernetes or Service Fabric in Azure (although you could also deploy to any other cloud or on-premises). ## Sending feedback and pull requests -As mentioned, we'd appreciate to your feedback, improvements and ideas. +As mentioned, we'd appreciate your feedback, improvements and ideas. You can create new issues at the issues section, do pull requests and/or send emails to **eshop_feedback@service.microsoft.com** ## Questions diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..bb1cf2743 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/Config/Settings.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/ServiceManifest.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/ServiceManifest.xml new file mode 100644 index 000000000..8c2f16691 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/ServiceManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + rabbitmq:3-management + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..5a4c2828d --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Cloud.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..1699b8eaa --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..1699b8eaa --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/Bus.sfproj b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/Bus.sfproj new file mode 100644 index 000000000..0a56c800e --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/Bus.sfproj @@ -0,0 +1,46 @@ + + + + + f29e27c9-0d5e-4a57-adbf-dd651649d2a1 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Cloud.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.1Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.5Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/packages.config b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricBus/Bus/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..fe031fe95 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/Config/Settings.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/ServiceManifest.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/ServiceManifest.xml new file mode 100644 index 000000000..e7ecf592f --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/ServiceManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + mongo:latest + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..8b48c39d1 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Cloud.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..22363f273 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..22363f273 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/NoSQL.sfproj b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/NoSQL.sfproj new file mode 100644 index 000000000..f07ff03a9 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/NoSQL.sfproj @@ -0,0 +1,46 @@ + + + + + eb070036-ec60-49a6-88e1-562a2043c3d7 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Cloud.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.1Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.5Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/packages.config b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..11bf47a6a --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/Config/Settings.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/ServiceManifest.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/ServiceManifest.xml new file mode 100644 index 000000000..cfcc10eca --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/ServiceManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + redis:latest + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..951ce24db --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Cloud.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..e2f3876c7 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..e2f3876c7 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Cloud.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.1Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.5Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/Redis.sfproj b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/Redis.sfproj new file mode 100644 index 000000000..5b28bfdba --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/Redis.sfproj @@ -0,0 +1,46 @@ + + + + + 17acd9ea-8f16-4091-aa29-c67002971eee + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/packages.config b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricRedis/Redis/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..27fa4bfe2 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/Config/Settings.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/ServiceManifest.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/ServiceManifest.xml new file mode 100644 index 000000000..97ff3ded2 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/ServiceManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + microsoft/mssql-server-linux:2017-latest + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..3ad12232a --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Cloud.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..9fc10b0bc --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..9fc10b0bc --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Cloud.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.1Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.5Node.xml b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/Sql.sfproj b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/Sql.sfproj new file mode 100644 index 000000000..48447811e --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/Sql.sfproj @@ -0,0 +1,46 @@ + + + + + 65a83188-79c1-47ad-931d-8e8a87247408 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/packages.config b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Linux/Infrastructure/eShopOnServiceFabricSql/Sql/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..6cffab120 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/Config/Settings.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..75aecd407 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + eshop/basket.api:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/Config/Settings.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..bd30b4494 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + eshop/catalog.api:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/Config/Settings.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..5c19939a4 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + eshop/locations.api:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/Config/Settings.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..defca436c --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + eshop/marketing.api:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/Config/Settings.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..035005544 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + eshop/ordering.api:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/Config/Settings.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..88deeeade --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + eshop/payment.api:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..bf87a8296 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationParameters/Cloud.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..e579cbf89 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..e579cbf89 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/PublishProfiles/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabric/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/PublishProfiles/Local.1Node.xml b/ServiceFabric/Linux/eShopOnServiceFabric/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/PublishProfiles/Local.5Node.xml b/ServiceFabric/Linux/eShopOnServiceFabric/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Linux/eShopOnServiceFabric/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/eShopOnServiceFabric.sfproj b/ServiceFabric/Linux/eShopOnServiceFabric/eShopOnServiceFabric.sfproj new file mode 100644 index 000000000..405e7bb4c --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/eShopOnServiceFabric.sfproj @@ -0,0 +1,55 @@ + + + + + 983eab84-65c5-4793-a300-08f97c791a15 + 1.6 + 1.5 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabric/packages.config b/ServiceFabric/Linux/eShopOnServiceFabric/packages.config new file mode 100644 index 000000000..c5f59e48e --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabric/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..638b70194 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/Config/Settings.xml b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..35bc15b68 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + eshop/identity.api:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..a1255b6c0 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Cloud.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..e8623180a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..e8623180a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.1Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.5Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv.sfproj b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv.sfproj new file mode 100644 index 000000000..1d0d025a9 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv.sfproj @@ -0,0 +1,46 @@ + + + + + 39b54901-d57d-416e-b51e-33c4017ca464 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/packages.config b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..158c03905 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/Config/Settings.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml new file mode 100644 index 000000000..7b6aa5565 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + eshop/webmvc:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..d99e1573a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Cloud.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..1d59af5a6 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..1d59af5a6 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.1Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.5Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC.sfproj b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC.sfproj new file mode 100644 index 000000000..ff4ce2247 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC.sfproj @@ -0,0 +1,46 @@ + + + + + 0cf895ff-3616-4d1f-8d2e-5d856cdf3612 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/packages.config b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..7fca0294e --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/Config/Settings.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml new file mode 100644 index 000000000..64d719c59 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + eshop/webspa:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..fdeb6fd88 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Cloud.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..92fe692c3 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..92fe692c3 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.1Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.5Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA.sfproj b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA.sfproj new file mode 100644 index 000000000..05ed606be --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA.sfproj @@ -0,0 +1,46 @@ + + + + + 1670de10-5626-429d-a74a-2dd8281cc0c9 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/packages.config b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..da2d7de0b --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/Config/Settings.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml new file mode 100644 index 000000000..456c92ea1 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + eshop/webstatus:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..f49e04e6b --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Cloud.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..9864bd050 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..9864bd050 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Cloud.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.1Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.5Node.xml b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus.sfproj b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus.sfproj new file mode 100644 index 000000000..1d4def7f2 --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus.sfproj @@ -0,0 +1,46 @@ + + + + + 25f73fd9-b32f-401a-80e8-17c72606a7e1 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/packages.config b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Linux/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..bb1cf2743 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/Config/Settings.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/ServiceManifest.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/ServiceManifest.xml new file mode 100644 index 000000000..9415f54f2 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationPackageRoot/RabbitMQPkg/ServiceManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + spring2/rabbitmq:3.6.10 + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Cloud.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..5a4c2828d --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Cloud.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..1699b8eaa --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..1699b8eaa --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/Bus.sfproj b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/Bus.sfproj new file mode 100644 index 000000000..0a56c800e --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/Bus.sfproj @@ -0,0 +1,46 @@ + + + + + f29e27c9-0d5e-4a57-adbf-dd651649d2a1 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Cloud.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.1Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.5Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/packages.config b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricBus/Bus/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..fe031fe95 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/Config/Settings.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/ServiceManifest.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/ServiceManifest.xml new file mode 100644 index 000000000..be47332ca --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationPackageRoot/MongoDBPkg/ServiceManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + mongo:windowsservercore + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Cloud.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..8b48c39d1 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Cloud.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..22363f273 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..22363f273 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/NoSQL.sfproj b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/NoSQL.sfproj new file mode 100644 index 000000000..f07ff03a9 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/NoSQL.sfproj @@ -0,0 +1,46 @@ + + + + + eb070036-ec60-49a6-88e1-562a2043c3d7 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Cloud.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.1Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.5Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/packages.config b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricNoSql/NoSQL/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..11bf47a6a --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/Config/Settings.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/ServiceManifest.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/ServiceManifest.xml new file mode 100644 index 000000000..ea9deb355 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationPackageRoot/BasketDataPkg/ServiceManifest.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + redis:nanoserver + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Cloud.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..951ce24db --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Cloud.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..e2f3876c7 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..e2f3876c7 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Cloud.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.1Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.5Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/Redis.sfproj b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/Redis.sfproj new file mode 100644 index 000000000..5b28bfdba --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/Redis.sfproj @@ -0,0 +1,46 @@ + + + + + 17acd9ea-8f16-4091-aa29-c67002971eee + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/packages.config b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricRedis/Redis/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..27fa4bfe2 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/Config/Settings.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/ServiceManifest.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/ServiceManifest.xml new file mode 100644 index 000000000..252c74f21 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationPackageRoot/SqlServerPkg/ServiceManifest.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + microsoft/mssql-server-windows-developer:2017 + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Cloud.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..3ad12232a --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Cloud.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..9fc10b0bc --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..9fc10b0bc --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Cloud.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.1Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.5Node.xml b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/Sql.sfproj b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/Sql.sfproj new file mode 100644 index 000000000..48447811e --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/Sql.sfproj @@ -0,0 +1,46 @@ + + + + + 65a83188-79c1-47ad-931d-8e8a87247408 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/packages.config b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Windows/Infrastructure/eShopOnServiceFabricSql/Sql/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..29679fbaa --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..d45768eba --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/BasketApiPkg/ServiceManifest.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + eshop/basket.api-win:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..5c14568eb --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/CatalogApiPkg/ServiceManifest.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + eshop/catalog.api-win:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..36a817d36 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/LocationsApiPkg/ServiceManifest.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + eshop/locations.api-win:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..2fa855974 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/MarketingApiPkg/ServiceManifest.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + eshop/marketing.api-win:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..3ef5408a5 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/OrderingApiPkg/ServiceManifest.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + eshop/ordering.api-win:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..5d46ef47c --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationPackageRoot/PaymentApiPkg/ServiceManifest.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + eshop/payment.api-win:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..bf87a8296 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Cloud.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..e579cbf89 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..e579cbf89 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/PublishProfiles/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabric/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/PublishProfiles/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabric/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/PublishProfiles/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabric/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Windows/eShopOnServiceFabric/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/eShopOnServiceFabric.sfproj b/ServiceFabric/Windows/eShopOnServiceFabric/eShopOnServiceFabric.sfproj new file mode 100644 index 000000000..405e7bb4c --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/eShopOnServiceFabric.sfproj @@ -0,0 +1,55 @@ + + + + + 983eab84-65c5-4793-a300-08f97c791a15 + 1.6 + 1.5 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabric/packages.config b/ServiceFabric/Windows/eShopOnServiceFabric/packages.config new file mode 100644 index 000000000..c5f59e48e --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabric/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..b39aef66a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml new file mode 100644 index 000000000..9650b783e --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationPackageRoot/IdentityApiPkg/ServiceManifest.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + eshop/identity.api-win:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..207735106 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Cloud.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..e8623180a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..e8623180a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv.sfproj b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv.sfproj new file mode 100644 index 000000000..1d0d025a9 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv.sfproj @@ -0,0 +1,46 @@ + + + + + 39b54901-d57d-416e-b51e-33c4017ca464 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/packages.config b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricIdSrv/eShopOnServiceFabricIdSrv/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..8282adb11 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml new file mode 100644 index 000000000..55828da3e --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationPackageRoot/WebMVCPkg/ServiceManifest.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + eshop/webmvc-win:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..d99e1573a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Cloud.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..1d59af5a6 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..1d59af5a6 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC.sfproj b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC.sfproj new file mode 100644 index 000000000..ff4ce2247 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC.sfproj @@ -0,0 +1,46 @@ + + + + + 0cf895ff-3616-4d1f-8d2e-5d856cdf3612 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/packages.config b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebMVC/eShopOnServiceFabricWebMVC/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..e7479f239 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml new file mode 100644 index 000000000..a0bd28a94 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationPackageRoot/WebSPAPkg/ServiceManifest.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + eshop/webspa-win:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..fdeb6fd88 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Cloud.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..92fe692c3 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..92fe692c3 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA.sfproj b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA.sfproj new file mode 100644 index 000000000..05ed606be --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA.sfproj @@ -0,0 +1,46 @@ + + + + + 1670de10-5626-429d-a74a-2dd8281cc0c9 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/packages.config b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebSPA/eShopOnServiceFabricWebSPA/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/ApplicationManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/ApplicationManifest.xml new file mode 100644 index 000000000..20fb0c3a9 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/ApplicationManifest.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/Config/Settings.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/Config/Settings.xml new file mode 100644 index 000000000..ad84ffd8a --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/Config/Settings.xml @@ -0,0 +1,9 @@ + + + + + diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml new file mode 100644 index 000000000..58968f0e5 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationPackageRoot/WebStatusPkg/ServiceManifest.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + eshop/webstatus-win:#{tag}# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Cloud.xml new file mode 100644 index 000000000..f49e04e6b --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Cloud.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.1Node.xml new file mode 100644 index 000000000..9864bd050 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.1Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.5Node.xml new file mode 100644 index 000000000..9864bd050 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/ApplicationParameters/Local.5Node.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Cloud.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Cloud.xml new file mode 100644 index 000000000..2ab9df11c --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Cloud.xml @@ -0,0 +1,25 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.1Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.1Node.xml new file mode 100644 index 000000000..6e1403e96 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.1Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.5Node.xml b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.5Node.xml new file mode 100644 index 000000000..f42d759c3 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/PublishProfiles/Local.5Node.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/Scripts/Deploy-FabricApplication.ps1 b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/Scripts/Deploy-FabricApplication.ps1 new file mode 100644 index 000000000..2897b10e8 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/Scripts/Deploy-FabricApplication.ps1 @@ -0,0 +1,258 @@ +<# +.SYNOPSIS +Deploys a Service Fabric application type to a cluster. + +.DESCRIPTION +This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project. + +.NOTES +WARNING: This script file is invoked by Visual Studio. Its parameters must not be altered but its logic can be customized as necessary. + +.PARAMETER PublishProfileFile +Path to the file containing the publish profile. + +.PARAMETER ApplicationPackagePath +Path to the folder of the packaged Service Fabric application. + +.PARAMETER DeployOnly +Indicates that the Service Fabric application should not be created or upgraded after registering the application type. + +.PARAMETER ApplicationParameter +Hashtable of the Service Fabric application parameters to be used for the application. + +.PARAMETER UnregisterUnusedApplicationVersionsAfterUpgrade +Indicates whether to unregister any unused application versions that exist after an upgrade is finished. + +.PARAMETER OverrideUpgradeBehavior +Indicates the behavior used to override the upgrade settings specified by the publish profile. +'None' indicates that the upgrade settings will not be overridden. +'ForceUpgrade' indicates that an upgrade will occur with default settings, regardless of what is specified in the publish profile. +'VetoUpgrade' indicates that an upgrade will not occur, regardless of what is specified in the publish profile. + +.PARAMETER UseExistingClusterConnection +Indicates that the script should make use of an existing cluster connection that has already been established in the PowerShell session. The cluster connection parameters configured in the publish profile are ignored. + +.PARAMETER OverwriteBehavior +Overwrite Behavior if an application exists in the cluster with the same name. Available Options are Never, Always, SameAppTypeAndVersion. This setting is not applicable when upgrading an application. +'Never' will not remove the existing application. This is the default behavior. +'Always' will remove the existing application even if its Application type and Version is different from the application being created. +'SameAppTypeAndVersion' will remove the existing application only if its Application type and Version is same as the application being created. + +.PARAMETER SkipPackageValidation +Switch signaling whether the package should be validated or not before deployment. + +.PARAMETER SecurityToken +A security token for authentication to cluster management endpoints. Used for silent authentication to clusters that are protected by Azure Active Directory. + +.PARAMETER CopyPackageTimeoutSec +Timeout in seconds for copying application package to image store. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' + +Deploy the application using the default package location for a Debug build. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -DoNotCreateApplication + +Deploy the application but do not create the application instance. + +.EXAMPLE +. Scripts\Deploy-FabricApplication.ps1 -ApplicationPackagePath 'pkg\Debug' -ApplicationParameter @{CustomParameter1='MyValue'; CustomParameter2='MyValue'} + +Deploy the application by providing values for parameters that are defined in the application manifest. +#> + +Param +( + [String] + $PublishProfileFile, + + [String] + $ApplicationPackagePath, + + [Switch] + $DeployOnly, + + [Hashtable] + $ApplicationParameter, + + [Boolean] + $UnregisterUnusedApplicationVersionsAfterUpgrade, + + [String] + [ValidateSet('None', 'ForceUpgrade', 'VetoUpgrade')] + $OverrideUpgradeBehavior = 'None', + + [Switch] + $UseExistingClusterConnection, + + [String] + [ValidateSet('Never','Always','SameAppTypeAndVersion')] + $OverwriteBehavior = 'Never', + + [Switch] + $SkipPackageValidation, + + [String] + $SecurityToken, + + [int] + $CopyPackageTimeoutSec +) + +function Read-XmlElementAsHashtable +{ + Param ( + [System.Xml.XmlElement] + $Element + ) + + $hashtable = @{} + if ($Element.Attributes) + { + $Element.Attributes | + ForEach-Object { + $boolVal = $null + if ([bool]::TryParse($_.Value, [ref]$boolVal)) { + $hashtable[$_.Name] = $boolVal + } + else { + $hashtable[$_.Name] = $_.Value + } + } + } + + return $hashtable +} + +function Read-PublishProfile +{ + Param ( + [ValidateScript({Test-Path $_ -PathType Leaf})] + [String] + $PublishProfileFile + ) + + $publishProfileXml = [Xml] (Get-Content $PublishProfileFile) + $publishProfile = @{} + + $publishProfile.ClusterConnectionParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("ClusterConnectionParameters") + $publishProfile.UpgradeDeployment = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment") + $publishProfile.CopyPackageParameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("CopyPackageParameters") + + if ($publishProfileXml.PublishProfile.Item("UpgradeDeployment")) + { + $publishProfile.UpgradeDeployment.Parameters = Read-XmlElementAsHashtable $publishProfileXml.PublishProfile.Item("UpgradeDeployment").Item("Parameters") + if ($publishProfile.UpgradeDeployment["Mode"]) + { + $publishProfile.UpgradeDeployment.Parameters[$publishProfile.UpgradeDeployment["Mode"]] = $true + } + } + + $publishProfileFolder = (Split-Path $PublishProfileFile) + $publishProfile.ApplicationParameterFile = [System.IO.Path]::Combine($PublishProfileFolder, $publishProfileXml.PublishProfile.ApplicationParameterFile.Path) + + return $publishProfile +} + +$LocalFolder = (Split-Path $MyInvocation.MyCommand.Path) + +if (!$PublishProfileFile) +{ + $PublishProfileFile = "$LocalFolder\..\PublishProfiles\Local.xml" +} + +if (!$ApplicationPackagePath) +{ + $ApplicationPackagePath = "$LocalFolder\..\pkg\Release" +} + +$ApplicationPackagePath = Resolve-Path $ApplicationPackagePath + +$publishProfile = Read-PublishProfile $PublishProfileFile + +if (-not $UseExistingClusterConnection) +{ + $ClusterConnectionParameters = $publishProfile.ClusterConnectionParameters + if ($SecurityToken) + { + $ClusterConnectionParameters["SecurityToken"] = $SecurityToken + } + + try + { + [void](Connect-ServiceFabricCluster @ClusterConnectionParameters) + } + catch [System.Fabric.FabricObjectClosedException] + { + Write-Warning "Service Fabric cluster may not be connected." + throw + } +} + +$RegKey = "HKLM:\SOFTWARE\Microsoft\Service Fabric SDK" +$ModuleFolderPath = (Get-ItemProperty -Path $RegKey -Name FabricSDKPSModulePath).FabricSDKPSModulePath +Import-Module "$ModuleFolderPath\ServiceFabricSDK.psm1" + +$IsUpgrade = ($publishProfile.UpgradeDeployment -and $publishProfile.UpgradeDeployment.Enabled -and $OverrideUpgradeBehavior -ne 'VetoUpgrade') -or $OverrideUpgradeBehavior -eq 'ForceUpgrade' + +$PublishParameters = @{ + 'ApplicationPackagePath' = $ApplicationPackagePath + 'ApplicationParameterFilePath' = $publishProfile.ApplicationParameterFile + 'ApplicationParameter' = $ApplicationParameter + 'ErrorAction' = 'Stop' +} + +if ($publishProfile.CopyPackageParameters.CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $publishProfile.CopyPackageParameters.CopyPackageTimeoutSec +} + +if ($publishProfile.CopyPackageParameters.CompressPackage) +{ + $PublishParameters['CompressPackage'] = $publishProfile.CopyPackageParameters.CompressPackage +} + +# CopyPackageTimeoutSec parameter overrides the value from the publish profile +if ($CopyPackageTimeoutSec) +{ + $PublishParameters['CopyPackageTimeoutSec'] = $CopyPackageTimeoutSec +} + +if ($IsUpgrade) +{ + $Action = "RegisterAndUpgrade" + if ($DeployOnly) + { + $Action = "Register" + } + + $UpgradeParameters = $publishProfile.UpgradeDeployment.Parameters + + if ($OverrideUpgradeBehavior -eq 'ForceUpgrade') + { + # Warning: Do not alter these upgrade parameters. It will create an inconsistency with Visual Studio's behavior. + $UpgradeParameters = @{ UnmonitoredAuto = $true; Force = $true } + } + + $PublishParameters['Action'] = $Action + $PublishParameters['UpgradeParameters'] = $UpgradeParameters + $PublishParameters['UnregisterUnusedVersions'] = $UnregisterUnusedApplicationVersionsAfterUpgrade + + Publish-UpgradedServiceFabricApplication @PublishParameters +} +else +{ + $Action = "RegisterAndCreate" + if ($DeployOnly) + { + $Action = "Register" + } + + $PublishParameters['Action'] = $Action + $PublishParameters['OverwriteBehavior'] = $OverwriteBehavior + $PublishParameters['SkipPackageValidation'] = $SkipPackageValidation + + Publish-NewServiceFabricApplication @PublishParameters +} \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus.sfproj b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus.sfproj new file mode 100644 index 000000000..1d4def7f2 --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus.sfproj @@ -0,0 +1,46 @@ + + + + + 25f73fd9-b32f-401a-80e8-17c72606a7e1 + 1.7 + 1.5 + 1.6 + v4.6.1 + + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Service Fabric Tools\Microsoft.VisualStudio.Azure.Fabric.ApplicationProject.targets + + + + + + + + \ No newline at end of file diff --git a/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/packages.config b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/packages.config new file mode 100644 index 000000000..3dc0a332b --- /dev/null +++ b/ServiceFabric/Windows/eShopOnServiceFabricWebStatus/eShopOnServiceFabricWebStatus/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/branch-guide.md b/branch-guide.md index 67b2d0eaf..386e74ee5 100644 --- a/branch-guide.md +++ b/branch-guide.md @@ -2,9 +2,8 @@ Following are the most important branches: -- `dev`: Contains the latest code **and it is the branch actively developed**. Note that **all PRs must be against `dev` branch to be considered**. +- `dev`: Contains the latest code **and it is the branch actively developed**. Note that **all PRs must be against `dev` branch to be considered**. This branch is developed using .NET Core 2.0 - `master`: Synced time to time from dev. It contains "stable" code, although not the latest one. We plan to do periodic merges from `dev` to `master`, but we are not doing it right now. -- `netcore2`: Contains NETCore 2.0 (preview2) based code. All APIs and webs are migrated to netcore2 except `Identity.API` which still uses netcore1.1 (because of Identity Server). Dockerfiles are updated also. Use this branch to test the NETCore 2.0 code. You can also submit PR to this branch if they are related to netcore2. Any other branch is considered temporary and could be deleted at any time. Do not do any PR to them! diff --git a/cli-linux/build-bits-linux.sh b/cli-linux/build-bits-linux.sh index 21f633dbf..ac68031e0 100755 --- a/cli-linux/build-bits-linux.sh +++ b/cli-linux/build-bits-linux.sh @@ -16,7 +16,6 @@ declare -a projectList=( "$path/Services/Location/Locations.API" "$path/Services/Marketing/Marketing.API" "$path/Services/Payment/Payment.API" - "$path/Services/GracePeriod/GracePeriodManager" "$path/Web/WebMVC" "$path/Web/WebStatus" ) @@ -31,10 +30,8 @@ do echo -e "\e[33m\tRemoving old publish output" pushd $path/$project rm -rf obj/Docker/publish - echo -e "\e[33m\tRestoring project $project" - dotnet restore --verbosity minimal echo -e "\e[33m\tBuilding and publishing $project" - dotnet publish -c Release -o obj/Docker/publish --verbosity minimal + dotnet publish -c Release -o obj/Docker/publish --verbosity quiet popd done diff --git a/cli-mac/build-bits.sh b/cli-mac/build-bits.sh index 681c3605d..8b4917144 100755 --- a/cli-mac/build-bits.sh +++ b/cli-mac/build-bits.sh @@ -1,12 +1,17 @@ #!/bin/sh +# List of microservices here needs to be updated to include all the new microservices (Marketing, etc.) + projectList=( - "../src/Services/Catalog/Catalog.API" - "../src/Services/Basket/Basket.API" - "../src/Services/Ordering/Ordering.API" - "../src/Services/Identity/Identity.API" "../src/Web/WebMVC" "../src/Web/WebSPA" + "../src/Services/Identity/Identity.API" + "../src/Services/Catalog/Catalog.API" + "../src/Services/Ordering/Ordering.API" + "../src/Services/Basket/Basket.API" + "../src/Services/Location/Locations.API" + "../src/Services/Marketing/Marketing.API" + "../src/Services/Payment/Payment.API" "../src/Web/WebStatus" ) @@ -22,10 +27,8 @@ do echo -e "\e[33m\tRemoving old publish output" pushd $(pwd)/$project rm -rf obj/Docker/publish - echo -e "\e[33m\tRestoring project" - dotnet restore echo -e "\e[33m\tBuilding and publishing projects" - dotnet publish -o obj/Docker/publish + dotnet publish -o obj/Docker/publish -c Release popd done @@ -40,3 +43,5 @@ fi # No need to build the images, docker build or docker compose will # do that using the images and containers defined in the docker-compose.yml file. +# +# diff --git a/cli-windows/build-bits-simple.ps1 b/cli-windows/build-bits-simple.ps1 index 461384cc2..008f4f599 100644 --- a/cli-windows/build-bits-simple.ps1 +++ b/cli-windows/build-bits-simple.ps1 @@ -13,7 +13,5 @@ Write-Host "Root path used is $rootPath" -ForegroundColor Yellow $SolutionFilePath = [IO.Path]::Combine($rootPath, "eShopOnContainers-ServicesAndWebApps.sln") -dotnet restore $SolutionFilePath - dotnet publish $SolutionFilePath -c Release -o .\obj\Docker\publish diff --git a/cli-windows/build-bits.ps1 b/cli-windows/build-bits.ps1 index 272227b3d..3b3d8da3f 100644 --- a/cli-windows/build-bits.ps1 +++ b/cli-windows/build-bits.ps1 @@ -8,6 +8,9 @@ if ([string]::IsNullOrEmpty($rootPath)) { } Write-Host "Root path used is $rootPath" -ForegroundColor Yellow +workflow BuildAndPublish { + param ([string] $rootPath + ) $projectPaths = @{Path="$rootPath\src\Web\WebMVC";Prj="WebMVC.csproj"}, @{Path="$rootPath\src\Web\WebSPA";Prj="WebSPA.csproj"}, @@ -15,25 +18,24 @@ $projectPaths = @{Path="$rootPath\src\Services\Catalog\Catalog.API";Prj="Catalog.API.csproj"}, @{Path="$rootPath\src\Services\Ordering\Ordering.API";Prj="Ordering.API.csproj"}, @{Path="$rootPath\src\Services\Basket\Basket.API";Prj="Basket.API.csproj"}, - @{Path="$rootPath\src\Services\GracePeriod\GracePeriodManager";Prj="GracePeriodManager.csproj"}, @{Path="$rootPath\src\Services\Location\Locations.API";Prj="Locations.API.csproj"}, @{Path="$rootPath\src\Services\Marketing\Marketing.API";Prj="Marketing.API.csproj"}, @{Path="$rootPath\src\Services\Payment\Payment.API";Prj="Payment.API.csproj"}, @{Path="$rootPath\src\Web\WebStatus";Prj="WebStatus.csproj"} -$projectPaths | foreach { - $projectPath = $_.Path - $projectFile = $_.Prj - $outPath = $_.Path + "\obj\Docker\publish" - $projectPathAndFile = "$projectPath\$projectFile" - Write-Host "Deleting old publish files in $outPath" -ForegroundColor Yellow - remove-item -path $outPath -Force -Recurse -ErrorAction SilentlyContinue - Write-Host "Publishing $projectPathAndFile to $outPath" -ForegroundColor Yellow - dotnet restore $projectPathAndFile - dotnet build $projectPathAndFile - dotnet publish $projectPathAndFile -o $outPath + foreach -parallel ($item in $projectPaths) { + $projectPath = $item.Path + $projectFile = $item.Prj + $outPath = $item.Path + "\obj\Docker\publish" + $projectPathAndFile = "$projectPath\$projectFile" + #Write-Host "Deleting old publish files in $outPath" -ForegroundColor Yellow + remove-item -path $outPath -Force -Recurse -ErrorAction SilentlyContinue + #Write-Host "Publishing $projectPathAndFile to $outPath" -ForegroundColor Yellow + dotnet publish $projectPathAndFile -o $outPath -c Release + } } +BuildAndPublish $rootPath ######################################################################################## # Delete old eShop Docker images diff --git a/cli-windows/delete-vs-and-eshop-images.ps1 b/cli-windows/delete-vs-and-eshop-images.ps1 new file mode 100644 index 000000000..f37dc6ea4 --- /dev/null +++ b/cli-windows/delete-vs-and-eshop-images.ps1 @@ -0,0 +1,46 @@ + # Delete all containers + Write-Host "Deleting all running containers in the local Docker Host" + docker rm $(docker ps -a -q) -f + +$eShopImagesToDelete = docker images --filter=reference="eshop/*" -q +If (-Not $eShopImagesToDelete) {Write-Host "Not deleting eShop images as there are no eShop images in the current local Docker repo."} +Else +{ + # Delete all eshop images + Write-Host "Deleting eShop images in local Docker repo" + Write-Host $eShopImagesToDelete + docker rmi $(docker images --filter=reference="eshop/*" -q) -f +} + +$VSImagesToDelete = docker images --filter=reference="catalog.api:dev" -q +If (-Not $VSImagesToDelete) {Write-Host "Not deleting VS images as there are no VS images in the current local Docker repo."} +Else +{ + # Delete all eshop images + Write-Host "Deleting images created by VS in local Docker repo" + Write-Host $VSImagesToDelete + docker rmi $(docker images --filter=reference="*:dev" -q) -f + + #docker rmi $(docker images --filter=reference="eshop/payment.api:dev" -q) -f + #docker rmi $(docker images --filter=reference="eshop/webspa:dev" -q) -f + #docker rmi $(docker images --filter=reference="eshop/webmvc:dev" -q) -f + #docker rmi $(docker images --filter=reference="eshop/catalog.api:dev" -q) -f + #docker rmi $(docker images --filter=reference="eshop/marketing.api:dev" -q) -f + #docker rmi $(docker images --filter=reference="eshop/ordering.api:dev" -q) -f + #docker rmi $(docker images --filter=reference="eshop/basket.api:dev" -q) -f + #docker rmi $(docker images --filter=reference="eshop/identity.api:dev" -q) -f + #docker rmi $(docker images --filter=reference="eshop/locations.api:dev" -q) -f + #docker rmi $(docker images --filter=reference="eshop/webstatus:dev" -q) -f +} + +# DELETE ALL IMAGES AND CONTAINERS + +# Delete all containers +# docker rm $(docker ps -a -q) -f + +# Delete all images +# docker rmi $(docker images -q) + +#Filter by image name (Has to be complete, cannot be a wildcard) +#docker ps -q --filter=ancestor=eshop/identity.api:dev + diff --git a/cli-windows/start-windows-containers.ps1 b/cli-windows/start-windows-containers.ps1 index 300c63568..91d8eb7f7 100644 --- a/cli-windows/start-windows-containers.ps1 +++ b/cli-windows/start-windows-containers.ps1 @@ -1,9 +1,32 @@ -Param([string] $rootPath) +# rootPath: Root path of the repo (where docker-compose*.yml are). If not passed ../cli-windows/ is assumed +# buildBits: If the projects must be built before. Default value: $true +# customEventBusLoginPassword: If a custom RabbitMQ image is used that do not use the default user login/pwd. Default: $false (means assume use default spring2/rabbitmq image) + +Param( + [parameter(Mandatory=$false)][string] $rootPath, + [parameter(Mandatory=$false)][bool] $customEventBusLoginPassword=$false, + [parameter(Mandatory=$false)][bool]$buildBits=$true +) + $scriptPath = Split-Path $script:MyInvocation.MyCommand.Path if ([string]::IsNullOrEmpty($rootPath)) { $rootPath = "$scriptPath\.." } Write-Host "Root path used is $rootPath" -ForegroundColor Yellow -& .\build-bits.ps1 -rootPath $rootPath -docker-compose -f "$rootPath\docker-compose-windows.yml" -f "$rootPath\docker-compose-windows.override.yml" up + +if ($buildBits) { + & $scriptPath\build-bits.ps1 -rootPath $rootPath +} + + +$env:ESHOP_EXTERNAL_DNS_NAME_OR_IP = "10.0.75.1" +$env:ESHOP_AZURE_STORAGE_CATALOG_URL ="http://10.0.75.1:5101/api/v1/catalog/items/[0]/pic/" +$env:ESHOP_AZURE_STORAGE_MARKETING_URL ="http://10.0.75.1:5110/api/v1/campaigns/[0]/pic/" + +if (-Not $customEventBusLoginPassword) { + docker-compose -f "$rootPath\docker-compose-windows.yml" -f "$rootPath\docker-compose.override.yml" -f "$rootPath\docker-compose.override.windows.yml" up +} +else { + docker-compose -f "$rootPath\docker-compose-windows.yml" -f "$rootPath\docker-compose.override.yml" up +} diff --git a/cli-windows/vsts/build-bits-no-parallel.ps1 b/cli-windows/vsts/build-bits-no-parallel.ps1 new file mode 100644 index 000000000..4344bdcc8 --- /dev/null +++ b/cli-windows/vsts/build-bits-no-parallel.ps1 @@ -0,0 +1,56 @@ +Param([string] $rootPath) +$scriptPath = Split-Path $script:MyInvocation.MyCommand.Path + +Write-Host "Current script directory is $scriptPath" -ForegroundColor Yellow + +if ([string]::IsNullOrEmpty($rootPath)) { + $rootPath = "$scriptPath\..\.." +} +Write-Host "Root path used is $rootPath" -ForegroundColor Yellow + + +$projectPaths = + @{Path="$rootPath\src\Web\WebMVC";Prj="WebMVC.csproj"}, + @{Path="$rootPath\src\Web\WebSPA";Prj="WebSPA.csproj"}, + @{Path="$rootPath\src\Services\Identity\Identity.API";Prj="Identity.API.csproj"}, + @{Path="$rootPath\src\Services\Catalog\Catalog.API";Prj="Catalog.API.csproj"}, + @{Path="$rootPath\src\Services\Ordering\Ordering.API";Prj="Ordering.API.csproj"}, + @{Path="$rootPath\src\Services\Basket\Basket.API";Prj="Basket.API.csproj"}, + @{Path="$rootPath\src\Services\Location\Locations.API";Prj="Locations.API.csproj"}, + @{Path="$rootPath\src\Services\Marketing\Marketing.API";Prj="Marketing.API.csproj"}, + @{Path="$rootPath\src\Services\Payment\Payment.API";Prj="Payment.API.csproj"}, + @{Path="$rootPath\src\Web\WebStatus";Prj="WebStatus.csproj"} + +$projectPaths | foreach { + $projectPath = $_.Path + $projectFile = $_.Prj + $outPath = $_.Path + "\obj\Docker\publish" + $projectPathAndFile = "$projectPath\$projectFile" + Write-Host "Deleting old publish files in $outPath" -ForegroundColor Yellow + remove-item -path $outPath -Force -Recurse -ErrorAction SilentlyContinue + Write-Host "Publishing $projectPathAndFile to $outPath" -ForegroundColor Yellow + dotnet restore $projectPathAndFile + dotnet build $projectPathAndFile + dotnet publish $projectPathAndFile -o $outPath + } + +######################################################################################## +# Delete old eShop Docker images +######################################################################################## + +$imagesToDelete = docker images --filter=reference="eshop/*" -q + +If (-Not $imagesToDelete) {Write-Host "Not deleting eShop images as there are no eShop images in the current local Docker repo."} +Else +{ + # Delete all containers + Write-Host "Deleting all containers in local Docker Host" + docker rm $(docker ps -a -q) -f + + # Delete all eshop images + Write-Host "Deleting eShop images in local Docker repo" + Write-Host $imagesToDelete + docker rmi $(docker images --filter=reference="eshop/*" -q) -f +} + +# WE DON'T NEED DOCKER BUILD AS WE CAN RUN "DOCKER-COMPOSE BUILD" OR "DOCKER-COMPOSE UP" AND IT WILL BUILD ALL THE IMAGES IN THE .YML FOR US diff --git a/deploy/az/azurefunctions/azurefunctionsdeploy.json b/deploy/az/azurefunctions/azurefunctionsdeploy.json index 7f1b8a445..29625302b 100644 --- a/deploy/az/azurefunctions/azurefunctionsdeploy.json +++ b/deploy/az/azurefunctions/azurefunctionsdeploy.json @@ -6,7 +6,8 @@ "type": "string", "metadata": { "description": "Name of the Azure Functions namespace" - } + }, + "defaultValue": "mktfunctionsdemo" } }, "variables": { @@ -16,7 +17,7 @@ "ServerFarmPlan": "[concat(trim(variables('location')), 'Plan')]", "StorageAccounts": "[concat(variables('SitesEshopfunctionsName'), 'st')]" }, - "resources": [ + "resources": [ { "type": "Microsoft.Storage/storageAccounts", "sku": { diff --git a/deploy/az/servicefabric/LinuxContainers/gen-keyvaultcert.ps1 b/deploy/az/servicefabric/LinuxContainers/gen-keyvaultcert.ps1 new file mode 100644 index 000000000..c6fc34013 --- /dev/null +++ b/deploy/az/servicefabric/LinuxContainers/gen-keyvaultcert.ps1 @@ -0,0 +1,53 @@ +Param( + [parameter(Mandatory=$true)][string]$vaultName, + [parameter(Mandatory=$true)][string]$certName, + [parameter(Mandatory=$true)][string]$certPwd, + [parameter(Mandatory=$true)][string]$subjectName, + [parameter(Mandatory=$false)][string]$ValidityInMonths=12, + [parameter(Mandatory=$true)][string]$saveDir +) + + +#Log in Azure Account +Login-AzureRmAccount + + +# Create Cert in KeyVault +Write-Host "Creating certificate in Azure KeyVault..." -ForegroundColor Yellow +$policy = New-AzureKeyVaultCertificatePolicy -SubjectName $subjectName -IssuerName Self -ValidityInMonths $ValidityInMonths +Add-AzureKeyVaultCertificate -VaultName $vaultName -Name $certName -CertificatePolicy $policy + +# Downloading Certificate +Write-Host "Downloading Certificate from KeyVault..." -ForegroundColor Yellow + +$Stoploop = $false +$Retrycount = 0 + +do { + try { + + $kvSecret = Get-AzureKeyVaultSecret -VaultName $vaultName -Name $certName -ErrorAction SilentlyContinue + $kvSecretBytes = [System.Convert]::FromBase64String($kvSecret.SecretValueText) + $certCollection = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2Collection + $certCollection.Import($kvSecretBytes,$null,[System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::Exportable) + $protectedCertificateBytes = $certCollection.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Pkcs12, $certPwd) + [System.IO.File]::WriteAllBytes($saveDir + "\" + $certName + ".pfx", $protectedCertificateBytes) + + $Stoploop = $true + Write-Host "Finished!" -ForegroundColor Yellow + } + catch { + if ($Retrycount -gt 5){ + $Stoploop = $true + Write-Host "Not possible to retrieve the certificate!" -ForegroundColor Yellow + } + else { + Start-Sleep -Seconds 20 + $Retrycount = $Retrycount + 1 + } + } +} +While ($Stoploop -eq $false) + +# Show Certificate Values +Get-AzureKeyVaultCertificate -VaultName $vaultName -Name $certName \ No newline at end of file diff --git a/deploy/az/servicefabric/LinuxContainers/readme.md b/deploy/az/servicefabric/LinuxContainers/readme.md new file mode 100644 index 000000000..98d097b10 --- /dev/null +++ b/deploy/az/servicefabric/LinuxContainers/readme.md @@ -0,0 +1,134 @@ +# Deploying a Service Fabric cluster based on Linux nodes + +## A. Unsecured cluster (SF Linux cluster) +For a secured cluster, see option B. below. + +You can always deploy a SF cluster through the Azure portal, as explained in this article: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started-azure-cluster + +However, when creating a cluster, there are quite a few configurations to take into account, like enabling the internal DNS service or Reverse Proxy service, choosing between Linux/Windows, open/publish your application ports in the load-balancer and most of all (the most complex setup) how to create a secure cluster. + +Because of those reasons, we have created a set of ARM templates and scripts so you can create, re-create and configure the SF clusters much faster, as explained below: + +Within eShopOnContainers root folder, at the folder [..\deploy\az\servicefabric\LinuxContainers](https://github.com/dotnet-architecture/eShopOnContainers/tree/dev/deploy/az/servicefabric/LinuxContainers), you can find the ARM template `servicefabricdeploy.json` and its parameters file (`servicefabricdeploy.parameters.json`) to create a Service Fabric cluster environment for Linux Containers. + +## Edit the servicefabricdeploy.parameters.json file + +Edit the following params in `servicefabricdeploy.parameters.json` file to set your values: + +- clusterName: Name of your SF cluster +- clusterLocation: Datacenter location, like westus or westeurope +- computeLocation: Datacenter location, like westus or westeurope +- adminUserName: user-name for VMs administration +- adminPassword: user-password for VMs administration +- dnsName: Name assigned to your SF dns + +Optionally, you could modify which ports are opened in the LoadBalancer for the multiple eShopOnContainer apps and API services. +By default, they are setup as: +- webMvcHttpPort: 5100 +- webSpaHttpPort: 5104 +- webStatusHttpPort: 5107 +- IdSrvHttpRule: 5105 +- BasketApiHttpRule: 5103 +- CatalogApiHttpRule: 5101 +- OrderingApiHttpRule: 5102 +- MarketingApiHttpRule: 5110 +- LocationsApiHttpRule: 5109 + +## Deploy the Service Fabric cluster using the script and ARM templates + +Once parameter file is edited you can deploy it using [create-resources script](../readme.md). + +For example, to deploy the cluster to a new resourcegroup located in westus, go to `deploy\az` folder and type: + +``` +create-resources.cmd servicefabric\LinuxContainers\servicefabricdeploy qa-eshop-sflinux-resgrp -c westus +``` + +You should see a similar execution to the following: +![image](https://user-images.githubusercontent.com/1712635/31638180-15da9f84-b287-11e7-9d4e-604f33690198.png) + +Now, if you go to your subscription in Azure, you should be able to see the SF cluster already created and available, like in the following image: + +![image](https://user-images.githubusercontent.com/1712635/31638398-3fc08ad8-b288-11e7-879b-fc4df0daad2b.png) + +In this case, this is an unsecured SF cluster with a single Linux node, good for initial tests and getting started with SF. + +## B. Secured cluster (SF Linux cluster) + +Within eShopOnContainers root folder, at the folder [..\deploy\az\servicefabric\LinuxContainers](https://github.com/dotnet-architecture/eShopOnContainers/tree/dev/deploy/az/servicefabric/LinuxContainers), you can find the ARM template `servicefabricdeploysecured.json` and its parameter file (`servicefabricdeploysecured.parameters.json`) to create a secured Service Fabric cluster environment for Linux Containers (IN THIS CASE, IT IS A SECURED CLUSTER USING A CERTIFICATE). + +The ARM template `servicefabricdeploysecured.json` and its parameter file (`servicefabricdeploysecured.parameters.json`) are used to create a service fabric cluster environment for linux containers secured with a certificate. + +## Create Azure Keyvault service +Go to PortalAzure and create a Keyvault service. Make sure Enable access for deployment checkboxes are selected. + +![image](https://user-images.githubusercontent.com/1712635/31638848-9b266530-b28a-11e7-953b-1e3ec1a54f77.png) + +## Generate a certificate in Azure Keyvault +In a POWER-SHELL window, move to the folder [..\deploy\az\servicefabric\LinuxContainers](https://github.com/dotnet-architecture/eShopOnContainers/tree/dev/deploy/az/servicefabric/LinuxContainers). + +**Select your Azure subscription** You might have [several Azure subscriptions](https://docs.microsoft.com/en-us/cli/azure/account#set) as shown if you type the following. + + >``` + >az account list + >``` + If you have multiple subscription accounts, you first need to select the Azure subscription account you want to target. Type the following: + >``` + >az account set --subscription "Your Azure Subscription Name or ID" + >``` + +Execute the gen-keyvaultcert.ps1 script to generate and download a certificate from Keyvault. + +``` +.\gen-keyvaultcert.ps1 -vaultName -certName -certPwd -subjectName CN=.westeurope.cloudapp.azure.com -saveDir C:\Users\\Downloads + +``` + +You should see a similar execution to the following: +![image](https://user-images.githubusercontent.com/1712635/31640172-93efcca0-b291-11e7-970e-5b5e6bf07042.png) + +IMPORTANT: At this point, copy/cut the .PFX certificate file saved in the downloads forlder and save it in a secure place. + +## Install the certificate +Install the certificate (by double-clicking on the .PFX file) under 'Current User' store location (by default location) and check it as exportable. + + + +Also, install the same certificate as CA (Certificate Authority) under Current User, too. + +![image](https://user-images.githubusercontent.com/1712635/31642795-c6ffa434-b2a1-11e7-8ff8-2a63549a780e.png) + +## Editing servicefabricdeploysecured.parameters.json file + +Edit the parameters in `servicefabricdeploysecured.parameters.json` in a similar way you can do with the unsecured .json file shown above (clusterName, dnsName, etc.), plus edit the following values: + +- sourceVaultValue: Your Azure Keyvault's RESOURCE ID (check Azure keyvault properties, similar to: /subscriptions/e1234ac1-c09c-3jaf-6767-98b3c5f1f246/resourceGroups/eshop-global-resgrp/providers/Microsoft.KeyVault/vaults/eshopkeyvault") + +- certificateUrlValue: Your certificate Secret Identifier (check Azure Keyvault secret certificate properties, should be in the format of https://.vault.azure.net:443/secrets/, similar to: +https://eshopkeyvault.vault.azure.net/secrets/pro-eshop-sflinux-cluster-cert/fd47684442c04cdj83b3hfe4h8e08123) + +- certificateThumbprint: certificate thumbprint (check azure Keyvault certificate thumbprint, something like 69JK453486D55A6818577Z0699100365HDK70FCE) + +## Deploy the secured SF Linux cluster + +Once parameters file is edited you can deploy it using [create-resources script](../readme.md). +Use a command prompt window positioned into the deploy\az folder. + +``` +create-resources.cmd servicefabric\LinuxContainers\servicefabricdeploysecured pro-eshop-sflinux-resgrp -c westus +``` +The execution should be something like the following: +![image](https://user-images.githubusercontent.com/1712635/31642529-54479704-b2a0-11e7-90ee-2abf32c92205.png) + +Once the cluster is created you can explore it with Azure's portal, like in the following image: + +![image](https://user-images.githubusercontent.com/1712635/31642956-b7cfc8d0-b2a2-11e7-8ede-a141ec190eb4.png) + +## Deploy eShopOnServiceFabric with Visual Studio. + +Modify the cloud.xml file of each Service Fabric application in PublishProfile directory and set your certificate settings to be able to deploy eshopOnContainers in the secured cluster: + + + + + diff --git a/deploy/az/servicefabric/LinuxContainers/servicefabricdeploy.json b/deploy/az/servicefabric/LinuxContainers/servicefabricdeploy.json new file mode 100644 index 000000000..fb28174db --- /dev/null +++ b/deploy/az/servicefabric/LinuxContainers/servicefabricdeploy.json @@ -0,0 +1,751 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterLocation": { + "type": "string", + "metadata": { + "description": "Location of the Cluster" + } + }, + "clusterName": { + "type": "string", + "defaultValue": "Cluster", + "metadata": { + "description": "Name of your cluster - Between 3 and 23 characters. Letters and numbers only" + } + }, + "nt0applicationStartPort": { + "type": "int", + "defaultValue": 20000 + }, + "nt0applicationEndPort": { + "type": "int", + "defaultValue": 30000 + }, + "nt0ephemeralStartPort": { + "type": "int", + "defaultValue": 49152 + }, + "nt0ephemeralEndPort": { + "type": "int", + "defaultValue": 65534 + }, + "nt0fabricTcpGatewayPort": { + "type": "int", + "defaultValue": 19000 + }, + "nt0fabricHttpGatewayPort": { + "type": "int", + "defaultValue": 19080 + }, + "webMvcHttpPort": { + "type": "int", + "defaultValue": 5100 + }, + "webSpaHttpPort": { + "type": "int", + "defaultValue": 5104 + }, + "webStatusHttpPort": { + "type": "int", + "defaultValue": 5107 + }, + "IdSrvHttpRule": { + "type": "int", + "defaultValue": 5105 + }, + "BasketApiHttpRule": { + "type": "int", + "defaultValue": 5103 + }, + "CatalogApiHttpRule": { + "type": "int", + "defaultValue": 5101 + }, + "OrderingApiHttpRule": { + "type": "int", + "defaultValue": 5102 + }, + "MarketingApiHttpRule": { + "type": "int", + "defaultValue": 5110 + }, + "LocationsApiHttpRule": { + "type": "int", + "defaultValue": 5109 + }, + "subnet0Name": { + "type": "string", + "defaultValue": "Subnet-0" + }, + "subnet0Prefix": { + "type": "string", + "defaultValue": "10.0.0.0/24" + }, + "computeLocation": { + "type": "string" + }, + "publicIPAddressName": { + "type": "string", + "defaultValue": "PublicIP-VM" + }, + "publicIPAddressType": { + "type": "string", + "allowedValues": [ + "Dynamic" + ], + "defaultValue": "Dynamic" + }, + "vmStorageAccountContainerName": { + "type": "string", + "defaultValue": "vhds" + }, + "adminUserName": { + "type": "string", + "defaultValue": "testadm", + "metadata": { + "description": "Remote desktop user Id" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Remote desktop user password. Must be a strong password" + } + }, + "virtualNetworkName": { + "type": "string", + "defaultValue": "VNet" + }, + "addressPrefix": { + "type": "string", + "defaultValue": "10.0.0.0/16" + }, + "dnsName": { + "type": "string" + }, + "nicName": { + "type": "string", + "defaultValue": "NIC" + }, + "lbName": { + "type": "string", + "defaultValue": "LoadBalancer" + }, + "lbIPName": { + "type": "string", + "defaultValue": "PublicIP-LB-FE" + }, + "overProvision": { + "type": "string", + "defaultValue": "false" + }, + "vmImagePublisher": { + "type": "string", + "defaultValue": "Microsoft.Azure.ServiceFabric" + }, + "vmImageOffer": { + "type": "string", + "defaultValue": "UbuntuServer" + }, + "vmImageSku": { + "type": "string", + "defaultValue": "16.04" + }, + "vmImageVersion": { + "type": "string", + "defaultValue": "6.0.12" + }, + "storageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the VM image storage account" + } + }, + "supportLogStorageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the support log storage account" + } + }, + "supportLogStorageAccountName": { + "type": "string", + "defaultValue": "[toLower( concat('sflogs', uniqueString(resourceGroup().id),'2'))]", + "metadata": { + "description": "Name for the storage account that contains support logs from the cluster" + } + }, + "applicationDiagnosticsStorageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the application diagnostics storage account" + } + }, + "applicationDiagnosticsStorageAccountName": { + "type": "string", + "defaultValue": "[toLower(concat(uniqueString(resourceGroup().id), '3' ))]", + "metadata": { + "description": "Name for the storage account that contains application diagnostics data from the cluster" + } + }, + "nt0InstanceCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "Instance count for node type" + } + }, + "vmNodeType0Name": { + "type": "string", + "defaultValue": "primary", + "maxLength": 9 + }, + "vmNodeType0Size": { + "type": "string", + "defaultValue": "Standard_D1_v2" + } + }, + "variables": { + "vmssApiVersion": "2017-03-30", + "lbApiVersion": "2015-06-15", + "vNetApiVersion": "2015-06-15", + "storageApiVersion": "2016-01-01", + "publicIPApiVersion": "2015-06-15", + "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]", + "subnet0Ref": "[concat(variables('vnetID'),'/subnets/',parameters('subnet0Name'))]", + "wadlogs": "", + "wadperfcounters1": "", + "wadperfcounters2": "", + "wadcfgxstart": "[concat(variables('wadlogs'),variables('wadperfcounters1'),variables('wadperfcounters2'),'')]", + "lbID0": "[resourceId('Microsoft.Network/loadBalancers', concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]", + "lbIPConfig0": "[concat(variables('lbID0'),'/frontendIPConfigurations/LoadBalancerIPConfig')]", + "lbPoolID0": "[concat(variables('lbID0'),'/backendAddressPools/LoadBalancerBEAddressPool')]", + "lbProbeID0": "[concat(variables('lbID0'),'/probes/FabricGatewayProbe')]", + "lbHttpProbeID0": "[concat(variables('lbID0'),'/probes/FabricHttpGatewayProbe')]", + "lbNatPoolID0": "[concat(variables('lbID0'),'/inboundNatPools/LoadBalancerBEAddressNatPool')]", + "vmStorageAccountName0": "[toLower(concat(uniqueString(resourceGroup().id), '1', '0' ))]", + "wadmetricsresourceid0": "[concat('/subscriptions/',subscription().subscriptionId,'/resourceGroups/',resourceGroup().name ,'/providers/','Microsoft.Compute/virtualMachineScaleSets/', parameters('vmNodeType0Name'))]" + }, + "resources": [ + { + "apiVersion": "[variables('storageApiVersion')]", + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('supportLogStorageAccountName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": {}, + "kind": "Storage", + "sku": { + "name": "[parameters('supportLogStorageAccountType')]" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('storageApiVersion')]", + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('applicationDiagnosticsStorageAccountName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": {}, + "kind": "Storage", + "sku": { + "name": "[parameters('applicationDiagnosticsStorageAccountType')]" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('vNetApiVersion')]", + "type": "Microsoft.Network/virtualNetworks", + "name": "[parameters('virtualNetworkName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('addressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet0Name')]", + "properties": { + "addressPrefix": "[parameters('subnet0Prefix')]" + } + } + ] + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('publicIPApiVersion')]", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[concat(parameters('lbIPName'),'-','0')]", + "location": "[parameters('computeLocation')]", + "properties": { + "dnsSettings": { + "domainNameLabel": "[parameters('dnsName')]" + }, + "publicIPAllocationMethod": "Dynamic" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('lbApiVersion')]", + "type": "Microsoft.Network/loadBalancers", + "name": "[concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name'))]", + "location": "[parameters('computeLocation')]", + "dependsOn": [ + "[concat('Microsoft.Network/publicIPAddresses/',concat(parameters('lbIPName'),'-','0'))]" + ], + "properties": { + "frontendIPConfigurations": [ + { + "name": "LoadBalancerIPConfig", + "properties": { + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(parameters('lbIPName'),'-','0'))]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "LoadBalancerBEAddressPool", + "properties": {} + } + ], + "loadBalancingRules": [ + { + "name": "LBRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('nt0fabricTcpGatewayPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('nt0fabricTcpGatewayPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "LBHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('nt0fabricHttpGatewayPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('nt0fabricHttpGatewayPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "WebMVCHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webMvcHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webMvcHttpPort')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "WebSPAHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webSpaHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webSpaHttpPort')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "WebStatusHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webStatusHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webStatusHttpPort')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "IdSrvHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('IdSrvHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('IdSrvHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "BasketApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('BasketApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('BasketApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "CatalogApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('CatalogApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('CatalogApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "OrderingApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('OrderingApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('OrderingApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "MarketingApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('MarketingApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('MarketingApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "LocationsApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('LocationsApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('LocationsApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + } + ], + "probes": [ + { + "name": "FabricGatewayProbe", + "properties": { + "intervalInSeconds": 5, + "numberOfProbes": 2, + "port": "[parameters('nt0fabricTcpGatewayPort')]", + "protocol": "tcp" + } + }, + { + "name": "FabricHttpGatewayProbe", + "properties": { + "intervalInSeconds": 5, + "numberOfProbes": 2, + "port": "[parameters('nt0fabricHttpGatewayPort')]", + "protocol": "tcp" + } + } + ], + "inboundNatPools": [ + { + "name": "LoadBalancerBEAddressNatPool", + "properties": { + "backendPort": "22", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPortRangeEnd": "4500", + "frontendPortRangeStart": "3389", + "protocol": "tcp" + } + } + ] + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('vmssApiVersion')]", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "name": "[parameters('vmNodeType0Name')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", + "[concat('Microsoft.Network/loadBalancers/', concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName'))]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('applicationDiagnosticsStorageAccountName'))]" + ], + "properties": { + "overprovision": "[parameters('overProvision')]", + "upgradePolicy": { + "mode": "Automatic" + }, + "virtualMachineProfile": { + "extensionProfile": { + "extensions": [ + { + "name": "[concat(parameters('vmNodeType0Name'),'_ServiceFabricLinuxNode')]", + "properties": { + "type": "ServiceFabricLinuxNode", + "autoUpgradeMinorVersion": true, + "protectedSettings": { + "StorageAccountKey1": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key1]", + "StorageAccountKey2": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key2]" + }, + "publisher": "Microsoft.Azure.ServiceFabric", + "settings": { + "clusterEndpoint": "[reference(parameters('clusterName')).clusterEndpoint]", + "nodeTypeRef": "[parameters('vmNodeType0Name')]", + "durabilityLevel": "Bronze", + "enableParallelJobs": true, + "nicPrefixOverride": "[parameters('subnet0Prefix')]" + }, + "typeHandlerVersion": "1.0" + } + }, + { + "name": "[concat('VMDiagnosticsVmExt','_vmNodeType0Name')]", + "properties": { + "type": "LinuxDiagnostic", + "autoUpgradeMinorVersion": true, + "protectedSettings": { + "storageAccountName": "[parameters('applicationDiagnosticsStorageAccountName')]", + "storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('applicationDiagnosticsStorageAccountName')),'2015-05-01-preview').key1]", + "storageAccountEndPoint": "https://core.windows.net/" + }, + "publisher": "Microsoft.OSTCExtensions", + "settings": { + "xmlCfg": "[base64(concat(variables('wadcfgxstart'),variables('wadmetricsresourceid0'),variables('wadcfgxend')))]", + "StorageAccount": "[parameters('applicationDiagnosticsStorageAccountName')]" + }, + "typeHandlerVersion": "2.3" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "[concat(parameters('nicName'), '-0')]", + "properties": { + "ipConfigurations": [ + { + "name": "[concat(parameters('nicName'),'-',0)]", + "properties": { + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('lbPoolID0')]" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "[variables('lbNatPoolID0')]" + } + ], + "subnet": { + "id": "[variables('subnet0Ref')]" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[parameters('adminUsername')]", + "computernamePrefix": "[parameters('vmNodeType0Name')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('vmImagePublisher')]", + "offer": "[parameters('vmImageOffer')]", + "sku": "[parameters('vmImageSku')]", + "version": "[parameters('vmImageVersion')]" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "[parameters('storageAccountType')]" + } + } + } + } + }, + "sku": { + "name": "[parameters('vmNodeType0Size')]", + "capacity": "[parameters('nt0InstanceCount')]", + "tier": "Standard" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "2017-07-01-preview", + "type": "Microsoft.ServiceFabric/clusters", + "name": "[parameters('clusterName')]", + "location": "[parameters('clusterLocation')]", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName'))]" + ], + "properties": { + "addonFeatures": [ + "DnsService" + ], + "clientCertificateCommonNames": [], + "clientCertificateThumbprints": [], + "clusterCodeVersion": "6.0.120.1", + "clusterState": "Default", + "diagnosticsStorageAccountConfig": { + "blobEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]", + "protectedAccountKeyName": "StorageAccountKey1", + "queueEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.queue]", + "storageAccountName": "[parameters('supportLogStorageAccountName')]", + "tableEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.table]" + }, + "fabricSettings": [], + "managementEndpoint": "[concat('http://',reference(concat(parameters('lbIPName'),'-','0')).dnsSettings.fqdn,':',parameters('nt0fabricHttpGatewayPort'))]", + "nodeTypes": [ + { + "name": "[parameters('vmNodeType0Name')]", + "applicationPorts": { + "endPort": "[parameters('nt0applicationEndPort')]", + "startPort": "[parameters('nt0applicationStartPort')]" + }, + "clientConnectionEndpointPort": "[parameters('nt0fabricTcpGatewayPort')]", + "durabilityLevel": "Bronze", + "ephemeralPorts": { + "endPort": "[parameters('nt0ephemeralEndPort')]", + "startPort": "[parameters('nt0ephemeralStartPort')]" + }, + "httpGatewayEndpointPort": "[parameters('nt0fabricHttpGatewayPort')]", + "isPrimary": true, + "vmInstanceCount": "[parameters('nt0InstanceCount')]" + } + ], + "provisioningState": "Default", + "reliabilityLevel": "None", + "upgradeMode": "Manual", + "vmImage": "Linux" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + } + ], + "outputs": { + "clusterProperties": { + "value": "[reference(parameters('clusterName'))]", + "type": "object" + } + } +} \ No newline at end of file diff --git a/deploy/az/servicefabric/LinuxContainers/servicefabricdeploy.parameters.json b/deploy/az/servicefabric/LinuxContainers/servicefabricdeploy.parameters.json new file mode 100644 index 000000000..0e37d24ec --- /dev/null +++ b/deploy/az/servicefabric/LinuxContainers/servicefabricdeploy.parameters.json @@ -0,0 +1,93 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterName": { + "value": "qa-eshop-sflinux-cluster" + }, + "clusterLocation": { + "value": "westus" + }, + "computeLocation": { + "value": "westus" + }, + "adminUserName": { + "value": "eshop" + }, + "adminPassword": { + "value": "Your_complex_Pass@word1" + }, + "nicName": { + "value": "NIC-eshoponsflin" + }, + "publicIPAddressName": { + "value": "eshoponsflin-PubIP" + }, + "dnsName": { + "value": "qa-eshop-sflinux-cluster" + }, + "virtualNetworkName": { + "value": "VNet-eshoponsflin" + }, + "lbName": { + "value": "LB-eshoponsflin" + }, + "lbIPName": { + "value": "LBIP-eshoponsflin" + }, + "vmImageSku": { + "value": "16.04-LTS" + }, + "vmImageVersion": { + "value": "latest" + }, + "vmImagePublisher": { + "value": "Canonical" + }, + "nt0ephemeralStartPort": { + "value": 49152 + }, + "nt0ephemeralEndPort": { + "value": 65534 + }, + "nt0applicationStartPort": { + "value": 20000 + }, + "nt0applicationEndPort": { + "value": 30000 + }, + "nt0fabricTcpGatewayPort": { + "value": 19000 + }, + "nt0fabricHttpGatewayPort": { + "value": 19080 + }, + "webMvcHttpPort": { + "value": 5100 + }, + "webSpaHttpPort": { + "value": 5104 + }, + "webStatusHttpPort": { + "value": 5107 + }, + "IdSrvHttpRule": { + "value": 5105 + }, + "BasketApiHttpRule": { + "value": 5103 + }, + "CatalogApiHttpRule": { + "value": 5101 + }, + "OrderingApiHttpRule": { + "value": 5102 + }, + "MarketingApiHttpRule": { + "value": 5110 + }, + "LocationsApiHttpRule": { + "value": 5109 + } + } +} \ No newline at end of file diff --git a/deploy/az/servicefabric/LinuxContainers/servicefabricdeploysecured.json b/deploy/az/servicefabric/LinuxContainers/servicefabricdeploysecured.json new file mode 100644 index 000000000..0d6620f32 --- /dev/null +++ b/deploy/az/servicefabric/LinuxContainers/servicefabricdeploysecured.json @@ -0,0 +1,821 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterLocation": { + "type": "string", + "metadata": { + "description": "Location of the Cluster" + } + }, + "clusterName": { + "type": "string", + "defaultValue": "Cluster", + "metadata": { + "description": "Name of your cluster - Between 3 and 23 characters. Letters and numbers only" + } + }, + "nt0applicationStartPort": { + "type": "int", + "defaultValue": 20000 + }, + "nt0applicationEndPort": { + "type": "int", + "defaultValue": 30000 + }, + "nt0ephemeralStartPort": { + "type": "int", + "defaultValue": 49152 + }, + "nt0ephemeralEndPort": { + "type": "int", + "defaultValue": 65534 + }, + "nt0fabricTcpGatewayPort": { + "type": "int", + "defaultValue": 19000 + }, + "nt0fabricHttpGatewayPort": { + "type": "int", + "defaultValue": 19080 + }, + "webMvcHttpPort": { + "type": "int", + "defaultValue": 5100 + }, + "webSpaHttpPort": { + "type": "int", + "defaultValue": 5104 + }, + "webStatusHttpPort": { + "type": "int", + "defaultValue": 5107 + }, + "IdSrvHttpRule": { + "type": "int", + "defaultValue": 5105 + }, + "BasketApiHttpRule": { + "type": "int", + "defaultValue": 5103 + }, + "CatalogApiHttpRule": { + "type": "int", + "defaultValue": 5101 + }, + "OrderingApiHttpRule": { + "type": "int", + "defaultValue": 5102 + }, + "MarketingApiHttpRule": { + "type": "int", + "defaultValue": 5110 + }, + "LocationsApiHttpRule": { + "type": "int", + "defaultValue": 5109 + }, + "subnet0Name": { + "type": "string", + "defaultValue": "Subnet-0" + }, + "subnet0Prefix": { + "type": "string", + "defaultValue": "10.0.0.0/24" + }, + "computeLocation": { + "type": "string" + }, + "publicIPAddressName": { + "type": "string", + "defaultValue": "PublicIP-VM" + }, + "publicIPAddressType": { + "type": "string", + "allowedValues": [ + "Dynamic" + ], + "defaultValue": "Dynamic" + }, + "vmStorageAccountContainerName": { + "type": "string", + "defaultValue": "vhds" + }, + "adminUserName": { + "type": "string", + "defaultValue": "testadm", + "metadata": { + "description": "Remote desktop user Id" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Remote desktop user password. Must be a strong password" + } + }, + "virtualNetworkName": { + "type": "string", + "defaultValue": "VNet" + }, + "addressPrefix": { + "type": "string", + "defaultValue": "10.0.0.0/16" + }, + "dnsName": { + "type": "string" + }, + "nicName": { + "type": "string", + "defaultValue": "NIC" + }, + "lbName": { + "type": "string", + "defaultValue": "LoadBalancer" + }, + "lbIPName": { + "type": "string", + "defaultValue": "PublicIP-LB-FE" + }, + "overProvision": { + "type": "string", + "defaultValue": "false" + }, + "vmImagePublisher": { + "type": "string", + "defaultValue": "Microsoft.Azure.ServiceFabric" + }, + "vmImageOffer": { + "type": "string", + "defaultValue": "UbuntuServer" + }, + "vmImageSku": { + "type": "string", + "defaultValue": "16.04" + }, + "vmImageVersion": { + "type": "string", + "defaultValue": "6.0.12" + }, + "clusterProtectionLevel": { + "type": "string", + "allowedValues": [ + "None", + "Sign", + "EncryptAndSign" + ], + "defaultValue": "EncryptAndSign", + "metadata": { + "description": "Protection level.Three values are allowed - EncryptAndSign, Sign, None. It is best to keep the default of EncryptAndSign, unless you have a need not to" + } + }, + "certificateStoreValue": { + "type": "string", + "allowedValues": [ + "My" + ], + "defaultValue": "My", + "metadata": { + "description": "The store name where the cert will be deployed in the virtual machine" + } + }, + "certificateThumbprint": { + "type": "string", + "metadata": { + "description": "Certificate Thumbprint" + } + }, + "sourceVaultValue": { + "type": "string", + "metadata": { + "description": "Resource Id of the key vault, is should be in the format of /subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults/" + } + }, + "certificateUrlValue": { + "type": "string", + "metadata": { + "description": "Refers to the location URL in your key vault where the certificate was uploaded, it is should be in the format of https://.vault.azure.net:443/secrets/" + } + }, + "storageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the VM image storage account" + } + }, + "supportLogStorageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the support log storage account" + } + }, + "supportLogStorageAccountName": { + "type": "string", + "defaultValue": "[toLower( concat('sflogs', uniqueString(resourceGroup().id),'2'))]", + "metadata": { + "description": "Name for the storage account that contains support logs from the cluster" + } + }, + "applicationDiagnosticsStorageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the application diagnostics storage account" + } + }, + "applicationDiagnosticsStorageAccountName": { + "type": "string", + "defaultValue": "[toLower(concat(uniqueString(resourceGroup().id), '3' ))]", + "metadata": { + "description": "Name for the storage account that contains application diagnostics data from the cluster" + } + }, + "nt0InstanceCount": { + "type": "int", + "defaultValue": 5, + "metadata": { + "description": "Instance count for node type" + } + }, + "vmNodeType0Name": { + "type": "string", + "defaultValue": "primary", + "maxLength": 9 + }, + "vmNodeType0Size": { + "type": "string", + "defaultValue": "Standard_D1_v2" + } + }, + "variables": { + "vmssApiVersion": "2017-03-30", + "lbApiVersion": "2015-06-15", + "vNetApiVersion": "2015-06-15", + "storageApiVersion": "2016-01-01", + "publicIPApiVersion": "2015-06-15", + "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]", + "subnet0Ref": "[concat(variables('vnetID'),'/subnets/',parameters('subnet0Name'))]", + "wadlogs": "", + "wadperfcounters1": "", + "wadperfcounters2": "", + "wadcfgxstart": "[concat(variables('wadlogs'),variables('wadperfcounters1'),variables('wadperfcounters2'),'')]", + "lbID0": "[resourceId('Microsoft.Network/loadBalancers', concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]", + "lbIPConfig0": "[concat(variables('lbID0'),'/frontendIPConfigurations/LoadBalancerIPConfig')]", + "lbPoolID0": "[concat(variables('lbID0'),'/backendAddressPools/LoadBalancerBEAddressPool')]", + "lbProbeID0": "[concat(variables('lbID0'),'/probes/FabricGatewayProbe')]", + "lbHttpProbeID0": "[concat(variables('lbID0'),'/probes/FabricHttpGatewayProbe')]", + "lbNatPoolID0": "[concat(variables('lbID0'),'/inboundNatPools/LoadBalancerBEAddressNatPool')]", + "vmStorageAccountName0": "[toLower(concat(uniqueString(resourceGroup().id), '1', '0' ))]", + "wadmetricsresourceid0": "[concat('/subscriptions/',subscription().subscriptionId,'/resourceGroups/',resourceGroup().name ,'/providers/','Microsoft.Compute/virtualMachineScaleSets/', parameters('vmNodeType0Name'))]" + }, + "resources": [ + { + "apiVersion": "[variables('storageApiVersion')]", + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('supportLogStorageAccountName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": {}, + "kind": "Storage", + "sku": { + "name": "[parameters('supportLogStorageAccountType')]" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('storageApiVersion')]", + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('applicationDiagnosticsStorageAccountName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": {}, + "kind": "Storage", + "sku": { + "name": "[parameters('applicationDiagnosticsStorageAccountType')]" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('vNetApiVersion')]", + "type": "Microsoft.Network/virtualNetworks", + "name": "[parameters('virtualNetworkName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('addressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet0Name')]", + "properties": { + "addressPrefix": "[parameters('subnet0Prefix')]" + } + } + ] + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('publicIPApiVersion')]", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[concat(parameters('lbIPName'),'-','0')]", + "location": "[parameters('computeLocation')]", + "properties": { + "dnsSettings": { + "domainNameLabel": "[parameters('dnsName')]" + }, + "publicIPAllocationMethod": "Dynamic" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('lbApiVersion')]", + "type": "Microsoft.Network/loadBalancers", + "name": "[concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name'))]", + "location": "[parameters('computeLocation')]", + "dependsOn": [ + "[concat('Microsoft.Network/publicIPAddresses/',concat(parameters('lbIPName'),'-','0'))]" + ], + "properties": { + "frontendIPConfigurations": [ + { + "name": "LoadBalancerIPConfig", + "properties": { + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(parameters('lbIPName'),'-','0'))]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "LoadBalancerBEAddressPool", + "properties": {} + } + ], + "loadBalancingRules": [ + { + "name": "LBRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('nt0fabricTcpGatewayPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('nt0fabricTcpGatewayPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "LBHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('nt0fabricHttpGatewayPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('nt0fabricHttpGatewayPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "WebMVCHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webMvcHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webMvcHttpPort')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "WebSPAHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webSpaHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webSpaHttpPort')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "WebStatusHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webStatusHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webStatusHttpPort')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "IdSrvHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('IdSrvHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('IdSrvHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "BasketApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('BasketApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('BasketApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "CatalogApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('CatalogApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('CatalogApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "OrderingApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('OrderingApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('OrderingApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "MarketingApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('MarketingApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('MarketingApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "LocationsApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('LocationsApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('LocationsApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + } + ], + "probes": [ + { + "name": "FabricGatewayProbe", + "properties": { + "intervalInSeconds": 5, + "numberOfProbes": 2, + "port": "[parameters('nt0fabricTcpGatewayPort')]", + "protocol": "tcp" + } + }, + { + "name": "FabricHttpGatewayProbe", + "properties": { + "intervalInSeconds": 5, + "numberOfProbes": 2, + "port": "[parameters('nt0fabricHttpGatewayPort')]", + "protocol": "tcp" + } + } + ], + "inboundNatPools": [ + { + "name": "LoadBalancerBEAddressNatPool", + "properties": { + "backendPort": "22", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPortRangeEnd": "4500", + "frontendPortRangeStart": "3389", + "protocol": "tcp" + } + } + ] + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('vmssApiVersion')]", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "name": "[parameters('vmNodeType0Name')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", + "[concat('Microsoft.Network/loadBalancers/', concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName'))]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('applicationDiagnosticsStorageAccountName'))]" + ], + "properties": { + "overprovision": "[parameters('overProvision')]", + "upgradePolicy": { + "mode": "Automatic" + }, + "virtualMachineProfile": { + "extensionProfile": { + "extensions": [ + { + "name": "[concat(parameters('vmNodeType0Name'),'_ServiceFabricLinuxNode')]", + "properties": { + "type": "ServiceFabricLinuxNode", + "autoUpgradeMinorVersion": true, + "protectedSettings": { + "StorageAccountKey1": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key1]", + "StorageAccountKey2": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key2]" + }, + "publisher": "Microsoft.Azure.ServiceFabric", + "settings": { + "clusterEndpoint": "[reference(parameters('clusterName')).clusterEndpoint]", + "nodeTypeRef": "[parameters('vmNodeType0Name')]", + "durabilityLevel": "Bronze", + "enableParallelJobs": true, + "nicPrefixOverride": "[parameters('subnet0Prefix')]", + "certificate": { + "thumbprint": "[parameters('certificateThumbprint')]", + "x509StoreName": "[parameters('certificateStoreValue')]" + } + }, + "typeHandlerVersion": "1.0" + } + }, + { + "name": "[concat('VMDiagnosticsVmExt','_vmNodeType0Name')]", + "properties": { + "type": "LinuxDiagnostic", + "autoUpgradeMinorVersion": true, + "protectedSettings": { + "storageAccountName": "[parameters('applicationDiagnosticsStorageAccountName')]", + "storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('applicationDiagnosticsStorageAccountName')),'2015-05-01-preview').key1]", + "storageAccountEndPoint": "https://core.windows.net/" + }, + "publisher": "Microsoft.OSTCExtensions", + "settings": { + "xmlCfg": "[base64(concat(variables('wadcfgxstart'),variables('wadmetricsresourceid0'),variables('wadcfgxend')))]", + "StorageAccount": "[parameters('applicationDiagnosticsStorageAccountName')]" + }, + "typeHandlerVersion": "2.3" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "[concat(parameters('nicName'), '-0')]", + "properties": { + "ipConfigurations": [ + { + "name": "[concat(parameters('nicName'),'-',0)]", + "properties": { + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('lbPoolID0')]" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "[variables('lbNatPoolID0')]" + } + ], + "subnet": { + "id": "[variables('subnet0Ref')]" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[parameters('adminUsername')]", + "computernamePrefix": "[parameters('vmNodeType0Name')]", + "secrets": [ + { + "sourceVault": { + "id": "[parameters('sourceVaultValue')]" + }, + "vaultCertificates": [ + { + "certificateUrl": "[parameters('certificateUrlValue')]" + } + ] + } + ] + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('vmImagePublisher')]", + "offer": "[parameters('vmImageOffer')]", + "sku": "[parameters('vmImageSku')]", + "version": "[parameters('vmImageVersion')]" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "[parameters('storageAccountType')]" + } + } + } + } + }, + "sku": { + "name": "[parameters('vmNodeType0Size')]", + "capacity": "[parameters('nt0InstanceCount')]", + "tier": "Standard" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "2017-07-01-preview", + "type": "Microsoft.ServiceFabric/clusters", + "name": "[parameters('clusterName')]", + "location": "[parameters('clusterLocation')]", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName'))]" + ], + "properties": { + "addonFeatures": [ + "DnsService" + ], + "certificate": { + "thumbprint": "[parameters('certificateThumbprint')]", + "x509StoreName": "[parameters('certificateStoreValue')]" + }, + "clientCertificateCommonNames": [], + "clientCertificateThumbprints": [], + "clusterCodeVersion": "6.0.120.1", + "clusterState": "Default", + "diagnosticsStorageAccountConfig": { + "blobEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]", + "protectedAccountKeyName": "StorageAccountKey1", + "queueEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.queue]", + "storageAccountName": "[parameters('supportLogStorageAccountName')]", + "tableEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.table]" + }, + "fabricSettings": [ + { + "parameters": [ + { + "name": "ClusterProtectionLevel", + "value": "[parameters('clusterProtectionLevel')]" + } + ], + "name": "Security" + } + ], + "managementEndpoint": "[concat('https://',reference(concat(parameters('lbIPName'),'-','0')).dnsSettings.fqdn,':',parameters('nt0fabricHttpGatewayPort'))]", + "nodeTypes": [ + { + "name": "[parameters('vmNodeType0Name')]", + "applicationPorts": { + "endPort": "[parameters('nt0applicationEndPort')]", + "startPort": "[parameters('nt0applicationStartPort')]" + }, + "clientConnectionEndpointPort": "[parameters('nt0fabricTcpGatewayPort')]", + "durabilityLevel": "Bronze", + "ephemeralPorts": { + "endPort": "[parameters('nt0ephemeralEndPort')]", + "startPort": "[parameters('nt0ephemeralStartPort')]" + }, + "httpGatewayEndpointPort": "[parameters('nt0fabricHttpGatewayPort')]", + "isPrimary": true, + "vmInstanceCount": "[parameters('nt0InstanceCount')]" + } + ], + "provisioningState": "Default", + "reliabilityLevel": "Silver", + "upgradeMode": "Manual", + "vmImage": "Linux" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + } + ], + "outputs": { + "clusterProperties": { + "value": "[reference(parameters('clusterName'))]", + "type": "object" + } + } +} \ No newline at end of file diff --git a/deploy/az/servicefabric/LinuxContainers/servicefabricdeploysecured.parameters.json b/deploy/az/servicefabric/LinuxContainers/servicefabricdeploysecured.parameters.json new file mode 100644 index 000000000..65875cb31 --- /dev/null +++ b/deploy/az/servicefabric/LinuxContainers/servicefabricdeploysecured.parameters.json @@ -0,0 +1,102 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterName": { + "value": "pro-eshop-sflinux-cluster" + }, + "clusterLocation": { + "value": "westus" + }, + "computeLocation": { + "value": "westus" + }, + "adminUserName": { + "value": "eshop" + }, + "adminPassword": { + "value": "Pass@word1" + }, + "nicName": { + "value": "NIC-eshopsflinsec" + }, + "publicIPAddressName": { + "value": "eshopsflinsec-PubIP" + }, + "dnsName": { + "value": "pro-eshop-sflinux-cluster" + }, + "virtualNetworkName": { + "value": "VNet-eshopsflin" + }, + "lbName": { + "value": "LB-eshopsflin" + }, + "lbIPName": { + "value": "LBIP-eshopsflin" + }, + "sourceVaultValue": { + "value": "your-value-check-keyvault-at-azure" + }, + "certificateUrlValue": { + "value": "your-value-check-keyvault-at-azure" + }, + "certificateThumbprint": { + "value": "your-value-check-keyvault-at-azure" + }, + "vmImageSku": { + "value": "16.04-LTS" + }, + "vmImageVersion": { + "value": "latest" + }, + "vmImagePublisher": { + "value": "Canonical" + }, + "nt0ephemeralStartPort": { + "value": 49152 + }, + "nt0ephemeralEndPort": { + "value": 65534 + }, + "nt0applicationStartPort": { + "value": 20000 + }, + "nt0applicationEndPort": { + "value": 30000 + }, + "nt0fabricTcpGatewayPort": { + "value": 19000 + }, + "nt0fabricHttpGatewayPort": { + "value": 19080 + }, + "webMvcHttpPort": { + "value": 5100 + }, + "webSpaHttpPort": { + "value": 5104 + }, + "webStatusHttpPort": { + "value": 5107 + }, + "IdSrvHttpRule": { + "value": 5105 + }, + "BasketApiHttpRule": { + "value": 5103 + }, + "CatalogApiHttpRule": { + "value": 5101 + }, + "OrderingApiHttpRule": { + "value": 5102 + }, + "MarketingApiHttpRule": { + "value": 5110 + }, + "LocationsApiHttpRule": { + "value": 5109 + } + } +} \ No newline at end of file diff --git a/deploy/az/servicefabric/WindowsContainers/gen-keyvaultcert.ps1 b/deploy/az/servicefabric/WindowsContainers/gen-keyvaultcert.ps1 new file mode 100644 index 000000000..c6fc34013 --- /dev/null +++ b/deploy/az/servicefabric/WindowsContainers/gen-keyvaultcert.ps1 @@ -0,0 +1,53 @@ +Param( + [parameter(Mandatory=$true)][string]$vaultName, + [parameter(Mandatory=$true)][string]$certName, + [parameter(Mandatory=$true)][string]$certPwd, + [parameter(Mandatory=$true)][string]$subjectName, + [parameter(Mandatory=$false)][string]$ValidityInMonths=12, + [parameter(Mandatory=$true)][string]$saveDir +) + + +#Log in Azure Account +Login-AzureRmAccount + + +# Create Cert in KeyVault +Write-Host "Creating certificate in Azure KeyVault..." -ForegroundColor Yellow +$policy = New-AzureKeyVaultCertificatePolicy -SubjectName $subjectName -IssuerName Self -ValidityInMonths $ValidityInMonths +Add-AzureKeyVaultCertificate -VaultName $vaultName -Name $certName -CertificatePolicy $policy + +# Downloading Certificate +Write-Host "Downloading Certificate from KeyVault..." -ForegroundColor Yellow + +$Stoploop = $false +$Retrycount = 0 + +do { + try { + + $kvSecret = Get-AzureKeyVaultSecret -VaultName $vaultName -Name $certName -ErrorAction SilentlyContinue + $kvSecretBytes = [System.Convert]::FromBase64String($kvSecret.SecretValueText) + $certCollection = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2Collection + $certCollection.Import($kvSecretBytes,$null,[System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::Exportable) + $protectedCertificateBytes = $certCollection.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Pkcs12, $certPwd) + [System.IO.File]::WriteAllBytes($saveDir + "\" + $certName + ".pfx", $protectedCertificateBytes) + + $Stoploop = $true + Write-Host "Finished!" -ForegroundColor Yellow + } + catch { + if ($Retrycount -gt 5){ + $Stoploop = $true + Write-Host "Not possible to retrieve the certificate!" -ForegroundColor Yellow + } + else { + Start-Sleep -Seconds 20 + $Retrycount = $Retrycount + 1 + } + } +} +While ($Stoploop -eq $false) + +# Show Certificate Values +Get-AzureKeyVaultCertificate -VaultName $vaultName -Name $certName \ No newline at end of file diff --git a/deploy/az/servicefabric/WindowsContainers/readme.md b/deploy/az/servicefabric/WindowsContainers/readme.md new file mode 100644 index 000000000..18aa8ad78 --- /dev/null +++ b/deploy/az/servicefabric/WindowsContainers/readme.md @@ -0,0 +1,138 @@ +# Deploying a Service Fabric cluster based on Windows nodes + +## A. Unsecured cluster (SF Windows cluster) +For a secured cluster, see option B. below. + +You can always deploy a SF cluster through the Azure portal, as explained in this article: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started-azure-cluster + +However, when creating a cluster, there are quite a few configurations to take into account, like enabling the internal DNS service or Reverse Proxy service, choosing between Linux/Windows, open/publish your application ports in the load-balancer and most of all (the most complex setup) how to create a secure cluster. + +Because of those reasons, we have created a set of ARM templates and scripts so you can create, re-create and configure the SF clusters much faster, as explained below: + +Within eShopOnContainers root folder, at the folder [..\deploy\az\servicefabric\WindowsContainers](https://github.com/dotnet-architecture/eShopOnContainers/tree/dev/deploy/az/servicefabric/WindowsContainers), you can find the ARM template `servicefabricdeploy.json` and its parameters file (`servicefabricdeploy.parameters.json`) to create a Service Fabric cluster environment for Windows Containers (NOT SECURED CLUSTER). + +## Edit the servicefabricdeploy.parameters.json file + +Edit the following params in `servicefabricdeploy.parameters.json` file to set your values: + +- clusterName: Name of your SF cluster +- clusterLocation: Datacenter location, like westus or westeurope +- computeLocation: Datacenter location, like westus or westeurope +- adminUserName: user-name for VMs administration +- adminPassword: user-password for VMs administration +- dnsName: Name assigned to your SF dns + +Optionally, you could modify which ports are opened in the LoadBalancer for the multiple eShopOnContainer apps and API services. +By default, they are setup as: +- webMvcHttpPort: 5100 +- webSpaHttpPort: 5104 +- webStatusHttpPort: 5107 +- IdSrvHttpRule: 5105 +- BasketApiHttpRule: 5103 +- CatalogApiHttpRule: 5101 +- OrderingApiHttpRule: 5102 +- MarketingApiHttpRule: 5110 +- LocationsApiHttpRule: 5109 + +## Deploy the Service Fabric cluster using the script and ARM templates + +Once parameter file is edited you can deploy it using [create-resources script](../readme.md). + +For example, to deploy the cluster to a new resourcegroup located in westus, using the Command Prompt, go to `deploy\az` folder and type: +``` +create-resources.cmd servicefabric\WindowsContainers\servicefabricdeploy qa-eshop-sfwin-resgrp -c westus +``` + +You should see a similar execution to the following: +![image](https://user-images.githubusercontent.com/1712635/31638979-4881d7aa-b28b-11e7-873c-e1185043a9eb.png) + +Now, if you go to your subscription in Azure, you should be able to see the SF cluster already created and available, like in the following image: + +![image](https://user-images.githubusercontent.com/1712635/31639043-9b26c786-b28b-11e7-8d59-eeea97f74176.png) + +In this case, this is an unsecured SF cluster with a single Windows node, good for initial tests and getting started with SF. + + +## B. Secured cluster (SF Windows cluster) + +Within eShopOnContainers root folder, at the folder [..\deploy\az\servicefabric\WindowsContainers](https://github.com/dotnet-architecture/eShopOnContainers/tree/dev/deploy/az/servicefabric/WindowsContainers), you can find the ARM template `servicefabricdeploysecured.json` and its parameter file (`servicefabricdeploysecured.parameters.json`) to create a secured Service Fabric cluster environment for Windows Containers (IN THIS CASE, IT IS A SECURED CLUSTER USING A CERTIFICATE). + +## Create Azure Keyvault service +Go to PortalAzure and create a Keyvault service. Make sure Enable access for deployment checkboxes are selected. + +![image](https://user-images.githubusercontent.com/1712635/31638848-9b266530-b28a-11e7-953b-1e3ec1a54f77.png) + +## Generate a certificate in Azure Keyvault +In a POWER-SHELL window, move to the folder [..\deploy\az\servicefabric\WindowsContainers](https://github.com/dotnet-architecture/eShopOnContainers/tree/dev/deploy/az/servicefabric/WindowsContainers). + +**Select your Azure subscription** You might have [several Azure subscriptions](https://docs.microsoft.com/en-us/cli/azure/account#set) as shown if you type the following. + + >``` + >az account list + >``` + If you have multiple subscription accounts, you first need to select the Azure subscription account you want to target. Type the following: + >``` + >az account set --subscription "Your Azure Subscription Name or ID" + >``` + +**Execute the gen-keyvaultcert.ps1 script** to generate and download a certificate from Keyvault. +Make sure you're going to run it against the Azure subscription you mean it. + +You might need to authenticate from the browser when running this PowerShell script. + +``` +.\gen-keyvaultcert.ps1 -vaultName -certName -certPwd -subjectName CN=.westus.cloudapp.azure.com -saveDir C:\Users\\Downloads + +``` +You should see a similar execution to the following: +![image](https://user-images.githubusercontent.com/1712635/31640172-93efcca0-b291-11e7-970e-5b5e6bf07042.png) + +IMPORTANT: At this point, copy/cut the .PFX certificate file saved in the downloads forlder and save it in a secure place. + +## Install the certificate +Install the certificate (by double-clicking on the .PFX file) under 'Current User' store location (by default location) and check it as exportable. + + + +Also, install the same certificate as CA (Certificate Authority) under Current User, too. + +![image](https://user-images.githubusercontent.com/1712635/31642795-c6ffa434-b2a1-11e7-8ff8-2a63549a780e.png) + +## Editing servicefabricdeploysecured.parameters.json file + +Edit the parameters in `servicefabricdeploysecured.parameters.json` in a similar way you can do with the unsecured .json file shown above (clusterName, dnsName, etc.), plus edit the following values: + +- sourceVaultValue: Your Azure Keyvault's RESOURCE ID (check Azure keyvault properties, similar to: /subscriptions/e1234ac1-c09c-3jaf-6767-98b3c5f1f246/resourceGroups/eshop-global-resgrp/providers/Microsoft.KeyVault/vaults/eshopkeyvault") + +- certificateUrlValue: Your certificate Secret Identifier (check Azure Keyvault secret certificate properties, should be in the format of https://.vault.azure.net:443/secrets/, similar to: +https://eshopkeyvault.vault.azure.net/secrets/pro-eshop-sfwin-cluster-cert/w647684642cGE2sj83b3hfe4h8e08963) + +- certificateThumbprint: certificate thumbprint (check azure Keyvault certificate thumbprint, something like 88JK453486D55A6818573G0DW9100365HDK70HDK) + +## Deploy the secured SF cluster (Windows nodes) + +Once parameters file is edited you can deploy it using [create-resources script](../readme.md). + +Use a command prompt window positioned into the deploy\az folder. + +``` +create-resources.cmd servicefabric\WindowsContainers\servicefabricdeploysecured pro-eshop-sfwin-resgrp -c westus +``` +The execution should be something like the following: + +![image](https://user-images.githubusercontent.com/1712635/31641955-0bc9d59e-b29d-11e7-9230-5ba02843d98a.png) + +Once the cluster is created you can explore it with Azure's portal, like in the following image: +![image](https://user-images.githubusercontent.com/1712635/31642431-bf1c409e-b29f-11e7-980f-a7685a45108c.png) + +In this case, the ARM template is creating a 5 node cluster when creating a SECURE cluster for "production". + + +# Deploy eShopOnServiceFabric with Visual Studio. + +Modify the cloud.xml file of each Service Fabric application in PublishProfile directory and set your certificate settings to be able to deploy eshopOnContainers in the secured cluster: + + + + + diff --git a/deploy/az/servicefabric/WindowsContainers/servicefabricdeploy.json b/deploy/az/servicefabric/WindowsContainers/servicefabricdeploy.json new file mode 100644 index 000000000..073dc9653 --- /dev/null +++ b/deploy/az/servicefabric/WindowsContainers/servicefabricdeploy.json @@ -0,0 +1,853 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterLocation": { + "type": "string", + "metadata": { + "description": "Location of the Cluster" + } + }, + "clusterName": { + "type": "string", + "defaultValue": "Cluster", + "metadata": { + "description": "Name of your cluster - Between 3 and 23 characters. Letters and numbers only" + } + }, + "nt0applicationStartPort": { + "type": "int", + "defaultValue": 20000 + }, + "nt0applicationEndPort": { + "type": "int", + "defaultValue": 30000 + }, + "nt0ephemeralStartPort": { + "type": "int", + "defaultValue": 49152 + }, + "nt0ephemeralEndPort": { + "type": "int", + "defaultValue": 65534 + }, + "nt0fabricTcpGatewayPort": { + "type": "int", + "defaultValue": 19000 + }, + "nt0fabricHttpGatewayPort": { + "type": "int", + "defaultValue": 19080 + }, + "nt0reverseProxyEndpointPort": { + "type": "int", + "defaultValue": 19081 + }, + "webMvcHttpPort": { + "type": "int", + "defaultValue": 5100 + }, + "webSpaHttpPort": { + "type": "int", + "defaultValue": 5104 + }, + "webStatusHttpPort": { + "type": "int", + "defaultValue": 5107 + }, + "IdSrvHttpRule": { + "type": "int", + "defaultValue": 5105 + }, + "BasketApiHttpRule": { + "type": "int", + "defaultValue": 5103 + }, + "CatalogApiHttpRule": { + "type": "int", + "defaultValue": 5101 + }, + "OrderingApiHttpRule": { + "type": "int", + "defaultValue": 5102 + }, + "MarketingApiHttpRule": { + "type": "int", + "defaultValue": 5110 + }, + "LocationsApiHttpRule": { + "type": "int", + "defaultValue": 5109 + }, + "subnet0Name": { + "type": "string", + "defaultValue": "Subnet-0" + }, + "subnet0Prefix": { + "type": "string", + "defaultValue": "10.0.0.0/24" + }, + "computeLocation": { + "type": "string" + }, + "publicIPAddressName": { + "type": "string", + "defaultValue": "PublicIP-VM" + }, + "publicIPAddressType": { + "type": "string", + "allowedValues": [ + "Dynamic" + ], + "defaultValue": "Dynamic" + }, + "vmStorageAccountContainerName": { + "type": "string", + "defaultValue": "vhds" + }, + "adminUserName": { + "type": "string", + "defaultValue": "testadm", + "metadata": { + "description": "Remote desktop user Id" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Remote desktop user password. Must be a strong password" + } + }, + "virtualNetworkName": { + "type": "string", + "defaultValue": "VNet" + }, + "addressPrefix": { + "type": "string", + "defaultValue": "10.0.0.0/16" + }, + "dnsName": { + "type": "string" + }, + "nicName": { + "type": "string", + "defaultValue": "NIC" + }, + "lbName": { + "type": "string", + "defaultValue": "LoadBalancer" + }, + "lbIPName": { + "type": "string", + "defaultValue": "PublicIP-LB-FE" + }, + "overProvision": { + "type": "string", + "defaultValue": "false" + }, + "vmImagePublisher": { + "type": "string", + "defaultValue": "MicrosoftWindowsServer" + }, + "vmImageOffer": { + "type": "string", + "defaultValue": "WindowsServer" + }, + "vmImageSku": { + "type": "string", + "defaultValue": "2012-R2-Datacenter" + }, + "vmImageVersion": { + "type": "string", + "defaultValue": "latest" + }, + "storageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the VM image storage account" + } + }, + "supportLogStorageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the support log storage account" + } + }, + "supportLogStorageAccountName": { + "type": "string", + "defaultValue": "[toLower( concat('sflogs', uniqueString(resourceGroup().id),'2'))]", + "metadata": { + "description": "Name for the storage account that contains support logs from the cluster" + } + }, + "applicationDiagnosticsStorageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the application diagnostics storage account" + } + }, + "applicationDiagnosticsStorageAccountName": { + "type": "string", + "defaultValue": "[toLower(concat(uniqueString(resourceGroup().id), '3' ))]", + "metadata": { + "description": "Name for the storage account that contains application diagnostics data from the cluster" + } + }, + "nt0InstanceCount": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "Instance count for node type" + } + }, + "vmNodeType0Name": { + "type": "string", + "defaultValue": "primary", + "maxLength": 9 + }, + "vmNodeType0Size": { + "type": "string", + "defaultValue": "Standard_D2_v2" + } + }, + "variables": { + "vmssApiVersion": "2017-03-30", + "lbApiVersion": "2015-06-15", + "vNetApiVersion": "2015-06-15", + "storageApiVersion": "2016-01-01", + "publicIPApiVersion": "2015-06-15", + "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]", + "subnet0Ref": "[concat(variables('vnetID'),'/subnets/',parameters('subnet0Name'))]", + "lbID0": "[resourceId('Microsoft.Network/loadBalancers', concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]", + "lbIPConfig0": "[concat(variables('lbID0'),'/frontendIPConfigurations/LoadBalancerIPConfig')]", + "lbPoolID0": "[concat(variables('lbID0'),'/backendAddressPools/LoadBalancerBEAddressPool')]", + "lbProbeID0": "[concat(variables('lbID0'),'/probes/FabricGatewayProbe')]", + "lbHttpProbeID0": "[concat(variables('lbID0'),'/probes/FabricHttpGatewayProbe')]", + "lbNatPoolID0": "[concat(variables('lbID0'),'/inboundNatPools/LoadBalancerBEAddressNatPool')]", + "vmStorageAccountName0": "[toLower(concat(uniqueString(resourceGroup().id), '1', '0' ))]", + "uniqueStringArray0": [ + "[concat(variables('vmStorageAccountName0'), '0')]", + "[concat(variables('vmStorageAccountName0'), '1')]", + "[concat(variables('vmStorageAccountName0'), '2')]", + "[concat(variables('vmStorageAccountName0'), '3')]", + "[concat(variables('vmStorageAccountName0'), '4')]" + ] + }, + "resources": [ + { + "apiVersion": "[variables('storageApiVersion')]", + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('supportLogStorageAccountName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": {}, + "kind": "Storage", + "sku": { + "name": "[parameters('supportLogStorageAccountType')]" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('storageApiVersion')]", + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('applicationDiagnosticsStorageAccountName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": {}, + "kind": "Storage", + "sku": { + "name": "[parameters('applicationDiagnosticsStorageAccountType')]" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('vNetApiVersion')]", + "type": "Microsoft.Network/virtualNetworks", + "name": "[parameters('virtualNetworkName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('addressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet0Name')]", + "properties": { + "addressPrefix": "[parameters('subnet0Prefix')]" + } + } + ] + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('publicIPApiVersion')]", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[concat(parameters('lbIPName'),'-','0')]", + "location": "[parameters('computeLocation')]", + "properties": { + "dnsSettings": { + "domainNameLabel": "[parameters('dnsName')]" + }, + "publicIPAllocationMethod": "Dynamic" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('lbApiVersion')]", + "type": "Microsoft.Network/loadBalancers", + "name": "[concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name'))]", + "location": "[parameters('computeLocation')]", + "dependsOn": [ + "[concat('Microsoft.Network/publicIPAddresses/',concat(parameters('lbIPName'),'-','0'))]" + ], + "properties": { + "frontendIPConfigurations": [ + { + "name": "LoadBalancerIPConfig", + "properties": { + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(parameters('lbIPName'),'-','0'))]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "LoadBalancerBEAddressPool", + "properties": {} + } + ], + "loadBalancingRules": [ + { + "name": "LBRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('nt0fabricTcpGatewayPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('nt0fabricTcpGatewayPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "LBHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('nt0fabricHttpGatewayPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('nt0fabricHttpGatewayPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "ReverseProxyHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('nt0reverseProxyEndpointPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('nt0reverseProxyEndpointPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "WebMVCHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webMvcHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webMvcHttpPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "WebSPAHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webSpaHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webSpaHttpPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "WebStatusHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webStatusHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webStatusHttpPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "IdSrvHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('IdSrvHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('IdSrvHttpRule')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "BasketApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('BasketApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('BasketApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "CatalogApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('CatalogApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('CatalogApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "OrderingApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('OrderingApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('OrderingApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "MarketingApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('MarketingApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('MarketingApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "LocationsApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('LocationsApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('LocationsApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + } + ], + "probes": [ + { + "name": "FabricGatewayProbe", + "properties": { + "intervalInSeconds": 5, + "numberOfProbes": 2, + "port": "[parameters('nt0fabricTcpGatewayPort')]", + "protocol": "tcp" + } + }, + { + "name": "FabricHttpGatewayProbe", + "properties": { + "intervalInSeconds": 5, + "numberOfProbes": 2, + "port": "[parameters('nt0fabricHttpGatewayPort')]", + "protocol": "tcp" + } + } + ], + "inboundNatPools": [ + { + "name": "LoadBalancerBEAddressNatPool", + "properties": { + "backendPort": "3389", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPortRangeEnd": "4500", + "frontendPortRangeStart": "3389", + "protocol": "tcp" + } + } + ] + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('storageApiVersion')]", + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('uniqueStringArray0')[copyIndex()]]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": {}, + "copy": { + "name": "storageLoop", + "count": 5 + }, + "kind": "Storage", + "sku": { + "name": "[parameters('storageAccountType')]" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('vmssApiVersion')]", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "name": "[parameters('vmNodeType0Name')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[0])]", + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[1])]", + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[2])]", + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[3])]", + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[4])]", + "[concat('Microsoft.Network/loadBalancers/', concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName'))]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('applicationDiagnosticsStorageAccountName'))]" + ], + "properties": { + "overprovision": "[parameters('overProvision')]", + "upgradePolicy": { + "mode": "Automatic" + }, + "virtualMachineProfile": { + "extensionProfile": { + "extensions": [ + { + "name": "[concat(parameters('vmNodeType0Name'),'_ServiceFabricNode')]", + "properties": { + "type": "ServiceFabricNode", + "autoUpgradeMinorVersion": true, + "protectedSettings": { + "StorageAccountKey1": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key1]", + "StorageAccountKey2": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key2]" + }, + "publisher": "Microsoft.Azure.ServiceFabric", + "settings": { + "clusterEndpoint": "[reference(parameters('clusterName')).clusterEndpoint]", + "nodeTypeRef": "[parameters('vmNodeType0Name')]", + "dataPath": "D:\\\\SvcFab", + "durabilityLevel": "Bronze", + "enableParallelJobs": true, + "nicPrefixOverride": "[parameters('subnet0Prefix')]" + }, + "typeHandlerVersion": "1.0" + } + }, + { + "name": "[concat('VMDiagnosticsVmExt','_vmNodeType0Name')]", + "properties": { + "type": "IaaSDiagnostics", + "autoUpgradeMinorVersion": true, + "protectedSettings": { + "storageAccountName": "[parameters('applicationDiagnosticsStorageAccountName')]", + "storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('applicationDiagnosticsStorageAccountName')),'2015-05-01-preview').key1]", + "storageAccountEndPoint": "https://core.windows.net/" + }, + "publisher": "Microsoft.Azure.Diagnostics", + "settings": { + "WadCfg": { + "DiagnosticMonitorConfiguration": { + "overallQuotaInMB": "50000", + "EtwProviders": { + "EtwEventSourceProviderConfiguration": [ + { + "provider": "Microsoft-ServiceFabric-Actors", + "scheduledTransferKeywordFilter": "1", + "scheduledTransferPeriod": "PT5M", + "DefaultEvents": { + "eventDestination": "ServiceFabricReliableActorEventTable" + } + }, + { + "provider": "Microsoft-ServiceFabric-Services", + "scheduledTransferPeriod": "PT5M", + "DefaultEvents": { + "eventDestination": "ServiceFabricReliableServiceEventTable" + } + } + ], + "EtwManifestProviderConfiguration": [ + { + "provider": "cbd93bc2-71e5-4566-b3a7-595d8eeca6e8", + "scheduledTransferLogLevelFilter": "Information", + "scheduledTransferKeywordFilter": "4611686018427387904", + "scheduledTransferPeriod": "PT5M", + "DefaultEvents": { + "eventDestination": "ServiceFabricSystemEventTable" + } + } + ] + } + } + }, + "StorageAccount": "[parameters('applicationDiagnosticsStorageAccountName')]" + }, + "typeHandlerVersion": "1.5" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "[concat(parameters('nicName'), '-0')]", + "properties": { + "ipConfigurations": [ + { + "name": "[concat(parameters('nicName'),'-',0)]", + "properties": { + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('lbPoolID0')]" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "[variables('lbNatPoolID0')]" + } + ], + "subnet": { + "id": "[variables('subnet0Ref')]" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[parameters('adminUsername')]", + "computernamePrefix": "[parameters('vmNodeType0Name')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('vmImagePublisher')]", + "offer": "[parameters('vmImageOffer')]", + "sku": "[parameters('vmImageSku')]", + "version": "[parameters('vmImageVersion')]" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "vhdContainers": [ + "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[0]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]", + "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[1]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]", + "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[2]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]", + "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[3]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]", + "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[4]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]" + ], + "name": "vmssosdisk" + } + } + } + }, + "sku": { + "name": "[parameters('vmNodeType0Size')]", + "capacity": "[parameters('nt0InstanceCount')]", + "tier": "Standard" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "2017-07-01-preview", + "type": "Microsoft.ServiceFabric/clusters", + "name": "[parameters('clusterName')]", + "location": "[parameters('clusterLocation')]", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName'))]" + ], + "properties": { + "addonFeatures": [ + "DnsService" + ], + "clientCertificateCommonNames": [], + "clientCertificateThumbprints": [], + "clusterCodeVersion": "5.7.207.9494", + "clusterState": "Default", + "diagnosticsStorageAccountConfig": { + "blobEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]", + "protectedAccountKeyName": "StorageAccountKey1", + "queueEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.queue]", + "storageAccountName": "[parameters('supportLogStorageAccountName')]", + "tableEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.table]" + }, + "fabricSettings": [], + "managementEndpoint": "[concat('http://',reference(concat(parameters('lbIPName'),'-','0')).dnsSettings.fqdn,':',parameters('nt0fabricHttpGatewayPort'))]", + "nodeTypes": [ + { + "name": "[parameters('vmNodeType0Name')]", + "applicationPorts": { + "endPort": "[parameters('nt0applicationEndPort')]", + "startPort": "[parameters('nt0applicationStartPort')]" + }, + "clientConnectionEndpointPort": "[parameters('nt0fabricTcpGatewayPort')]", + "durabilityLevel": "Bronze", + "ephemeralPorts": { + "endPort": "[parameters('nt0ephemeralEndPort')]", + "startPort": "[parameters('nt0ephemeralStartPort')]" + }, + "httpGatewayEndpointPort": "[parameters('nt0fabricHttpGatewayPort')]", + "isPrimary": true, + "reverseProxyEndpointPort": "[parameters('nt0reverseProxyEndpointPort')]", + "vmInstanceCount": "[parameters('nt0InstanceCount')]" + } + ], + "provisioningState": "Default", + "reliabilityLevel": "None", + "upgradeMode": "Manual", + "vmImage": "Windows" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + } + ], + "outputs": { + "clusterProperties": { + "value": "[reference(parameters('clusterName'))]", + "type": "object" + } + } +} \ No newline at end of file diff --git a/deploy/az/servicefabric/WindowsContainers/servicefabricdeploy.parameters.json b/deploy/az/servicefabric/WindowsContainers/servicefabricdeploy.parameters.json new file mode 100644 index 000000000..2c214b754 --- /dev/null +++ b/deploy/az/servicefabric/WindowsContainers/servicefabricdeploy.parameters.json @@ -0,0 +1,97 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterName": { + "value": "qa-eshop-sfwin-cluster" + }, + "clusterLocation": { + "value": "westus" + }, + "computeLocation": { + "value": "westus" + }, + "adminUserName": { + "value": "eshop" + }, + "adminPassword": { + "value": "Your_complex_Pass@word1" + }, + "nicName": { + "value": "NIC-eshopsfwin" + }, + "publicIPAddressName": { + "value": "eshopsfwin-PubIP" + }, + "dnsName": { + "value": "qa-eshop-sfwin-cluster" + }, + "virtualNetworkName": { + "value": "VNet-eshopsfwin" + }, + "lbName": { + "value": "LB-eshopsfwin" + }, + "lbIPName": { + "value": "LBIP-eshopsfwin" + }, + "applicationDiagnosticsStorageAccountName": { + "value": "sfdgqaeshopsfwin" + }, + "supportLogStorageAccountName": { + "value": "sflogsqaeshopsfwin" + }, + "vmImageSku": { + "value": "2016-Datacenter-with-Containers" + }, + "nt0ephemeralStartPort": { + "value": 49152 + }, + "nt0ephemeralEndPort": { + "value": 65534 + }, + "nt0applicationStartPort": { + "value": 20000 + }, + "nt0applicationEndPort": { + "value": 30000 + }, + "nt0fabricTcpGatewayPort": { + "value": 19000 + }, + "nt0fabricHttpGatewayPort": { + "value": 19080 + }, + "nt0reverseProxyEndpointPort": { + "value": 19081 + }, + "webMvcHttpPort": { + "value": 5100 + }, + "webSpaHttpPort": { + "value": 5104 + }, + "webStatusHttpPort": { + "value": 5107 + }, + "IdSrvHttpRule": { + "value": 5105 + }, + "BasketApiHttpRule": { + "value": 5103 + }, + "CatalogApiHttpRule": { + "value": 5101 + }, + "OrderingApiHttpRule": { + "value": 5102 + }, + "MarketingApiHttpRule": { + "value": 5110 + }, + "LocationsApiHttpRule": { + "value": 5109 + } + } +} + diff --git a/deploy/az/servicefabric/WindowsContainers/servicefabricdeploysecured.json b/deploy/az/servicefabric/WindowsContainers/servicefabricdeploysecured.json new file mode 100644 index 000000000..843f5c0d1 --- /dev/null +++ b/deploy/az/servicefabric/WindowsContainers/servicefabricdeploysecured.json @@ -0,0 +1,924 @@ +{ + "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterLocation": { + "type": "string", + "metadata": { + "description": "Location of the Cluster" + } + }, + "clusterName": { + "type": "string", + "defaultValue": "Cluster", + "metadata": { + "description": "Name of your cluster - Between 3 and 23 characters. Letters and numbers only" + } + }, + "nt0applicationStartPort": { + "type": "int", + "defaultValue": 20000 + }, + "nt0applicationEndPort": { + "type": "int", + "defaultValue": 30000 + }, + "nt0ephemeralStartPort": { + "type": "int", + "defaultValue": 49152 + }, + "nt0ephemeralEndPort": { + "type": "int", + "defaultValue": 65534 + }, + "nt0fabricTcpGatewayPort": { + "type": "int", + "defaultValue": 19000 + }, + "nt0fabricHttpGatewayPort": { + "type": "int", + "defaultValue": 19080 + }, + "nt0reverseProxyEndpointPort": { + "type": "int", + "defaultValue": 19081 + }, + "webMvcHttpPort": { + "type": "int", + "defaultValue": 5100 + }, + "webSpaHttpPort": { + "type": "int", + "defaultValue": 5104 + }, + "webStatusHttpPort": { + "type": "int", + "defaultValue": 5107 + }, + "IdSrvHttpRule": { + "type": "int", + "defaultValue": 5105 + }, + "BasketApiHttpRule": { + "type": "int", + "defaultValue": 5103 + }, + "CatalogApiHttpRule": { + "type": "int", + "defaultValue": 5101 + }, + "OrderingApiHttpRule": { + "type": "int", + "defaultValue": 5102 + }, + "MarketingApiHttpRule": { + "type": "int", + "defaultValue": 5110 + }, + "LocationsApiHttpRule": { + "type": "int", + "defaultValue": 5109 + }, + "subnet0Name": { + "type": "string", + "defaultValue": "Subnet-0" + }, + "subnet0Prefix": { + "type": "string", + "defaultValue": "10.0.0.0/24" + }, + "computeLocation": { + "type": "string" + }, + "publicIPAddressName": { + "type": "string", + "defaultValue": "PublicIP-VM" + }, + "publicIPAddressType": { + "type": "string", + "allowedValues": [ + "Dynamic" + ], + "defaultValue": "Dynamic" + }, + "vmStorageAccountContainerName": { + "type": "string", + "defaultValue": "vhds" + }, + "adminUserName": { + "type": "string", + "defaultValue": "testadm", + "metadata": { + "description": "Remote desktop user Id" + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Remote desktop user password. Must be a strong password" + } + }, + "virtualNetworkName": { + "type": "string", + "defaultValue": "VNet" + }, + "addressPrefix": { + "type": "string", + "defaultValue": "10.0.0.0/16" + }, + "dnsName": { + "type": "string" + }, + "nicName": { + "type": "string", + "defaultValue": "NIC" + }, + "lbName": { + "type": "string", + "defaultValue": "LoadBalancer" + }, + "lbIPName": { + "type": "string", + "defaultValue": "PublicIP-LB-FE" + }, + "overProvision": { + "type": "string", + "defaultValue": "false" + }, + "vmImagePublisher": { + "type": "string", + "defaultValue": "MicrosoftWindowsServer" + }, + "vmImageOffer": { + "type": "string", + "defaultValue": "WindowsServer" + }, + "vmImageSku": { + "type": "string", + "defaultValue": "2012-R2-Datacenter" + }, + "vmImageVersion": { + "type": "string", + "defaultValue": "latest" + }, + "clusterProtectionLevel": { + "type": "string", + "allowedValues": [ + "None", + "Sign", + "EncryptAndSign" + ], + "defaultValue": "EncryptAndSign", + "metadata": { + "description": "Protection level.Three values are allowed - EncryptAndSign, Sign, None. It is best to keep the default of EncryptAndSign, unless you have a need not to" + } + }, + "certificateStoreValue": { + "type": "string", + "allowedValues": [ + "My" + ], + "defaultValue": "My", + "metadata": { + "description": "The store name where the cert will be deployed in the virtual machine" + } + }, + "certificateThumbprint": { + "type": "string", + "metadata": { + "description": "Certificate Thumbprint" + } + }, + "sourceVaultValue": { + "type": "string", + "metadata": { + "description": "Resource Id of the key vault, is should be in the format of /subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults/" + } + }, + "certificateUrlValue": { + "type": "string", + "metadata": { + "description": "Refers to the location URL in your key vault where the certificate was uploaded, it is should be in the format of https://.vault.azure.net:443/secrets/" + } + }, + "storageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the VM image storage account" + } + }, + "supportLogStorageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the support log storage account" + } + }, + "supportLogStorageAccountName": { + "type": "string", + "defaultValue": "[toLower( concat('sflogs', uniqueString(resourceGroup().id),'2'))]", + "metadata": { + "description": "Name for the storage account that contains support logs from the cluster" + } + }, + "applicationDiagnosticsStorageAccountType": { + "type": "string", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS" + ], + "defaultValue": "Standard_LRS", + "metadata": { + "description": "Replication option for the application diagnostics storage account" + } + }, + "applicationDiagnosticsStorageAccountName": { + "type": "string", + "defaultValue": "[toLower(concat(uniqueString(resourceGroup().id), '3' ))]", + "metadata": { + "description": "Name for the storage account that contains application diagnostics data from the cluster" + } + }, + "nt0InstanceCount": { + "type": "int", + "defaultValue": 5, + "metadata": { + "description": "Instance count for node type" + } + }, + "vmNodeType0Name": { + "type": "string", + "defaultValue": "primary", + "maxLength": 9 + }, + "vmNodeType0Size": { + "type": "string", + "defaultValue": "Standard_D2_v2" + } + }, + "variables": { + "vmssApiVersion": "2017-03-30", + "lbApiVersion": "2015-06-15", + "vNetApiVersion": "2015-06-15", + "storageApiVersion": "2016-01-01", + "publicIPApiVersion": "2015-06-15", + "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',parameters('virtualNetworkName'))]", + "subnet0Ref": "[concat(variables('vnetID'),'/subnets/',parameters('subnet0Name'))]", + "lbID0": "[resourceId('Microsoft.Network/loadBalancers', concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]", + "lbIPConfig0": "[concat(variables('lbID0'),'/frontendIPConfigurations/LoadBalancerIPConfig')]", + "lbPoolID0": "[concat(variables('lbID0'),'/backendAddressPools/LoadBalancerBEAddressPool')]", + "lbProbeID0": "[concat(variables('lbID0'),'/probes/FabricGatewayProbe')]", + "lbHttpProbeID0": "[concat(variables('lbID0'),'/probes/FabricHttpGatewayProbe')]", + "lbNatPoolID0": "[concat(variables('lbID0'),'/inboundNatPools/LoadBalancerBEAddressNatPool')]", + "vmStorageAccountName0": "[toLower(concat(uniqueString(resourceGroup().id), '1', '0' ))]", + "uniqueStringArray0": [ + "[concat(variables('vmStorageAccountName0'), '0')]", + "[concat(variables('vmStorageAccountName0'), '1')]", + "[concat(variables('vmStorageAccountName0'), '2')]", + "[concat(variables('vmStorageAccountName0'), '3')]", + "[concat(variables('vmStorageAccountName0'), '4')]" + ] + }, + "resources": [ + { + "apiVersion": "[variables('storageApiVersion')]", + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('supportLogStorageAccountName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": {}, + "kind": "Storage", + "sku": { + "name": "[parameters('supportLogStorageAccountType')]" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('storageApiVersion')]", + "type": "Microsoft.Storage/storageAccounts", + "name": "[parameters('applicationDiagnosticsStorageAccountName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": {}, + "kind": "Storage", + "sku": { + "name": "[parameters('applicationDiagnosticsStorageAccountType')]" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('vNetApiVersion')]", + "type": "Microsoft.Network/virtualNetworks", + "name": "[parameters('virtualNetworkName')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('addressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnet0Name')]", + "properties": { + "addressPrefix": "[parameters('subnet0Prefix')]" + } + } + ] + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('publicIPApiVersion')]", + "type": "Microsoft.Network/publicIPAddresses", + "name": "[concat(parameters('lbIPName'),'-','0')]", + "location": "[parameters('computeLocation')]", + "properties": { + "dnsSettings": { + "domainNameLabel": "[parameters('dnsName')]" + }, + "publicIPAllocationMethod": "Dynamic" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('lbApiVersion')]", + "type": "Microsoft.Network/loadBalancers", + "name": "[concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name'))]", + "location": "[parameters('computeLocation')]", + "dependsOn": [ + "[concat('Microsoft.Network/publicIPAddresses/',concat(parameters('lbIPName'),'-','0'))]" + ], + "properties": { + "frontendIPConfigurations": [ + { + "name": "LoadBalancerIPConfig", + "properties": { + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses',concat(parameters('lbIPName'),'-','0'))]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "LoadBalancerBEAddressPool", + "properties": {} + } + ], + "loadBalancingRules": [ + { + "name": "LBRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('nt0fabricTcpGatewayPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('nt0fabricTcpGatewayPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "LBHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('nt0fabricHttpGatewayPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('nt0fabricHttpGatewayPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "ReverseProxyHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('nt0reverseProxyEndpointPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('nt0reverseProxyEndpointPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "WebMVCHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webMvcHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webMvcHttpPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "WebSPAHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webSpaHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webSpaHttpPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "WebStatusHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('webStatusHttpPort')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('webStatusHttpPort')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "IdSrvHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('IdSrvHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('IdSrvHttpRule')]", + "idleTimeoutInMinutes": "5", + "probe": { + "id": "[variables('lbHttpProbeID0')]" + }, + "protocol": "tcp" + } + }, + { + "name": "BasketApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('BasketApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('BasketApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "CatalogApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('CatalogApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('CatalogApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "OrderingApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('OrderingApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('OrderingApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "MarketingApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('MarketingApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('MarketingApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + }, + { + "name": "LocationsApiHttpRule", + "properties": { + "backendAddressPool": { + "id": "[variables('lbPoolID0')]" + }, + "backendPort": "[parameters('LocationsApiHttpRule')]", + "enableFloatingIP": "false", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPort": "[parameters('LocationsApiHttpRule')]", + "idleTimeoutInMinutes": "5", + "protocol": "tcp" + } + } + ], + "probes": [ + { + "name": "FabricGatewayProbe", + "properties": { + "intervalInSeconds": 5, + "numberOfProbes": 2, + "port": "[parameters('nt0fabricTcpGatewayPort')]", + "protocol": "tcp" + } + }, + { + "name": "FabricHttpGatewayProbe", + "properties": { + "intervalInSeconds": 5, + "numberOfProbes": 2, + "port": "[parameters('nt0fabricHttpGatewayPort')]", + "protocol": "tcp" + } + } + ], + "inboundNatPools": [ + { + "name": "LoadBalancerBEAddressNatPool", + "properties": { + "backendPort": "3389", + "frontendIPConfiguration": { + "id": "[variables('lbIPConfig0')]" + }, + "frontendPortRangeEnd": "4500", + "frontendPortRangeStart": "3389", + "protocol": "tcp" + } + } + ] + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('storageApiVersion')]", + "type": "Microsoft.Storage/storageAccounts", + "name": "[variables('uniqueStringArray0')[copyIndex()]]", + "location": "[parameters('computeLocation')]", + "dependsOn": [], + "properties": {}, + "copy": { + "name": "storageLoop", + "count": 5 + }, + "kind": "Storage", + "sku": { + "name": "[parameters('storageAccountType')]" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "[variables('vmssApiVersion')]", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "name": "[parameters('vmNodeType0Name')]", + "location": "[parameters('computeLocation')]", + "dependsOn": [ + "[concat('Microsoft.Network/virtualNetworks/', parameters('virtualNetworkName'))]", + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[0])]", + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[1])]", + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[2])]", + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[3])]", + "[concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[4])]", + "[concat('Microsoft.Network/loadBalancers/', concat('LB','-', parameters('clusterName'),'-',parameters('vmNodeType0Name')))]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName'))]", + "[concat('Microsoft.Storage/storageAccounts/', parameters('applicationDiagnosticsStorageAccountName'))]" + ], + "properties": { + "overprovision": "[parameters('overProvision')]", + "upgradePolicy": { + "mode": "Automatic" + }, + "virtualMachineProfile": { + "extensionProfile": { + "extensions": [ + { + "name": "[concat(parameters('vmNodeType0Name'),'_ServiceFabricNode')]", + "properties": { + "type": "ServiceFabricNode", + "autoUpgradeMinorVersion": true, + "protectedSettings": { + "StorageAccountKey1": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key1]", + "StorageAccountKey2": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('supportLogStorageAccountName')),'2015-05-01-preview').key2]" + }, + "publisher": "Microsoft.Azure.ServiceFabric", + "settings": { + "clusterEndpoint": "[reference(parameters('clusterName')).clusterEndpoint]", + "nodeTypeRef": "[parameters('vmNodeType0Name')]", + "dataPath": "D:\\\\SvcFab", + "durabilityLevel": "Bronze", + "enableParallelJobs": true, + "nicPrefixOverride": "[parameters('subnet0Prefix')]", + "certificate": { + "thumbprint": "[parameters('certificateThumbprint')]", + "x509StoreName": "[parameters('certificateStoreValue')]" + } + }, + "typeHandlerVersion": "1.0" + } + }, + { + "name": "[concat('VMDiagnosticsVmExt','_vmNodeType0Name')]", + "properties": { + "type": "IaaSDiagnostics", + "autoUpgradeMinorVersion": true, + "protectedSettings": { + "storageAccountName": "[parameters('applicationDiagnosticsStorageAccountName')]", + "storageAccountKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('applicationDiagnosticsStorageAccountName')),'2015-05-01-preview').key1]", + "storageAccountEndPoint": "https://core.windows.net/" + }, + "publisher": "Microsoft.Azure.Diagnostics", + "settings": { + "WadCfg": { + "DiagnosticMonitorConfiguration": { + "overallQuotaInMB": "50000", + "EtwProviders": { + "EtwEventSourceProviderConfiguration": [ + { + "provider": "Microsoft-ServiceFabric-Actors", + "scheduledTransferKeywordFilter": "1", + "scheduledTransferPeriod": "PT5M", + "DefaultEvents": { + "eventDestination": "ServiceFabricReliableActorEventTable" + } + }, + { + "provider": "Microsoft-ServiceFabric-Services", + "scheduledTransferPeriod": "PT5M", + "DefaultEvents": { + "eventDestination": "ServiceFabricReliableServiceEventTable" + } + } + ], + "EtwManifestProviderConfiguration": [ + { + "provider": "cbd93bc2-71e5-4566-b3a7-595d8eeca6e8", + "scheduledTransferLogLevelFilter": "Information", + "scheduledTransferKeywordFilter": "4611686018427387904", + "scheduledTransferPeriod": "PT5M", + "DefaultEvents": { + "eventDestination": "ServiceFabricSystemEventTable" + } + } + ] + } + } + }, + "StorageAccount": "[parameters('applicationDiagnosticsStorageAccountName')]" + }, + "typeHandlerVersion": "1.5" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "[concat(parameters('nicName'), '-0')]", + "properties": { + "ipConfigurations": [ + { + "name": "[concat(parameters('nicName'),'-',0)]", + "properties": { + "loadBalancerBackendAddressPools": [ + { + "id": "[variables('lbPoolID0')]" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "[variables('lbNatPoolID0')]" + } + ], + "subnet": { + "id": "[variables('subnet0Ref')]" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "[parameters('adminPassword')]", + "adminUsername": "[parameters('adminUsername')]", + "computernamePrefix": "[parameters('vmNodeType0Name')]", + "secrets": [ + { + "sourceVault": { + "id": "[parameters('sourceVaultValue')]" + }, + "vaultCertificates": [ + { + "certificateStore": "[parameters('certificateStoreValue')]", + "certificateUrl": "[parameters('certificateUrlValue')]" + } + ] + } + ] + }, + "storageProfile": { + "imageReference": { + "publisher": "[parameters('vmImagePublisher')]", + "offer": "[parameters('vmImageOffer')]", + "sku": "[parameters('vmImageSku')]", + "version": "[parameters('vmImageVersion')]" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "vhdContainers": [ + "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[0]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]", + "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[1]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]", + "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[2]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]", + "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[3]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]", + "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('uniqueStringArray0')[4]), variables('storageApiVersion')).primaryEndpoints.blob, parameters('vmStorageAccountContainerName'))]" + ], + "name": "vmssosdisk" + } + } + } + }, + "sku": { + "name": "[parameters('vmNodeType0Size')]", + "capacity": "[parameters('nt0InstanceCount')]", + "tier": "Standard" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + }, + { + "apiVersion": "2017-07-01-preview", + "type": "Microsoft.ServiceFabric/clusters", + "name": "[parameters('clusterName')]", + "location": "[parameters('clusterLocation')]", + "dependsOn": [ + "[concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName'))]" + ], + "properties": { + "addonFeatures": [ + "DnsService" + ], + "certificate": { + "thumbprint": "[parameters('certificateThumbprint')]", + "x509StoreName": "[parameters('certificateStoreValue')]" + }, + "clientCertificateCommonNames": [], + "clientCertificateThumbprints": [], + "clusterCodeVersion": "5.7.207.9494", + "clusterState": "Default", + "diagnosticsStorageAccountConfig": { + "blobEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.blob]", + "protectedAccountKeyName": "StorageAccountKey1", + "queueEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.queue]", + "storageAccountName": "[parameters('supportLogStorageAccountName')]", + "tableEndpoint": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('supportLogStorageAccountName')), variables('storageApiVersion')).primaryEndpoints.table]" + }, + "fabricSettings": [ + { + "parameters": [ + { + "name": "ClusterProtectionLevel", + "value": "[parameters('clusterProtectionLevel')]" + } + ], + "name": "Security" + } + ], + "managementEndpoint": "[concat('https://',reference(concat(parameters('lbIPName'),'-','0')).dnsSettings.fqdn,':',parameters('nt0fabricHttpGatewayPort'))]", + "nodeTypes": [ + { + "name": "[parameters('vmNodeType0Name')]", + "applicationPorts": { + "endPort": "[parameters('nt0applicationEndPort')]", + "startPort": "[parameters('nt0applicationStartPort')]" + }, + "clientConnectionEndpointPort": "[parameters('nt0fabricTcpGatewayPort')]", + "durabilityLevel": "Bronze", + "ephemeralPorts": { + "endPort": "[parameters('nt0ephemeralEndPort')]", + "startPort": "[parameters('nt0ephemeralStartPort')]" + }, + "httpGatewayEndpointPort": "[parameters('nt0fabricHttpGatewayPort')]", + "isPrimary": true, + "reverseProxyEndpointPort": "[parameters('nt0reverseProxyEndpointPort')]", + "vmInstanceCount": "[parameters('nt0InstanceCount')]" + } + ], + "provisioningState": "Default", + "reliabilityLevel": "Silver", + "upgradeMode": "Manual", + "vmImage": "Windows" + }, + "tags": { + "resourceType": "Service Fabric", + "clusterName": "[parameters('clusterName')]" + } + } + ], + "outputs": { + "clusterProperties": { + "value": "[reference(parameters('clusterName'))]", + "type": "object" + } + } +} \ No newline at end of file diff --git a/deploy/az/servicefabric/WindowsContainers/servicefabricdeploysecured.parameters.json b/deploy/az/servicefabric/WindowsContainers/servicefabricdeploysecured.parameters.json new file mode 100644 index 000000000..bbc8eb663 --- /dev/null +++ b/deploy/az/servicefabric/WindowsContainers/servicefabricdeploysecured.parameters.json @@ -0,0 +1,106 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "clusterName": { + "value": "pro-eshop-sfwin-cluster" + }, + "clusterLocation": { + "value": "westus" + }, + "computeLocation": { + "value": "westus" + }, + "adminUserName": { + "value": "eshop" + }, + "adminPassword": { + "value": "Your_complex_Pass@word1" + }, + "nicName": { + "value": "NIC-eshopsfwin" + }, + "publicIPAddressName": { + "value": "eshopsfwin-PubIP" + }, + "dnsName": { + "value": "pro-eshop-sfwin-cluster" + }, + "virtualNetworkName": { + "value": "VNet-eshopsfwin" + }, + "lbName": { + "value": "LB-eshopsfwin" + }, + "lbIPName": { + "value": "LBIP-eshopsfwin" + }, + "applicationDiagnosticsStorageAccountName": { + "value": "sfdgqaeshopsfwinsec" + }, + "supportLogStorageAccountName": { + "value": "sflogsqaeshopsfwinsec" + }, + "sourceVaultValue": { + "value": "your-value-check-keyvault-at-azure" + }, + "certificateUrlValue": { + "value": "your-value-check-keyvault-at-azure" + }, + "certificateThumbprint": { + "value": "your-value-check-keyvault-at-azure" + }, + "vmImageSku": { + "value": "2016-Datacenter-with-Containers" + }, + "nt0ephemeralStartPort": { + "value": 49152 + }, + "nt0ephemeralEndPort": { + "value": 65534 + }, + "nt0applicationStartPort": { + "value": 20000 + }, + "nt0applicationEndPort": { + "value": 30000 + }, + "nt0fabricTcpGatewayPort": { + "value": 19000 + }, + "nt0fabricHttpGatewayPort": { + "value": 19080 + }, + "nt0reverseProxyEndpointPort": { + "value": 19081 + }, + "webMvcHttpPort": { + "value": 5100 + }, + "webSpaHttpPort": { + "value": 5104 + }, + "webStatusHttpPort": { + "value": 5107 + }, + "IdSrvHttpRule": { + "value": 5105 + }, + "BasketApiHttpRule": { + "value": 5103 + }, + "CatalogApiHttpRule": { + "value": 5101 + }, + "OrderingApiHttpRule": { + "value": 5102 + }, + "MarketingApiHttpRule": { + "value": 5110 + }, + "LocationsApiHttpRule": { + "value": 5109 + } + } +} + diff --git a/docker-compose-external.override.yml b/docker-compose-external.override.yml index f20440ad7..60764ca54 100644 --- a/docker-compose-external.override.yml +++ b/docker-compose-external.override.yml @@ -3,7 +3,7 @@ version: '2' services: sql.data: environment: - - SA_PASSWORD=Pass@word + - MSSQL_SA_PASSWORD=Pass@word - ACCEPT_EULA=Y ports: - "5433:1433" \ No newline at end of file diff --git a/docker-compose-external.yml b/docker-compose-external.yml index 8d8d61add..8d8e0e760 100644 --- a/docker-compose-external.yml +++ b/docker-compose-external.yml @@ -1,8 +1,8 @@ -version: '2.1' +version: '3' services: sql.data: - image: microsoft/mssql-server-linux + image: microsoft/mssql-server-linux:2017-latest basket.data: image: redis diff --git a/docker-compose-windows.override.yml b/docker-compose-windows.override.yml deleted file mode 100644 index 4237d9c96..000000000 --- a/docker-compose-windows.override.yml +++ /dev/null @@ -1,171 +0,0 @@ -version: '2.1' - -# The default docker-compose.override file can use the "localhost" as the external name for testing web apps within the same dev machine. -# The ESHOP_EXTERNAL_DNS_NAME_OR_IP environment variable is taken, by default, from the ".env" file defined like: -# ESHOP_EXTERNAL_DNS_NAME_OR_IP=localhost -# but values present in the environment vars at runtime will always override those defined inside the .env file -# An external IP or DNS name has to be used (instead localhost and the 10.0.75.1 IP) when testing the Web apps and the Xamarin apps from remote machines/devices using the same WiFi, for instance. - -services: - - basket.api: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=${ESHOP_AZURE_REDIS_BASKET_DB:-basket.data} - - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. - - IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 - - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} - - AzureServiceBusEnabled=False - ports: - - "5103:80" - - catalog.api: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=${ESHOP_AZURE_CATALOG_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word} - - PicBaseUrl=${ESHOP_AZURE_STORAGE_CATALOG:-http://localhost:5101/api/v1/catalog/items/[0]/pic/} #Local: You need to open your local dev-machine firewall at range 5100-5110. - - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} - - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_CATALOG_NAME} - - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_CATALOG_KEY} - - UseCustomizationData=True - - AzureServiceBusEnabled=False - - AzureStorageEnabled=False - ports: - - "5101:80" - - identity.api: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - SpaClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5104 - - XamarinCallback=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105/xamarincallback #localhost do not work for UWP login, so we have to use "external" IP always - - ConnectionStrings__DefaultConnection=${ESHOP_AZURE_IDENTITY_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word} - - MvcClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your local dev-machine firewall at range 5100-5110. - - LocationApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5109 - - MarketingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5110 - - BasketApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5103 - - OrderingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5102 - - UseCustomizationData=True - ports: - - "5105:80" - - ordering.api: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word} - - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. - - IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 - - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} - - UseCustomizationData=True - - AzureServiceBusEnabled=False - ports: - - "5102:80" - - webspa: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - CatalogUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5101 - - OrderingUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5102 - - IdentityUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. - - BasketUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5103 - - MarketingUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5110 - - CatalogUrlHC=http://catalog.api/hc - - OrderingUrlHC=http://ordering.api/hc - - IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser. - - BasketUrlHC=http://basket.api/hc - - MarketingUrlHC=http://marketing.api/hc - - UseCustomizationData=True - ports: - - "5104:80" - - webmvc: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - CatalogUrl=http://catalog.api - - OrderingUrl=http://ordering.api - - BasketUrl=http://basket.api - - IdentityUrl=http://10.0.75.1:5105 - - MarketingUrl=http://marketing.api #Local: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser. - - UseCustomizationData=True #Remote: Use ${ESHOP_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser. - ports: - - "5100:80" - - sql.data: - environment: - - SA_PASSWORD=Pass@word - - ACCEPT_EULA=Y - ports: - - "5433:1433" - - nosql.data: - ports: - - "27017:27017" - - locations.api: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data} - - Database=LocationsDb - - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. - - IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 - - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} - - AzureServiceBusEnabled=False - ports: - - "5109:80" - - marketing.api: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=${ESHOP_AZURE_MARKETING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word} - - MongoConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data} - - MongoDatabase=MarketingDb - - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} - - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. - - IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 - - CampaignDetailFunctionUri=${ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI} - - PicBaseUrl=${ESHOP_AZURE_STORAGE_MARKETING:-http://localhost:5110/api/v1/campaigns/[0]/pic/} - - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_MARKETING_NAME} - - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_MARKETING_KEY} - - AzureServiceBusEnabled=False - - AzureStorageEnabled=False - ports: - - "5110:80" - - graceperiodmanager: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word} - - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} - - AzureServiceBusEnabled=False - - webstatus: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - CatalogUrl=http://catalog.api/hc - - OrderingUrl=http://ordering.api/hc - - BasketUrl=http://basket.api/hc - - IdentityUrl=http://identity.api/hc - - LocationsUrl=http://locations.api/hc - - MarketingUrl=http://marketing.api/hc - - mvc=http://webmvc/hc - - spa=http://webspa/hc - ports: - - "5107:80" - - payment.api: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} - - AzureServiceBusEnabled=False - ports: - - "5108:80" \ No newline at end of file diff --git a/docker-compose-windows.prod.yml b/docker-compose-windows.prod.yml index 5dc00aa9a..0e7602e8f 100644 --- a/docker-compose-windows.prod.yml +++ b/docker-compose-windows.prod.yml @@ -1,4 +1,4 @@ -version: '2.1' +version: '3' # The Production docker-compose file has to have the external/real IPs or DNS names for the services # The ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP environment variable is taken, by default, from the ".env" file defined like: @@ -118,17 +118,10 @@ services: - AzureStorageEnabled=False ports: - "5110:80" - - graceperiodmanager: - environment: - - ASPNETCORE_ENVIRONMENT=Production - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word} - - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} sql.data: environment: - - SA_PASSWORD=Pass@word + - MSSQL_SA_PASSWORD=Pass@word - ACCEPT_EULA=Y ports: - "5433:1433" diff --git a/docker-compose-windows.yml b/docker-compose-windows.yml index 6296f5ca7..08785cff1 100644 --- a/docker-compose-windows.yml +++ b/docker-compose-windows.yml @@ -1,11 +1,11 @@ -version: '2.1' +version: '3' services: basket.api: image: eshop/basket.api-win:${TAG:-latest} build: context: ./src/Services/Basket/Basket.API - dockerfile: Dockerfile.nanowin + dockerfile: Dockerfile depends_on: - basket.data - identity.api @@ -15,7 +15,7 @@ services: image: eshop/catalog.api-win:${TAG:-latest} build: context: ./src/Services/Catalog/Catalog.API - dockerfile: Dockerfile.nanowin + dockerfile: Dockerfile depends_on: - sql.data - rabbitmq @@ -24,7 +24,7 @@ services: image: eshop/identity.api-win:${TAG:-latest} build: context: ./src/Services/Identity/Identity.API - dockerfile: Dockerfile.nanowin + dockerfile: Dockerfile depends_on: - sql.data @@ -32,25 +32,39 @@ services: image: eshop/ordering.api-win:${TAG:-latest} build: context: ./src/Services/Ordering/Ordering.API - dockerfile: Dockerfile.nanowin + dockerfile: Dockerfile depends_on: - sql.data - rabbitmq + marketing.api: + image: eshop/marketing.api-win:${TAG:-latest} + build: + context: ./src/Services/Marketing/Marketing.API + dockerfile: Dockerfile + depends_on: + - sql.data + - nosql.data + - identity.api + - rabbitmq + webspa: image: eshop/webspa-win:${TAG:-latest} build: context: ./src/Web/WebSPA - dockerfile: Dockerfile.nanowin + dockerfile: Dockerfile depends_on: + - catalog.api + - ordering.api - identity.api - basket.api + - marketing.api webmvc: image: eshop/webmvc-win:${TAG:-latest} build: context: ./src/Web/WebMVC - dockerfile: Dockerfile.nanowin + dockerfile: Dockerfile depends_on: - catalog.api - ordering.api @@ -59,29 +73,26 @@ services: - marketing.api webstatus: - image: eshop/webstatus:${TAG:-latest} + image: eshop/webstatus-win:${TAG:-latest} build: context: ./src/Web/WebStatus - dockerfile: Dockerfile.nanowin + dockerfile: Dockerfile - locations.api: - image: eshop/locations.api:${TAG:-latest} + payment.api: + image: eshop/payment.api-win:${TAG:-latest} build: - context: ./src/Services/Location/Locations.API - dockerfile: Dockerfile.nanowin + context: ./src/Services/Payment/Payment.API + dockerfile: Dockerfile depends_on: - - nosql.data - - rabbitmq + - rabbitmq - marketing.api: - image: eshop/marketing.api:${TAG:-latest} + locations.api: + image: eshop/locations.api-win:${TAG:-latest} build: - context: ./src/Services/Marketing/Marketing.API - dockerfile: Dockerfile.nanowin + context: ./src/Services/Location/Locations.API + dockerfile: Dockerfile depends_on: - - sql.data - nosql.data - - identity.api - rabbitmq sql.data: @@ -92,36 +103,14 @@ services: basket.data: image: redis:nanoserver -# build: -# context: ./_docker/redis -# dockerfile: Dockerfile.nanowin ports: - "6379:6379" rabbitmq: image: spring2/rabbitmq -# build: -# context: ./_docker/rabbitmq -# dockerfile: Dockerfile.nanowin ports: - - "5672:5672" - - graceperiodmanager: - image: eshop/graceperiodmanager:${TAG:-latest} - build: - context: ./src/Services/GracePeriod/GracePeriodManager - dockerfile: Dockerfile.nanowin - depends_on: - - sql.data - - rabbitmq - - payment.api: - image: eshop/payment.api:${TAG:-latest} - build: - context: ./src/Services/Payment/Payment.API - dockerfile: Dockerfile.nanowin - depends_on: - - rabbitmq + - "15672:15672" + - "5672:5672" networks: default: diff --git a/docker-compose.ci.build.yml b/docker-compose.ci.build.yml index c755ad1c3..d4b69f9c5 100644 --- a/docker-compose.ci.build.yml +++ b/docker-compose.ci.build.yml @@ -1,8 +1,8 @@ -version: '2.1' +version: '3' services: ci-build: - image: microsoft/aspnetcore-build:1.1.2 + image: microsoft/aspnetcore-build:2.0 volumes: - .:/src - ./cli-linux:/cli-linux @@ -11,7 +11,7 @@ services: # Next line is using the .sln file to compile all the projects. # Sometime there is an issue in msbuild exits the process before finishing building the bits: (https://github.com/Microsoft/msbuild/issues/2153) # Random error: error MSB4017: The build stopped unexpectedly be cause of an unexpected logger failure. - #command: /bin/bash -c "pushd ./src/Web/WebSPA && npm rebuild node-sass && popd && dotnet restore ./eShopOnContainers-ServicesAndWebApps.sln --verbosity minimal && dotnet publish ./eShopOnContainers-ServicesAndWebApps.sln -c Release -o ./obj/Docker/publish --verbosity minimal" + #command: /bin/bash -c "pushd ./src/Web/WebSPA && npm rebuild node-sass && popd && dotnet restore ./eShopOnContainers-ServicesAndWebApps.sln --verbosity minimal && dotnet publish ./eShopOnContainers-ServicesAndWebApps.sln -c Release -o ./obj/Docker/publish --verbosity minimal" # NOTE: Using build-bits-linux.sh from Linux build container exits before ending. command: /bin/bash -c "pushd ./src/Web/WebSPA && npm rebuild node-sass && popd && pushd /cli-linux && ./build-bits-linux.sh /src" diff --git a/docker-compose.nobuild.yml b/docker-compose.nobuild.yml index 0905f9799..4f301cd3c 100644 --- a/docker-compose.nobuild.yml +++ b/docker-compose.nobuild.yml @@ -1,4 +1,4 @@ -version: '2.1' +version: '3' services: basket.api: @@ -23,12 +23,24 @@ services: image: eshop/ordering.api depends_on: - sql.data + - rabbitmq + + marketing.api: + image: eshop/marketing.api + depends_on: + - sql.data + - nosql.data + - identity.api + - rabbitmq webspa: image: eshop/webspa depends_on: + - catalog.api + - ordering.api - identity.api - basket.api + - marketing.api webmvc: image: eshop/webmvc @@ -37,20 +49,35 @@ services: - ordering.api - identity.api - basket.api + - marketing.api - sql.data: - image: microsoft/mssql-server-linux + webstatus: + image: eshop/webstatus + + payment.api: + image: eshop/payment.api + depends_on: + - rabbitmq + + locations.api: + image: eshop/locations.api + depends_on: + - nosql.data + - rabbitmq + sql.data: + image: microsoft/mssql-server-linux:2017-latest + + nosql.data: + image: mongo + basket.data: image: redis ports: - "6379:6379" rabbitmq: - image: rabbitmq + image: rabbitmq:3-management ports: - "5672:5672" - webstatus: - image: eshop/webstatus - \ No newline at end of file diff --git a/docker-compose.override.windows.yml b/docker-compose.override.windows.yml new file mode 100644 index 000000000..537b3b098 --- /dev/null +++ b/docker-compose.override.windows.yml @@ -0,0 +1,53 @@ +version: '3' + +# ONLY NEEDED WHEN RUNNING WINDOWS CONTAINERS +# +# This file sets the containers' environment variables: +# +# - EventBusUerName +# - EventBusPassword +# +# To the default username & password used in the spring2/rabbitmq image. +# +# If you are using any other rabbitmq image with any other username/pwd then you can: +# +# Set your shell environment variables: +# - ESHOP_SERVICE_BUS_USERNAME +# - ESHOP_SERVICE_BUS_PASSWORD +# +# With the appropiate values (note that you can use .env file also) AND DO NOT USE THIS FILE when launching windows container: +# +# docker-compose -f docker-compose-windows.yml -f docker-compose.override.yml up +# INSTEAD OF +# docker-compose -f docker-compose-windows.yml -f docker-compose.override.yml -f docker-compose.override.windows.yml up + +services: + basket.api: + environment: + - EventBusUserName=admin + - EventBusPassword=password + + catalog.api: + environment: + - EventBusUserName=admin + - EventBusPassword=password + + ordering.api: + environment: + - EventBusUserName=admin + - EventBusPassword=password + + marketing.api: + environment: + - EventBusUserName=admin + - EventBusPassword=password + + payment.api: + environment: + - EventBusUserName=admin + - EventBusPassword=password + + locations.api: + environment: + - EventBusUserName=admin + - EventBusPassword=password \ No newline at end of file diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 1a0129ac3..449bc4a74 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -1,4 +1,4 @@ -version: '2.1' +version: '3' # The default docker-compose.override file can use the "localhost" as the external name for testing web apps within the same dev machine. # The ESHOP_EXTERNAL_DNS_NAME_OR_IP environment variable is taken, by default, from the ".env" file defined like: @@ -16,7 +16,13 @@ services: - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. - IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} - AzureServiceBusEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} + ports: - "5103:80" @@ -27,11 +33,15 @@ services: - ConnectionString=${ESHOP_AZURE_CATALOG_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word} - PicBaseUrl=${ESHOP_AZURE_STORAGE_CATALOG_URL:-http://localhost:5101/api/v1/catalog/items/[0]/pic/} #Local: You need to open your local dev-machine firewall at range 5100-5110. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_CATALOG_NAME} - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_CATALOG_KEY} - UseCustomizationData=True - AzureServiceBusEnabled=False - AzureStorageEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} ports: - "5101:80" @@ -41,13 +51,15 @@ services: - ASPNETCORE_URLS=http://0.0.0.0:80 - SpaClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5104 - XamarinCallback=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105/xamarincallback #localhost do not work for UWP login, so we have to use "external" IP always - - ConnectionStrings__DefaultConnection=${ESHOP_AZURE_IDENTITY_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word} + - ConnectionString=${ESHOP_AZURE_IDENTITY_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word} - MvcClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your local dev-machine firewall at range 5100-5110. - LocationApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5109 - MarketingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5110 - BasketApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5103 - OrderingApiClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5102 - - UseCustomizationData=True + - UseCustomizationData=True + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} ports: - "5105:80" @@ -59,8 +71,15 @@ services: - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. - IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} - UseCustomizationData=True - AzureServiceBusEnabled=False + - CheckUpdateTime=30000 + - GracePeriodTime=1 + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} ports: - "5102:80" @@ -72,6 +91,8 @@ services: - MongoConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data} - MongoDatabase=MarketingDb - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. - IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 - CampaignDetailFunctionUri=${ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI} @@ -80,16 +101,11 @@ services: - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_MARKETING_KEY} - AzureServiceBusEnabled=False - AzureStorageEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} ports: - "5110:80" - - graceperiodmanager: - environment: - - ASPNETCORE_ENVIRONMENT=Development - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word} - - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} - - AzureServiceBusEnabled=False webspa: environment: @@ -100,12 +116,16 @@ services: - IdentityUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105. - BasketUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5103 - MarketingUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5110 + - LocationsUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5109 - CatalogUrlHC=http://catalog.api/hc - OrderingUrlHC=http://ordering.api/hc - IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser. - BasketUrlHC=http://basket.api/hc - MarketingUrlHC=http://marketing.api/hc + - PaymentUrlHC=http://payment.api/hc - UseCustomizationData=True + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} ports: - "5104:80" @@ -116,10 +136,19 @@ services: - CatalogUrl=http://catalog.api - OrderingUrl=http://ordering.api - BasketUrl=http://basket.api + - LocationsUrl=http://locations.api - IdentityUrl=http://10.0.75.1:5105 - - MarketingUrl=http://marketing.api #Local: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser. - #Remote: Use ${ESHOP_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser. + - MarketingUrl=http://marketing.api #Local: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser. #Remote: Use ${ESHOP_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser. + - CatalogUrlHC=http://catalog.api/hc + - OrderingUrlHC=http://ordering.api/hc + - IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser. + - BasketUrlHC=http://basket.api/hc + - MarketingUrlHC=http://marketing.api/hc + - PaymentUrlHC=http://payment.api/hc - UseCustomizationData=True + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} ports: - "5100:80" @@ -133,8 +162,11 @@ services: - IdentityUrl=http://identity.api/hc - LocationsUrl=http://locations.api/hc - MarketingUrl=http://marketing.api/hc + - PaymentUrl=http://payment.api/hc - mvc=http://webmvc/hc - spa=http://webspa/hc + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} ports: - "5107:80" @@ -143,7 +175,11 @@ services: - ASPNETCORE_ENVIRONMENT=Development - ASPNETCORE_URLS=http://0.0.0.0:80 - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} - AzureServiceBusEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} ports: - "5108:80" @@ -156,14 +192,20 @@ services: - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110. - IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} + - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME} + - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD} - AzureServiceBusEnabled=False + - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY} + - OrchestratorType=${ORCHESTRATOR_TYPE} + - UseLoadTest=${USE_LOADTEST:-False} ports: - "5109:80" sql.data: environment: - - SA_PASSWORD=Pass@word + - MSSQL_SA_PASSWORD=Pass@word - ACCEPT_EULA=Y + - MSSQL_PID=Developer ports: - "5433:1433" diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index cb53a1d00..a2301c236 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -1,4 +1,4 @@ -version: '2.1' +version: '3' # The Production docker-compose file has to have the external/real IPs or DNS names for the services # The ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP environment variable is taken, by default, from the ".env" file defined like: @@ -66,6 +66,8 @@ services: - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} - UseCustomizationData=True - AzureServiceBusEnabled=False + - CheckUpdateTime=30000 + - GracePeriodTime=1 ports: - "5102:80" @@ -88,14 +90,6 @@ services: ports: - "5110:80" - graceperiodmanager: - environment: - - ASPNETCORE_ENVIRONMENT=Production - - ASPNETCORE_URLS=http://0.0.0.0:80 - - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word} - - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq} - - AzureServiceBusEnabled=False - webspa: environment: - ASPNETCORE_ENVIRONMENT=Production @@ -130,8 +124,9 @@ services: sql.data: environment: - - SA_PASSWORD=Pass@word + - MSSQL_SA_PASSWORD=Pass@word - ACCEPT_EULA=Y + - MSSQL_PID=Developer ports: - "5433:1433" diff --git a/docker-compose.yml b/docker-compose.yml index 86931228e..d05d5f697 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '2.1' +version: '3' services: @@ -49,15 +49,6 @@ services: - identity.api - rabbitmq - graceperiodmanager: - image: eshop/graceperiodmanager:${TAG:-latest} - build: - context: ./src/Services/GracePeriod/GracePeriodManager - dockerfile: Dockerfile - depends_on: - - sql.data - - rabbitmq - webspa: image: eshop/webspa:${TAG:-latest} build: @@ -106,7 +97,7 @@ services: - rabbitmq sql.data: - image: microsoft/mssql-server-linux + image: microsoft/mssql-server-linux:2017-latest nosql.data: image: mongo diff --git a/eShopOnContainers-Android.sln b/eShopOnContainers-Android.sln index f1f10b26f..b3324f540 100644 --- a/eShopOnContainers-Android.sln +++ b/eShopOnContainers-Android.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26430.6 +VisualStudioVersion = 15.0.26730.8 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{932D8224-11F6-4D07-B109-DA28AD288A63}" EndProject diff --git a/eShopOnContainers-AzureFunctions.sln b/eShopOnContainers-AzureFunctions.sln index 7e14fc19d..d129fc0fe 100644 --- a/eShopOnContainers-AzureFunctions.sln +++ b/eShopOnContainers-AzureFunctions.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26608.5 +VisualStudioVersion = 15.0.26730.8 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Infrastructure", "Infrastructure", "{5B1011EC-CEE5-47AA-B336-99381D573679}" EndProject diff --git a/eShopOnContainers-MobileApps.sln b/eShopOnContainers-MobileApps.sln index cda44c042..74c882912 100755 --- a/eShopOnContainers-MobileApps.sln +++ b/eShopOnContainers-MobileApps.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26430.16 +VisualStudioVersion = 15.0.26730.16 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{932D8224-11F6-4D07-B109-DA28AD288A63}" EndProject @@ -16,7 +16,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mobile Apps", "Mobile Apps" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{A857AD10-40FF-4303-BEC2-FF1C58D5735E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.Core", "src\Mobile\eShopOnContainers\eShopOnContainers.Core\eShopOnContainers.Core.csproj", "{67F9D3A8-F71E-4428-913F-C37AE82CDB24}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.Core", "src\Mobile\eShopOnContainers\eShopOnContainers.Core\eShopOnContainers.Core.csproj", "{BA96A12C-4EE3-46C4-BB3F-F811B554CD01}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.Droid", "src\Mobile\eShopOnContainers\eShopOnContainers.Droid\eShopOnContainers.Droid.csproj", "{62DBB163-9CA9-4818-B48B-13233DF37C24}" EndProject @@ -30,7 +30,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Targets", "Targets", "{9CC7 EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mobile Apps", "Mobile Apps", "{B7B1D395-4E06-4036-BE86-C216756B9367}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.UnitTests", "src\Mobile\eShopOnContainers\eShopOnContainers.UnitTests\eShopOnContainers.UnitTests.csproj", "{F7B6A162-BC4D-4924-B16A-713F9B0344E7}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.UnitTests", "src\Mobile\eShopOnContainers\eShopOnContainers.UnitTests\eShopOnContainers.UnitTests.csproj", "{6E4285E7-7611-4440-A1B5-3513EBB13807}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.TestRunner.Droid", "src\Mobile\eShopOnContainers\eShopOnContainers.TestRunner.Droid\eShopOnContainers.TestRunner.Droid.csproj", "{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}" EndProject @@ -66,54 +66,54 @@ Global Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|Any CPU.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|ARM.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|ARM.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|iPhone.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|iPhone.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|x64.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|x64.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|x86.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|x86.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Any CPU.Build.0 = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|ARM.ActiveCfg = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|ARM.Build.0 = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|iPhone.Build.0 = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|x64.ActiveCfg = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|x64.Build.0 = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|x86.ActiveCfg = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|x86.Build.0 = Debug|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Any CPU.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Any CPU.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|ARM.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|ARM.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|iPhone.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|iPhone.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|x64.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|x64.Build.0 = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|x86.ActiveCfg = Release|Any CPU - {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|x86.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|ARM.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|x64.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Ad-Hoc|x86.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|Any CPU.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|Any CPU.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|ARM.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|ARM.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|iPhone.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|iPhone.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|x64.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|x64.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|x86.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.AppStore|x86.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|ARM.ActiveCfg = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|ARM.Build.0 = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|iPhone.Build.0 = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|x64.ActiveCfg = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|x64.Build.0 = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|x86.ActiveCfg = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Debug|x86.Build.0 = Debug|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|Any CPU.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|ARM.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|ARM.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|iPhone.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|iPhone.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|x64.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|x64.Build.0 = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|x86.ActiveCfg = Release|Any CPU + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01}.Release|x86.Build.0 = Release|Any CPU {62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU {62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU {62DBB163-9CA9-4818-B48B-13233DF37C24}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU @@ -283,54 +283,54 @@ Global {C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Release|x86.ActiveCfg = Release|x86 {C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Release|x86.Build.0 = Release|x86 {C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B}.Release|x86.Deploy.0 = Release|x86 - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|ARM.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|x64.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Ad-Hoc|x86.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|Any CPU.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|Any CPU.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|ARM.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|ARM.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|iPhone.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|iPhone.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|x64.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|x64.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|x86.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.AppStore|x86.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|ARM.ActiveCfg = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|ARM.Build.0 = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|iPhone.Build.0 = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|x64.ActiveCfg = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|x64.Build.0 = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|x86.ActiveCfg = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Debug|x86.Build.0 = Debug|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|Any CPU.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|ARM.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|ARM.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|iPhone.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|iPhone.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|x64.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|x64.Build.0 = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|x86.ActiveCfg = Release|Any CPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7}.Release|x86.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|ARM.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|x64.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Ad-Hoc|x86.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|Any CPU.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|Any CPU.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|ARM.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|ARM.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|iPhone.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|iPhone.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|x64.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|x64.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|x86.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.AppStore|x86.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|ARM.ActiveCfg = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|ARM.Build.0 = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|iPhone.Build.0 = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|x64.ActiveCfg = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|x64.Build.0 = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|x86.ActiveCfg = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Debug|x86.Build.0 = Debug|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|Any CPU.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|ARM.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|ARM.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|iPhone.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|iPhone.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|x64.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|x64.Build.0 = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|x86.ActiveCfg = Release|Any CPU + {6E4285E7-7611-4440-A1B5-3513EBB13807}.Release|x86.Build.0 = Release|Any CPU {A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU {A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU {A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU @@ -506,16 +506,19 @@ Global EndGlobalSection GlobalSection(NestedProjects) = preSolution {F61357CE-1CC2-410E-8776-B16EEBC98EB8} = {932D8224-11F6-4D07-B109-DA28AD288A63} - {67F9D3A8-F71E-4428-913F-C37AE82CDB24} = {778289CA-31F7-4464-8C2A-612EE846F8A7} + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01} = {778289CA-31F7-4464-8C2A-612EE846F8A7} {62DBB163-9CA9-4818-B48B-13233DF37C24} = {9CC7814B-72A6-465B-A61C-57B512DEE303} {6EEB23DC-7063-4444-9AF8-90DF24F549C0} = {9CC7814B-72A6-465B-A61C-57B512DEE303} {C3C1E2CF-B1F7-4654-BBDC-50143DB22E0B} = {9CC7814B-72A6-465B-A61C-57B512DEE303} {778289CA-31F7-4464-8C2A-612EE846F8A7} = {F61357CE-1CC2-410E-8776-B16EEBC98EB8} {9CC7814B-72A6-465B-A61C-57B512DEE303} = {F61357CE-1CC2-410E-8776-B16EEBC98EB8} {B7B1D395-4E06-4036-BE86-C216756B9367} = {A857AD10-40FF-4303-BEC2-FF1C58D5735E} - {F7B6A162-BC4D-4924-B16A-713F9B0344E7} = {B7B1D395-4E06-4036-BE86-C216756B9367} + {6E4285E7-7611-4440-A1B5-3513EBB13807} = {B7B1D395-4E06-4036-BE86-C216756B9367} {A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1} = {B7B1D395-4E06-4036-BE86-C216756B9367} {B68C2B56-7581-46AE-B55D-D25DDFD3BFE3} = {B7B1D395-4E06-4036-BE86-C216756B9367} {A7337243-33B8-463A-87AD-944B75EFD820} = {B7B1D395-4E06-4036-BE86-C216756B9367} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8A9E878A-C296-4615-97AB-7A4505148872} + EndGlobalSection EndGlobal diff --git a/eShopOnContainers-ServicesAndWebApps.sln b/eShopOnContainers-ServicesAndWebApps.sln index 9dd6308a4..cc63417a3 100644 --- a/eShopOnContainers-ServicesAndWebApps.sln +++ b/eShopOnContainers-ServicesAndWebApps.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26430.6 +VisualStudioVersion = 15.0.27004.2002 MinimumVisualStudioVersion = 10.0.40219.1 Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{FEA0C318-FFED-4D39-8781-265718CA43DD}" EndProject @@ -79,10 +79,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Health EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.HealthChecks.SqlServer", "src\BuildingBlocks\HealthChecks\src\Microsoft.Extensions.HealthChecks.SqlServer\Microsoft.Extensions.HealthChecks.SqlServer.csproj", "{4BD76717-3102-4969-8C2C-BAAA3F0263B6}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventBus.Tests", "src\BuildingBlocks\EventBus\EventBus.Tests\EventBus.Tests.csproj", "{4A980AC4-7205-46BF-8CCB-09E44D700FD4}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GracePeriodManager", "src\Services\GracePeriod\GracePeriodManager\GracePeriodManager.csproj", "{F6E0F0DD-1400-43C3-B5E0-7CC325728C47}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Location", "Location", "{41139F64-4046-4F16-96B7-D941D96FA9C6}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Locations.API", "src\Services\Location\Locations.API\Locations.API.csproj", "{E7581357-FC34-474C-B8F5-307EE3CE05EF}" @@ -101,6 +97,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Health EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoadTest", "test\Services\LoadTest\LoadTest.csproj", "{969E793C-C413-490E-9C9D-B2B46DA5AF32}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebHost", "WebHost", "{1815B651-941C-466B-AE33-D1D7EEB8F77F}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebHost.Customization", "src\BuildingBlocks\WebHostCustomization\WebHost.Customization\WebHost.Customization.csproj", "{15F4B3AA-89B6-4A0D-9051-414305974781}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Ad-Hoc|Any CPU = Ad-Hoc|Any CPU @@ -1027,102 +1027,6 @@ Global {4BD76717-3102-4969-8C2C-BAAA3F0263B6}.Release|x64.Build.0 = Release|Any CPU {4BD76717-3102-4969-8C2C-BAAA3F0263B6}.Release|x86.ActiveCfg = Release|Any CPU {4BD76717-3102-4969-8C2C-BAAA3F0263B6}.Release|x86.Build.0 = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|x64.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Ad-Hoc|x86.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|ARM.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|ARM.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|iPhone.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|x64.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|x64.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|x86.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.AppStore|x86.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|ARM.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|ARM.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|iPhone.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|x64.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|x64.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|x86.ActiveCfg = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Debug|x86.Build.0 = Debug|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|Any CPU.Build.0 = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|ARM.ActiveCfg = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|ARM.Build.0 = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|iPhone.ActiveCfg = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|iPhone.Build.0 = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|x64.ActiveCfg = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|x64.Build.0 = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|x86.ActiveCfg = Release|Any CPU - {4A980AC4-7205-46BF-8CCB-09E44D700FD4}.Release|x86.Build.0 = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|x64.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Ad-Hoc|x86.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|ARM.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|ARM.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|iPhone.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|x64.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|x64.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|x86.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.AppStore|x86.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|ARM.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|ARM.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|iPhone.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|x64.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|x64.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|x86.ActiveCfg = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Debug|x86.Build.0 = Debug|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|Any CPU.Build.0 = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|ARM.ActiveCfg = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|ARM.Build.0 = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|iPhone.ActiveCfg = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|iPhone.Build.0 = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|x64.ActiveCfg = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|x64.Build.0 = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|x86.ActiveCfg = Release|Any CPU - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47}.Release|x86.Build.0 = Release|Any CPU {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU {E7581357-FC34-474C-B8F5-307EE3CE05EF}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU @@ -1411,6 +1315,54 @@ Global {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|x64.Build.0 = Release|Any CPU {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|x86.ActiveCfg = Release|Any CPU {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|x86.Build.0 = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|x64.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Ad-Hoc|x86.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|ARM.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|iPhone.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|x64.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|x64.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|x86.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.AppStore|x86.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|ARM.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|ARM.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|iPhone.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|x64.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|x64.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|x86.ActiveCfg = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Debug|x86.Build.0 = Debug|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|Any CPU.Build.0 = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|ARM.ActiveCfg = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|ARM.Build.0 = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|iPhone.ActiveCfg = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|iPhone.Build.0 = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|x64.ActiveCfg = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|x64.Build.0 = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|x86.ActiveCfg = Release|Any CPU + {15F4B3AA-89B6-4A0D-9051-414305974781}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1448,8 +1400,6 @@ Global {1A01AF82-6FCB-464C-B39C-F127AEBD315D} = {022E145D-1593-47EE-9608-8E323D3C63F5} {22A0F9C1-2D4A-4107-95B7-8459E6688BC5} = {A81ECBC2-6B00-4DCD-8388-469174033379} {4BD76717-3102-4969-8C2C-BAAA3F0263B6} = {A81ECBC2-6B00-4DCD-8388-469174033379} - {4A980AC4-7205-46BF-8CCB-09E44D700FD4} = {807BB76E-B2BB-47A2-A57B-3D1B20FF5E7F} - {F6E0F0DD-1400-43C3-B5E0-7CC325728C47} = {0BD0DB92-2D98-44D9-9AC0-C59186D59B0B} {41139F64-4046-4F16-96B7-D941D96FA9C6} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8} {E7581357-FC34-474C-B8F5-307EE3CE05EF} = {41139F64-4046-4F16-96B7-D941D96FA9C6} {88B22DBB-AA8F-4290-A454-2C109352C345} = {DB0EFB20-B024-4E5E-A75C-52143C131D25} @@ -1459,5 +1409,10 @@ Global {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8} = {807BB76E-B2BB-47A2-A57B-3D1B20FF5E7F} {768C887F-C229-4B94-ACD8-0C7F65686524} = {A81ECBC2-6B00-4DCD-8388-469174033379} {969E793C-C413-490E-9C9D-B2B46DA5AF32} = {EF0337F2-ED00-4643-89FD-EE10863F1870} + {1815B651-941C-466B-AE33-D1D7EEB8F77F} = {DB0EFB20-B024-4E5E-A75C-52143C131D25} + {15F4B3AA-89B6-4A0D-9051-414305974781} = {1815B651-941C-466B-AE33-D1D7EEB8F77F} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {25728519-5F0F-4973-8A64-0A81EB4EA8D9} EndGlobalSection EndGlobal diff --git a/eShopOnContainers-iOS.sln b/eShopOnContainers-iOS.sln index a6e889786..e220e7c4e 100644 --- a/eShopOnContainers-iOS.sln +++ b/eShopOnContainers-iOS.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26430.6 +VisualStudioVersion = 15.0.26730.8 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{932D8224-11F6-4D07-B109-DA28AD288A63}" EndProject diff --git a/eShopOnContainers.sln b/eShopOnContainers.sln index 414ff7993..11d105423 100644 --- a/eShopOnContainers.sln +++ b/eShopOnContainers.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26430.6 +VisualStudioVersion = 15.0.26730.15 MinimumVisualStudioVersion = 10.0.40219.1 Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{FEA0C318-FFED-4D39-8781-265718CA43DD}" ProjectSection(ProjectDependencies) = postProject @@ -60,7 +60,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebSPA", "src\Web\WebSPA\We EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mobile Apps", "Mobile Apps", "{B7B1D395-4E06-4036-BE86-C216756B9367}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.UnitTests", "src\Mobile\eShopOnContainers\eShopOnContainers.UnitTests\eShopOnContainers.UnitTests.csproj", "{F7B6A162-BC4D-4924-B16A-713F9B0344E7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "eShopOnContainers.UnitTests", "src\Mobile\eShopOnContainers\eShopOnContainers.UnitTests\eShopOnContainers.UnitTests.csproj", "{F7B6A162-BC4D-4924-B16A-713F9B0344E7}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.TestRunner.Droid", "src\Mobile\eShopOnContainers\eShopOnContainers.TestRunner.Droid\eShopOnContainers.TestRunner.Droid.csproj", "{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}" EndProject @@ -76,7 +76,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationTests", "test\Se EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.UITests", "src\Mobile\eShopOnContainers\eShopOnContainers.UITests\eShopOnContainers.UITests.csproj", "{E3B18084-842C-4B80-8E4A-A7E588EC3137}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.Core", "src\Mobile\eShopOnContainers\eShopOnContainers.Core\eShopOnContainers.Core.csproj", "{67F9D3A8-F71E-4428-913F-C37AE82CDB24}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "eShopOnContainers.Core", "src\Mobile\eShopOnContainers\eShopOnContainers.Core\eShopOnContainers.Core.csproj", "{67F9D3A8-F71E-4428-913F-C37AE82CDB24}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTest", "test\Services\UnitTest\UnitTest.csproj", "{7796F5D8-31FC-45A4-B673-19DE5BA194CF}" EndProject @@ -126,12 +126,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventBus.Tests", "src\Build EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.HealthChecks.AzureStorage", "src\BuildingBlocks\HealthChecks\src\Microsoft.Extensions.HealthChecks.AzureStorage\Microsoft.Extensions.HealthChecks.AzureStorage.csproj", "{1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GracePeriodManager", "src\Services\GracePeriod\GracePeriodManager\GracePeriodManager.csproj", "{6C6A69FE-A484-4E75-AFEC-827EA354AF46}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Payment", "Payment", "{D5D3841D-F282-4E60-B9CB-267A1BF2D893}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Payment.API", "src\Services\Payment\Payment.API\Payment.API.csproj", "{2A795FEA-2EB7-45F5-9B30-35E0810CB238}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebHost", "WebHost", "{3E51A82A-5DE1-482E-BA46-F4FF3138B41A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebHost.Customization", "src\BuildingBlocks\WebHostCustomization\WebHost.Customization\WebHost.Customization.csproj", "{BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Ad-Hoc|Any CPU = Ad-Hoc|Any CPU @@ -1781,54 +1783,6 @@ Global {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Release|x64.Build.0 = Release|Any CPU {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Release|x86.ActiveCfg = Release|Any CPU {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD}.Release|x86.Build.0 = Release|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Ad-Hoc|x64.Build.0 = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Ad-Hoc|x86.Build.0 = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.AppStore|ARM.ActiveCfg = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.AppStore|ARM.Build.0 = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.AppStore|iPhone.Build.0 = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.AppStore|x64.ActiveCfg = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.AppStore|x64.Build.0 = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.AppStore|x86.ActiveCfg = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.AppStore|x86.Build.0 = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Debug|ARM.ActiveCfg = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Debug|ARM.Build.0 = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Debug|iPhone.Build.0 = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Debug|x64.ActiveCfg = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Debug|x64.Build.0 = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Debug|x86.ActiveCfg = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Debug|x86.Build.0 = Debug|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Release|Any CPU.Build.0 = Release|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Release|ARM.ActiveCfg = Release|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Release|ARM.Build.0 = Release|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Release|iPhone.ActiveCfg = Release|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Release|iPhone.Build.0 = Release|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Release|x64.ActiveCfg = Release|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Release|x64.Build.0 = Release|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Release|x86.ActiveCfg = Release|Any CPU - {6C6A69FE-A484-4E75-AFEC-827EA354AF46}.Release|x86.Build.0 = Release|Any CPU {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU @@ -1877,6 +1831,54 @@ Global {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Release|x64.Build.0 = Release|Any CPU {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Release|x86.ActiveCfg = Release|Any CPU {2A795FEA-2EB7-45F5-9B30-35E0810CB238}.Release|x86.Build.0 = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|x64.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Ad-Hoc|x86.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|ARM.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|iPhone.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|x64.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|x64.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|x86.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.AppStore|x86.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|ARM.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|ARM.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|iPhone.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|x64.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|x64.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|x86.ActiveCfg = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Debug|x86.Build.0 = Debug|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|Any CPU.Build.0 = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|ARM.ActiveCfg = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|ARM.Build.0 = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|iPhone.ActiveCfg = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|iPhone.Build.0 = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|x64.ActiveCfg = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|x64.Build.0 = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|x86.ActiveCfg = Release|Any CPU + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1934,8 +1936,12 @@ Global {26906157-98E3-4DF8-80F6-866B9686887C} = {B473B70F-0796-4862-B1AD-BB742D93B868} {8AE2AAA3-4507-4BEE-9250-4D16F87015B4} = {B473B70F-0796-4862-B1AD-BB742D93B868} {1CFFC16D-0D4A-47B3-9316-2A04ABD4A7AD} = {96CE8CE7-BC97-4A53-899F-5EB63D7BBF7B} - {6C6A69FE-A484-4E75-AFEC-827EA354AF46} = {0BD0DB92-2D98-44D9-9AC0-C59186D59B0B} {D5D3841D-F282-4E60-B9CB-267A1BF2D893} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8} {2A795FEA-2EB7-45F5-9B30-35E0810CB238} = {D5D3841D-F282-4E60-B9CB-267A1BF2D893} + {3E51A82A-5DE1-482E-BA46-F4FF3138B41A} = {1EF3AC0F-F27C-46DD-AC53-D762D2C11C45} + {BF6AF4F9-684A-4EB3-8CF2-230AA2A03F98} = {3E51A82A-5DE1-482E-BA46-F4FF3138B41A} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A6439048-F270-4A9E-A350-63C7BE2BB322} EndGlobalSection EndGlobal diff --git a/global.json b/global.json index 27654585e..dfad1f9f9 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version":"1.1.0" + "version":"2.0.2" } } \ No newline at end of file diff --git a/img/appinsights/create-insights.PNG b/img/appinsights/create-insights.PNG new file mode 100644 index 000000000..535ae4b98 Binary files /dev/null and b/img/appinsights/create-insights.PNG differ diff --git a/img/appinsights/settings-insights.PNG b/img/appinsights/settings-insights.PNG new file mode 100644 index 000000000..16e6323d3 Binary files /dev/null and b/img/appinsights/settings-insights.PNG differ diff --git a/img/sf/cloud-config-idsrv.PNG b/img/sf/cloud-config-idsrv.PNG new file mode 100644 index 000000000..86fbe6637 Binary files /dev/null and b/img/sf/cloud-config-idsrv.PNG differ diff --git a/img/sf/cloud-config-mvc.PNG b/img/sf/cloud-config-mvc.PNG new file mode 100644 index 000000000..def121836 Binary files /dev/null and b/img/sf/cloud-config-mvc.PNG differ diff --git a/img/sf/cloud-config-spa.PNG b/img/sf/cloud-config-spa.PNG new file mode 100644 index 000000000..17809ea2d Binary files /dev/null and b/img/sf/cloud-config-spa.PNG differ diff --git a/img/sf/cloud-config.PNG b/img/sf/cloud-config.PNG new file mode 100644 index 000000000..420b95e1c Binary files /dev/null and b/img/sf/cloud-config.PNG differ diff --git a/img/sf/cloud_publishProfile.PNG b/img/sf/cloud_publishProfile.PNG new file mode 100644 index 000000000..edd5c53e5 Binary files /dev/null and b/img/sf/cloud_publishProfile.PNG differ diff --git a/img/sf/create-kv.PNG b/img/sf/create-kv.PNG new file mode 100644 index 000000000..f2c5f91c3 Binary files /dev/null and b/img/sf/create-kv.PNG differ diff --git a/img/sf/explorer-apps-status.PNG b/img/sf/explorer-apps-status.PNG new file mode 100644 index 000000000..f748cbaab Binary files /dev/null and b/img/sf/explorer-apps-status.PNG differ diff --git a/img/sf/explorer-deployment-status.PNG b/img/sf/explorer-deployment-status.PNG new file mode 100644 index 000000000..2697a6374 Binary files /dev/null and b/img/sf/explorer-deployment-status.PNG differ diff --git a/img/sf/install-cert.PNG b/img/sf/install-cert.PNG new file mode 100644 index 000000000..f5c798199 Binary files /dev/null and b/img/sf/install-cert.PNG differ diff --git a/img/sf/publish-button.PNG b/img/sf/publish-button.PNG new file mode 100644 index 000000000..8f84091bc Binary files /dev/null and b/img/sf/publish-button.PNG differ diff --git a/img/sf/publish-window.PNG b/img/sf/publish-window.PNG new file mode 100644 index 000000000..4c27b8e29 Binary files /dev/null and b/img/sf/publish-window.PNG differ diff --git a/img/sf/set-instrumentationkey.PNG b/img/sf/set-instrumentationkey.PNG new file mode 100644 index 000000000..1d7105a30 Binary files /dev/null and b/img/sf/set-instrumentationkey.PNG differ diff --git a/img/sf/sf-directory.PNG b/img/sf/sf-directory.PNG new file mode 100644 index 000000000..f6b518a5d Binary files /dev/null and b/img/sf/sf-directory.PNG differ diff --git a/k8s/.kube/schema/v1.5.3/api/v1/schema.json b/k8s/.kube/schema/v1.6.6/api/v1/schema.json similarity index 88% rename from k8s/.kube/schema/v1.5.3/api/v1/schema.json rename to k8s/.kube/schema/v1.6.6/api/v1/schema.json index 2143db573..1fb315f47 100644 --- a/k8s/.kube/schema/v1.5.3/api/v1/schema.json +++ b/k8s/.kube/schema/v1.6.6/api/v1/schema.json @@ -1,7 +1,7 @@ { "swaggerVersion": "1.2", "apiVersion": "v1", - "basePath": "https://10.240.255.5:443", + "basePath": "https://10.240.255.15:443", "resourcePath": "/api/v1", "info": { "title": "", @@ -107,7 +107,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -231,7 +231,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -318,7 +318,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ConfigMap", "nickname": "deletecollectionNamespacedConfigMap", @@ -359,7 +359,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -384,7 +384,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -403,7 +403,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ConfigMap", "nickname": "watchNamespacedConfigMapList", @@ -444,7 +444,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -469,7 +469,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -515,7 +515,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -622,7 +622,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -665,7 +665,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ConfigMap", "nickname": "deleteNamespacedConfigMap", @@ -698,7 +698,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -723,7 +731,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -742,7 +750,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ConfigMap", "nickname": "watchNamespacedConfigMap", @@ -783,7 +791,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -816,7 +824,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -878,7 +886,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -916,7 +924,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ConfigMap", "nickname": "watchConfigMapListForAllNamespaces", @@ -957,7 +965,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -974,7 +982,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1036,7 +1044,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1123,7 +1131,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Endpoints", "nickname": "deletecollectionNamespacedEndpoints", @@ -1164,7 +1172,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1189,7 +1197,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -1208,7 +1216,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Endpoints", "nickname": "watchNamespacedEndpointsList", @@ -1249,7 +1257,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1274,7 +1282,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1320,7 +1328,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -1427,7 +1435,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -1470,7 +1478,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete Endpoints", "nickname": "deleteNamespacedEndpoints", @@ -1503,7 +1511,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -1528,7 +1544,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -1547,7 +1563,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Endpoints", "nickname": "watchNamespacedEndpoints", @@ -1588,7 +1604,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1621,7 +1637,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1683,7 +1699,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1721,7 +1737,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Endpoints", "nickname": "watchEndpointsListForAllNamespaces", @@ -1762,7 +1778,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1779,7 +1795,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1841,7 +1857,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1928,7 +1944,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Event", "nickname": "deletecollectionNamespacedEvent", @@ -1969,7 +1985,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1994,7 +2010,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -2013,7 +2029,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Event", "nickname": "watchNamespacedEventList", @@ -2054,7 +2070,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2079,7 +2095,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2125,7 +2141,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -2232,7 +2248,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -2275,7 +2291,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete an Event", "nickname": "deleteNamespacedEvent", @@ -2308,7 +2324,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -2333,7 +2357,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -2352,7 +2376,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Event", "nickname": "watchNamespacedEvent", @@ -2393,7 +2417,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2426,7 +2450,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2488,7 +2512,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2526,7 +2550,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Event", "nickname": "watchEventListForAllNamespaces", @@ -2567,7 +2591,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2584,7 +2608,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2646,7 +2670,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2733,7 +2757,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of LimitRange", "nickname": "deletecollectionNamespacedLimitRange", @@ -2774,7 +2798,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2799,7 +2823,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -2818,7 +2842,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of LimitRange", "nickname": "watchNamespacedLimitRangeList", @@ -2859,7 +2883,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2884,7 +2908,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2930,7 +2954,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -3037,7 +3061,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -3080,7 +3104,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a LimitRange", "nickname": "deleteNamespacedLimitRange", @@ -3113,7 +3137,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -3138,7 +3170,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -3157,7 +3189,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind LimitRange", "nickname": "watchNamespacedLimitRange", @@ -3198,7 +3230,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3231,7 +3263,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3293,7 +3325,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3331,7 +3363,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of LimitRange", "nickname": "watchLimitRangeListForAllNamespaces", @@ -3372,7 +3404,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3389,7 +3421,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3451,7 +3483,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3520,77 +3552,6 @@ "consumes": [ "*/*" ] - }, - { - "type": "unversioned.Status", - "method": "DELETE", - "summary": "delete collection of Namespace", - "nickname": "deletecollectionNamespace", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "unversioned.Status" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] } ] }, @@ -3599,7 +3560,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Namespace", "nickname": "watchNamespaceList", @@ -3640,7 +3601,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3657,7 +3618,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3703,7 +3664,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -3794,7 +3755,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -3829,7 +3790,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Namespace", "nickname": "deleteNamespace", @@ -3862,7 +3823,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -3879,7 +3848,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -3898,7 +3867,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Namespace", "nickname": "watchNamespace", @@ -3939,7 +3908,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3964,7 +3933,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -4138,7 +4107,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -4220,7 +4189,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -4291,7 +4260,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Node", "nickname": "deletecollectionNode", @@ -4332,7 +4301,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -4349,7 +4318,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -4368,7 +4337,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Node", "nickname": "watchNodeList", @@ -4409,7 +4378,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -4426,7 +4395,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -4472,7 +4441,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -4563,7 +4532,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -4598,7 +4567,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Node", "nickname": "deleteNode", @@ -4631,7 +4600,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -4648,7 +4625,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -4667,7 +4644,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Node", "nickname": "watchNode", @@ -4708,7 +4685,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -4733,7 +4710,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -4843,6 +4820,36 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Node", + "nickname": "proxyPATCHNodeWithPath", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Node", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "path", + "description": "path to the resource", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -5005,6 +5012,28 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Node", + "nickname": "proxyPATCHNode", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Node", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -5598,7 +5627,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -5680,7 +5709,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5767,7 +5796,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of PersistentVolumeClaim", "nickname": "deletecollectionNamespacedPersistentVolumeClaim", @@ -5808,7 +5837,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5833,7 +5862,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -5852,7 +5881,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of PersistentVolumeClaim", "nickname": "watchNamespacedPersistentVolumeClaimList", @@ -5893,7 +5922,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5918,7 +5947,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -5964,7 +5993,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -6071,7 +6100,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -6114,7 +6143,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a PersistentVolumeClaim", "nickname": "deleteNamespacedPersistentVolumeClaim", @@ -6147,7 +6176,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -6172,7 +6209,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -6191,7 +6228,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind PersistentVolumeClaim", "nickname": "watchNamespacedPersistentVolumeClaim", @@ -6232,7 +6269,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6265,7 +6302,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6327,7 +6364,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6365,7 +6402,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of PersistentVolumeClaim", "nickname": "watchPersistentVolumeClaimListForAllNamespaces", @@ -6406,7 +6443,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6423,7 +6460,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6560,7 +6597,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -6650,7 +6687,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6721,7 +6758,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of PersistentVolume", "nickname": "deletecollectionPersistentVolume", @@ -6762,7 +6799,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6779,7 +6816,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -6798,7 +6835,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of PersistentVolume", "nickname": "watchPersistentVolumeList", @@ -6839,7 +6876,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6856,7 +6893,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6902,7 +6939,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -6993,7 +7030,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7028,7 +7065,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a PersistentVolume", "nickname": "deletePersistentVolume", @@ -7061,7 +7098,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -7078,7 +7123,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -7097,7 +7142,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind PersistentVolume", "nickname": "watchPersistentVolume", @@ -7138,7 +7183,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7163,7 +7208,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -7284,7 +7329,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7366,7 +7411,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7453,7 +7498,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Pod", "nickname": "deletecollectionNamespacedPod", @@ -7494,7 +7539,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7519,7 +7564,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -7538,7 +7583,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Pod", "nickname": "watchNamespacedPodList", @@ -7579,7 +7624,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7604,7 +7649,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -7650,7 +7695,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -7757,7 +7802,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7800,7 +7845,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Pod", "nickname": "deleteNamespacedPod", @@ -7833,7 +7878,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -7858,7 +7911,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -7877,7 +7930,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Pod", "nickname": "watchNamespacedPod", @@ -7918,7 +7971,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7951,7 +8004,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -8085,6 +8138,44 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Pod", + "nickname": "proxyPATCHNamespacedPodWithPath", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Pod", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "path", + "description": "path to the resource", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -8295,6 +8386,36 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Pod", + "nickname": "proxyPATCHNamespacedPod", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Pod", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -8433,7 +8554,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -8471,7 +8592,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Pod", "nickname": "watchPodListForAllNamespaces", @@ -8512,7 +8633,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -8529,7 +8650,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -9025,14 +9146,6 @@ "required": false, "allowMultiple": false }, - { - "type": "string", - "paramType": "query", - "name": "sinceTime", - "description": "An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", - "required": false, - "allowMultiple": false - }, { "type": "boolean", "paramType": "query", @@ -9103,6 +9216,14 @@ "summary": "connect GET requests to portforward of Pod", "nickname": "connectGetNamespacedPodPortforward", "parameters": [ + { + "type": "integer", + "paramType": "query", + "name": "ports", + "description": "List of ports to forward Required when using WebSockets", + "required": false, + "allowMultiple": false + }, { "type": "string", "paramType": "path", @@ -9133,6 +9254,14 @@ "summary": "connect POST requests to portforward of Pod", "nickname": "connectPostNamespacedPodPortforward", "parameters": [ + { + "type": "integer", + "paramType": "query", + "name": "ports", + "description": "List of ports to forward Required when using WebSockets", + "required": false, + "allowMultiple": false + }, { "type": "string", "paramType": "path", @@ -9796,7 +9925,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -9886,7 +10015,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -9973,7 +10102,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of PodTemplate", "nickname": "deletecollectionNamespacedPodTemplate", @@ -10014,7 +10143,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10039,7 +10168,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -10058,7 +10187,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of PodTemplate", "nickname": "watchNamespacedPodTemplateList", @@ -10099,7 +10228,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10124,7 +10253,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -10170,7 +10299,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -10277,7 +10406,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -10320,7 +10449,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a PodTemplate", "nickname": "deleteNamespacedPodTemplate", @@ -10353,7 +10482,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -10378,7 +10515,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -10397,7 +10534,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind PodTemplate", "nickname": "watchNamespacedPodTemplate", @@ -10438,7 +10575,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10471,7 +10608,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -10533,7 +10670,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10571,7 +10708,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of PodTemplate", "nickname": "watchPodTemplateListForAllNamespaces", @@ -10612,7 +10749,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10629,7 +10766,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -10691,7 +10828,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10778,7 +10915,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ReplicationController", "nickname": "deletecollectionNamespacedReplicationController", @@ -10819,7 +10956,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10844,7 +10981,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -10863,7 +11000,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ReplicationController", "nickname": "watchNamespacedReplicationControllerList", @@ -10904,7 +11041,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10929,7 +11066,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -10975,7 +11112,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -11082,7 +11219,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -11125,7 +11262,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ReplicationController", "nickname": "deleteNamespacedReplicationController", @@ -11158,7 +11295,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -11183,7 +11328,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -11202,7 +11347,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ReplicationController", "nickname": "watchNamespacedReplicationController", @@ -11243,7 +11388,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -11276,7 +11421,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -11338,7 +11483,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -11376,7 +11521,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ReplicationController", "nickname": "watchReplicationControllerListForAllNamespaces", @@ -11417,7 +11562,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -11434,7 +11579,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -11571,7 +11716,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -11736,7 +11881,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -11826,7 +11971,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -11913,7 +12058,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ResourceQuota", "nickname": "deletecollectionNamespacedResourceQuota", @@ -11954,7 +12099,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -11979,7 +12124,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -11998,7 +12143,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ResourceQuota", "nickname": "watchNamespacedResourceQuotaList", @@ -12039,7 +12184,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12064,7 +12209,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -12110,7 +12255,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -12217,7 +12362,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -12260,7 +12405,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ResourceQuota", "nickname": "deleteNamespacedResourceQuota", @@ -12293,7 +12438,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -12318,7 +12471,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -12337,7 +12490,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ResourceQuota", "nickname": "watchNamespacedResourceQuota", @@ -12378,7 +12531,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12411,7 +12564,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -12473,7 +12626,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12511,7 +12664,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ResourceQuota", "nickname": "watchResourceQuotaListForAllNamespaces", @@ -12552,7 +12705,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12569,7 +12722,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -12706,7 +12859,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -12796,7 +12949,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12883,7 +13036,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Secret", "nickname": "deletecollectionNamespacedSecret", @@ -12924,7 +13077,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12949,7 +13102,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -12968,7 +13121,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Secret", "nickname": "watchNamespacedSecretList", @@ -13009,7 +13162,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13034,7 +13187,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -13080,7 +13233,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -13187,7 +13340,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -13230,7 +13383,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Secret", "nickname": "deleteNamespacedSecret", @@ -13263,7 +13416,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -13288,7 +13449,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -13307,7 +13468,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Secret", "nickname": "watchNamespacedSecret", @@ -13348,7 +13509,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13381,7 +13542,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -13443,7 +13604,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13481,7 +13642,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Secret", "nickname": "watchSecretListForAllNamespaces", @@ -13522,7 +13683,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13539,7 +13700,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -13601,7 +13762,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13688,7 +13849,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ServiceAccount", "nickname": "deletecollectionNamespacedServiceAccount", @@ -13729,7 +13890,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13754,7 +13915,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -13773,7 +13934,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ServiceAccount", "nickname": "watchNamespacedServiceAccountList", @@ -13814,7 +13975,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13839,7 +14000,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -13885,7 +14046,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -13992,7 +14153,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -14035,7 +14196,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ServiceAccount", "nickname": "deleteNamespacedServiceAccount", @@ -14068,7 +14229,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -14093,7 +14262,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -14112,7 +14281,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ServiceAccount", "nickname": "watchNamespacedServiceAccount", @@ -14153,7 +14322,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14186,7 +14355,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -14248,7 +14417,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14286,7 +14455,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ServiceAccount", "nickname": "watchServiceAccountListForAllNamespaces", @@ -14327,7 +14496,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14344,7 +14513,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -14406,7 +14575,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14499,7 +14668,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Service", "nickname": "watchNamespacedServiceList", @@ -14540,7 +14709,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14565,7 +14734,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -14611,7 +14780,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -14718,7 +14887,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -14761,7 +14930,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Service", "nickname": "deleteNamespacedService", @@ -14795,7 +14964,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -14814,7 +14983,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Service", "nickname": "watchNamespacedService", @@ -14855,7 +15024,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14888,7 +15057,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -15022,6 +15191,44 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Service", + "nickname": "proxyPATCHNamespacedServiceWithPath", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Service", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "path", + "description": "path to the resource", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -15232,6 +15439,36 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Service", + "nickname": "proxyPATCHNamespacedService", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Service", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -15370,7 +15607,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -15408,7 +15645,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Service", "nickname": "watchServiceListForAllNamespaces", @@ -15449,7 +15686,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -15466,7 +15703,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -16119,7 +16356,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -16168,7 +16405,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "unversioned.APIResourceList", + "type": "v1.APIResourceList", "method": "GET", "summary": "get available resources", "nickname": "getAPIResources", @@ -16248,12 +16485,10 @@ }, "creationTimestamp": { "type": "string", - "format": "date-time", "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "deletionTimestamp": { "type": "string", - "format": "date-time", "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "deletionGracePeriodSeconds": { @@ -16318,6 +16553,10 @@ "controller": { "type": "boolean", "description": "If true, this reference points to the managing controller." + }, + "blockOwnerDeletion": { + "type": "boolean", + "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned." } } }, @@ -16371,7 +16610,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -16383,8 +16622,8 @@ } } }, - "unversioned.ListMeta": { - "id": "unversioned.ListMeta", + "v1.ListMeta": { + "id": "v1.ListMeta", "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", "properties": { "selfLink": { @@ -16464,7 +16703,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "items": { @@ -16498,8 +16737,8 @@ } } }, - "unversioned.Status": { - "id": "unversioned.Status", + "v1.Status": { + "id": "v1.Status", "description": "Status is a return value for calls that don't return other objects.", "properties": { "kind": { @@ -16511,7 +16750,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "status": { @@ -16527,7 +16766,7 @@ "description": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it." }, "details": { - "$ref": "unversioned.StatusDetails", + "$ref": "v1.StatusDetails", "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "code": { @@ -16537,8 +16776,8 @@ } } }, - "unversioned.StatusDetails": { - "id": "unversioned.StatusDetails", + "v1.StatusDetails": { + "id": "v1.StatusDetails", "description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", "properties": { "name": { @@ -16556,7 +16795,7 @@ "causes": { "type": "array", "items": { - "$ref": "unversioned.StatusCause" + "$ref": "v1.StatusCause" }, "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes." }, @@ -16567,8 +16806,8 @@ } } }, - "unversioned.StatusCause": { - "id": "unversioned.StatusCause", + "v1.StatusCause": { + "id": "v1.StatusCause", "description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", "properties": { "reason": { @@ -16585,8 +16824,8 @@ } } }, - "versioned.Event": { - "id": "versioned.Event", + "v1.WatchEvent": { + "id": "v1.WatchEvent", "required": [ "type", "object" @@ -16600,14 +16839,14 @@ } } }, - "unversioned.Patch": { - "id": "unversioned.Patch", + "v1.Patch": { + "id": "v1.Patch", "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", "properties": {} }, "v1.DeleteOptions": { "id": "v1.DeleteOptions", - "description": "DeleteOptions may be provided when deleting an API object", + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "kind": { "type": "string", @@ -16628,7 +16867,11 @@ }, "orphanDependents": { "type": "boolean", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list." + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both." + }, + "propagationPolicy": { + "$ref": "v1.DeletionPropagation", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy." } } }, @@ -16646,6 +16889,10 @@ "id": "types.UID", "properties": {} }, + "v1.DeletionPropagation": { + "id": "v1.DeletionPropagation", + "properties": {} + }, "v1.EndpointsList": { "id": "v1.EndpointsList", "description": "EndpointsList is a list of endpoints.", @@ -16662,7 +16909,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -16792,7 +17039,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -16842,12 +17089,10 @@ }, "firstTimestamp": { "type": "string", - "format": "date-time", "description": "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)" }, "lastTimestamp": { "type": "string", - "format": "date-time", "description": "The time at which the most recent occurrence of this event was recorded." }, "count": { @@ -16891,7 +17136,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -16987,7 +17232,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -17068,7 +17313,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -17124,7 +17369,40 @@ }, "unschedulable": { "type": "boolean", - "description": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration\"" + "description": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration" + }, + "taints": { + "type": "array", + "items": { + "$ref": "v1.Taint" + }, + "description": "If specified, the node's taints." + } + } + }, + "v1.Taint": { + "id": "v1.Taint", + "description": "The node this Taint is attached to has the effect \"effect\" on any pod that that does not tolerate the Taint.", + "required": [ + "key", + "effect" + ], + "properties": { + "key": { + "type": "string", + "description": "Required. The taint key to be applied to a node." + }, + "value": { + "type": "string", + "description": "Required. The taint value corresponding to the taint key." + }, + "effect": { + "type": "string", + "description": "Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute." + }, + "timeAdded": { + "type": "string", + "description": "TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints." } } }, @@ -17207,12 +17485,10 @@ }, "lastHeartbeatTime": { "type": "string", - "format": "date-time", "description": "Last time we got an update on a given condition." }, "lastTransitionTime": { "type": "string", - "format": "date-time", "description": "Last time the condition transit from one status to another." }, "reason": { @@ -17384,7 +17660,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -17434,7 +17710,7 @@ "description": "AccessModes contains the desired access modes the volume should have. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1" }, "selector": { - "$ref": "unversioned.LabelSelector", + "$ref": "v1.LabelSelector", "description": "A label query over volumes to consider for binding." }, "resources": { @@ -17444,6 +17720,10 @@ "volumeName": { "type": "string", "description": "VolumeName is the binding reference to the PersistentVolume backing this claim." + }, + "storageClassName": { + "type": "string", + "description": "Name of the StorageClass required by the claim. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#class-1" } } }, @@ -17451,8 +17731,8 @@ "id": "v1.PersistentVolumeAccessMode", "properties": {} }, - "unversioned.LabelSelector": { - "id": "unversioned.LabelSelector", + "v1.LabelSelector": { + "id": "v1.LabelSelector", "description": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", "properties": { "matchLabels": { @@ -17462,14 +17742,14 @@ "matchExpressions": { "type": "array", "items": { - "$ref": "unversioned.LabelSelectorRequirement" + "$ref": "v1.LabelSelectorRequirement" }, "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed." } } }, - "unversioned.LabelSelectorRequirement": { - "id": "unversioned.LabelSelectorRequirement", + "v1.LabelSelectorRequirement": { + "id": "v1.LabelSelectorRequirement", "description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", "required": [ "key", @@ -17544,7 +17824,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -17658,6 +17938,14 @@ "$ref": "v1.PhotonPersistentDiskVolumeSource", "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine" }, + "portworxVolume": { + "$ref": "v1.PortworxVolumeSource", + "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine" + }, + "scaleIO": { + "$ref": "v1.ScaleIOVolumeSource", + "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes." + }, "accessModes": { "type": "array", "items": { @@ -17672,6 +17960,10 @@ "persistentVolumeReclaimPolicy": { "type": "string", "description": "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#recycling-policy" + }, + "storageClassName": { + "type": "string", + "description": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass." } } }, @@ -17872,6 +18164,13 @@ "readOnly": { "type": "boolean", "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false." + }, + "portals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260)." } } }, @@ -18125,6 +18424,78 @@ } } }, + "v1.PortworxVolumeSource": { + "id": "v1.PortworxVolumeSource", + "description": "PortworxVolumeSource represents a Portworx volume resource.", + "required": [ + "volumeID" + ], + "properties": { + "volumeID": { + "type": "string", + "description": "VolumeID uniquely identifies a Portworx volume" + }, + "fsType": { + "type": "string", + "description": "FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified." + }, + "readOnly": { + "type": "boolean", + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts." + } + } + }, + "v1.ScaleIOVolumeSource": { + "id": "v1.ScaleIOVolumeSource", + "description": "ScaleIOVolumeSource represents a persistent ScaleIO volume", + "required": [ + "gateway", + "system", + "secretRef" + ], + "properties": { + "gateway": { + "type": "string", + "description": "The host address of the ScaleIO API Gateway." + }, + "system": { + "type": "string", + "description": "The name of the storage system as configured in ScaleIO." + }, + "secretRef": { + "$ref": "v1.LocalObjectReference", + "description": "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail." + }, + "sslEnabled": { + "type": "boolean", + "description": "Flag to enable/disable SSL communication with Gateway, default false" + }, + "protectionDomain": { + "type": "string", + "description": "The name of the Protection Domain for the configured storage (defaults to \"default\")." + }, + "storagePool": { + "type": "string", + "description": "The Storage Pool associated with the protection domain (defaults to \"default\")." + }, + "storageMode": { + "type": "string", + "description": "Indicates whether the storage for a volume should be thick or thin (defaults to \"thin\")." + }, + "volumeName": { + "type": "string", + "description": "The name of a volume already created in the ScaleIO system that is associated with this volume source." + }, + "fsType": { + "type": "string", + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified." + }, + "readOnly": { + "type": "boolean", + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts." + } + } + }, "v1.PersistentVolumeStatus": { "id": "v1.PersistentVolumeStatus", "description": "PersistentVolumeStatus is the current status of a persistent volume.", @@ -18159,7 +18530,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -18211,6 +18582,13 @@ }, "description": "List of volumes that can be mounted by containers belonging to the pod. More info: http://kubernetes.io/docs/user-guide/volumes" }, + "initContainers": { + "type": "array", + "items": { + "$ref": "v1.Container" + }, + "description": "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers" + }, "containers": { "type": "array", "items": { @@ -18234,7 +18612,7 @@ }, "dnsPolicy": { "type": "string", - "description": "Set DNS policy for containers within the pod. One of 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\"." + "description": "Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'." }, "nodeSelector": { "type": "object", @@ -18248,6 +18626,10 @@ "type": "string", "description": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead." }, + "automountServiceAccountToken": { + "type": "boolean", + "description": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted." + }, "nodeName": { "type": "string", "description": "NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements." @@ -18282,6 +18664,21 @@ "subdomain": { "type": "string", "description": "If specified, the fully qualified Pod hostname will be \"\u003chostname\u003e.\u003csubdomain\u003e.\u003cpod namespace\u003e.svc.\u003ccluster domain\u003e\". If not specified, the pod will not have a domainname at all." + }, + "affinity": { + "$ref": "v1.Affinity", + "description": "If specified, the pod's scheduling constraints" + }, + "schedulerName": { + "type": "string", + "description": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler." + }, + "tolerations": { + "type": "array", + "items": { + "$ref": "v1.Toleration" + }, + "description": "If specified, the pod's tolerations." } } }, @@ -18387,6 +18784,18 @@ "photonPersistentDisk": { "$ref": "v1.PhotonPersistentDiskVolumeSource", "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine" + }, + "projected": { + "$ref": "v1.ProjectedVolumeSource", + "description": "Items for all in one resources secrets, configmaps, and downward API" + }, + "portworxVolume": { + "$ref": "v1.PortworxVolumeSource", + "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine" + }, + "scaleIO": { + "$ref": "v1.ScaleIOVolumeSource", + "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes." } } }, @@ -18434,12 +18843,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's keys must be defined" } } }, @@ -18578,12 +18991,110 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's keys must be defined" + } + } + }, + "v1.ProjectedVolumeSource": { + "id": "v1.ProjectedVolumeSource", + "description": "Represents a projected volume source", + "required": [ + "sources" + ], + "properties": { + "sources": { + "type": "array", + "items": { + "$ref": "v1.VolumeProjection" + }, + "description": "list of volume projections" + }, + "defaultMode": { + "type": "integer", + "format": "int32", + "description": "Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + } + } + }, + "v1.VolumeProjection": { + "id": "v1.VolumeProjection", + "description": "Projection that may be projected along with other supported volume types", + "properties": { + "secret": { + "$ref": "v1.SecretProjection", + "description": "information about the secret data to project" + }, + "downwardAPI": { + "$ref": "v1.DownwardAPIProjection", + "description": "information about the downwardAPI data to project" + }, + "configMap": { + "$ref": "v1.ConfigMapProjection", + "description": "information about the configMap data to project" + } + } + }, + "v1.SecretProjection": { + "id": "v1.SecretProjection", + "description": "Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "items": { + "type": "array", + "items": { + "$ref": "v1.KeyToPath" + }, + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or its key must be defined" + } + } + }, + "v1.DownwardAPIProjection": { + "id": "v1.DownwardAPIProjection", + "description": "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "v1.DownwardAPIVolumeFile" + }, + "description": "Items is a list of DownwardAPIVolume file" + } + } + }, + "v1.ConfigMapProjection": { + "id": "v1.ConfigMapProjection", + "description": "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "items": { + "type": "array", + "items": { + "$ref": "v1.KeyToPath" + }, + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's keys must be defined" } } }, @@ -18627,6 +19138,13 @@ }, "description": "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated." }, + "envFrom": { + "type": "array", + "items": { + "$ref": "v1.EnvFromSource" + }, + "description": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated." + }, "env": { "type": "array", "items": { @@ -18659,7 +19177,11 @@ }, "terminationMessagePath": { "type": "string", - "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated." + "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated." + }, + "terminationMessagePolicy": { + "type": "string", + "description": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated." }, "imagePullPolicy": { "type": "string", @@ -18714,6 +19236,52 @@ } } }, + "v1.EnvFromSource": { + "id": "v1.EnvFromSource", + "description": "EnvFromSource represents the source of a set of ConfigMaps", + "properties": { + "prefix": { + "type": "string", + "description": "An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER." + }, + "configMapRef": { + "$ref": "v1.ConfigMapEnvSource", + "description": "The ConfigMap to select from" + }, + "secretRef": { + "$ref": "v1.SecretEnvSource", + "description": "The Secret to select from" + } + } + }, + "v1.ConfigMapEnvSource": { + "id": "v1.ConfigMapEnvSource", + "description": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap must be defined" + } + } + }, + "v1.SecretEnvSource": { + "id": "v1.SecretEnvSource", + "description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret must be defined" + } + } + }, "v1.EnvVar": { "id": "v1.EnvVar", "description": "EnvVar represents an environment variable present in a Container.", @@ -18771,6 +19339,10 @@ "key": { "type": "string", "description": "The key to select." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's key must be defined" } } }, @@ -18788,6 +19360,10 @@ "key": { "type": "string", "description": "The key of the secret to select from. Must be a valid secret key." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's key must be defined" } } }, @@ -19076,6 +19652,224 @@ } } }, + "v1.Affinity": { + "id": "v1.Affinity", + "description": "Affinity is a group of affinity scheduling rules.", + "properties": { + "nodeAffinity": { + "$ref": "v1.NodeAffinity", + "description": "Describes node affinity scheduling rules for the pod." + }, + "podAffinity": { + "$ref": "v1.PodAffinity", + "description": "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s))." + }, + "podAntiAffinity": { + "$ref": "v1.PodAntiAffinity", + "description": "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s))." + } + } + }, + "v1.NodeAffinity": { + "id": "v1.NodeAffinity", + "description": "Node affinity is a group of node affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "$ref": "v1.NodeSelector", + "description": "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PreferredSchedulingTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.NodeSelector": { + "id": "v1.NodeSelector", + "description": "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.", + "required": [ + "nodeSelectorTerms" + ], + "properties": { + "nodeSelectorTerms": { + "type": "array", + "items": { + "$ref": "v1.NodeSelectorTerm" + }, + "description": "Required. A list of node selector terms. The terms are ORed." + } + } + }, + "v1.NodeSelectorTerm": { + "id": "v1.NodeSelectorTerm", + "description": "A null or empty node selector term matches no objects.", + "required": [ + "matchExpressions" + ], + "properties": { + "matchExpressions": { + "type": "array", + "items": { + "$ref": "v1.NodeSelectorRequirement" + }, + "description": "Required. A list of node selector requirements. The requirements are ANDed." + } + } + }, + "v1.NodeSelectorRequirement": { + "id": "v1.NodeSelectorRequirement", + "description": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "required": [ + "key", + "operator" + ], + "properties": { + "key": { + "type": "string", + "description": "The label key that the selector applies to." + }, + "operator": { + "type": "string", + "description": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt." + }, + "values": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch." + } + } + }, + "v1.PreferredSchedulingTerm": { + "id": "v1.PreferredSchedulingTerm", + "description": "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).", + "required": [ + "weight", + "preference" + ], + "properties": { + "weight": { + "type": "integer", + "format": "int32", + "description": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100." + }, + "preference": { + "$ref": "v1.NodeSelectorTerm", + "description": "A node selector term, associated with the corresponding weight." + } + } + }, + "v1.PodAffinity": { + "id": "v1.PodAffinity", + "description": "Pod affinity is a group of inter pod affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PodAffinityTerm" + }, + "description": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.WeightedPodAffinityTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.PodAffinityTerm": { + "id": "v1.PodAffinityTerm", + "description": "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key \u003ctopologyKey\u003e tches that of any node on which a pod of the set of pods is running", + "properties": { + "labelSelector": { + "$ref": "v1.LabelSelector", + "description": "A label query over a set of resources, in this case pods." + }, + "namespaces": { + "type": "array", + "items": { + "type": "string" + }, + "description": "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"" + }, + "topologyKey": { + "type": "string", + "description": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as \"all topologies\" (\"all topologies\" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed." + } + } + }, + "v1.WeightedPodAffinityTerm": { + "id": "v1.WeightedPodAffinityTerm", + "description": "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)", + "required": [ + "weight", + "podAffinityTerm" + ], + "properties": { + "weight": { + "type": "integer", + "format": "int32", + "description": "weight associated with matching the corresponding podAffinityTerm, in the range 1-100." + }, + "podAffinityTerm": { + "$ref": "v1.PodAffinityTerm", + "description": "Required. A pod affinity term, associated with the corresponding weight." + } + } + }, + "v1.PodAntiAffinity": { + "id": "v1.PodAntiAffinity", + "description": "Pod anti affinity is a group of inter pod anti affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PodAffinityTerm" + }, + "description": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.WeightedPodAffinityTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.Toleration": { + "id": "v1.Toleration", + "description": "The pod this Toleration is attached to tolerates any taint that matches the triple \u003ckey,value,effect\u003e using the matching operator \u003coperator\u003e.", + "properties": { + "key": { + "type": "string", + "description": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys." + }, + "operator": { + "type": "string", + "description": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category." + }, + "value": { + "type": "string", + "description": "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string." + }, + "effect": { + "type": "string", + "description": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute." + }, + "tolerationSeconds": { + "type": "integer", + "format": "int64", + "description": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system." + } + } + }, "v1.PodStatus": { "id": "v1.PodStatus", "description": "PodStatus represents information about the status of a pod. Status may trail the actual state of a system.", @@ -19109,15 +19903,25 @@ }, "startTime": { "type": "string", - "format": "date-time", "description": "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod." }, + "initContainerStatuses": { + "type": "array", + "items": { + "$ref": "v1.ContainerStatus" + }, + "description": "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: http://kubernetes.io/docs/user-guide/pod-states#container-statuses" + }, "containerStatuses": { "type": "array", "items": { "$ref": "v1.ContainerStatus" }, "description": "The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: http://kubernetes.io/docs/user-guide/pod-states#container-statuses" + }, + "qosClass": { + "type": "string", + "description": "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md" } } }, @@ -19139,12 +19943,10 @@ }, "lastProbeTime": { "type": "string", - "format": "date-time", "description": "Last time we probed the condition." }, "lastTransitionTime": { "type": "string", - "format": "date-time", "description": "Last time the condition transitioned from one status to another." }, "reason": { @@ -19241,7 +20043,6 @@ "properties": { "startedAt": { "type": "string", - "format": "date-time", "description": "Time at which the container was last (re-)started" } } @@ -19273,12 +20074,10 @@ }, "startedAt": { "type": "string", - "format": "date-time", "description": "Time at which previous execution of the container started" }, "finishedAt": { "type": "string", - "format": "date-time", "description": "Time at which the container last terminated" }, "containerID": { @@ -19325,7 +20124,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19389,7 +20188,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19510,7 +20309,6 @@ }, "lastTransitionTime": { "type": "string", - "format": "date-time", "description": "The last time the condition transitioned from one status to another." }, "reason": { @@ -19594,7 +20392,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19683,7 +20481,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19741,7 +20539,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19782,6 +20580,10 @@ "$ref": "v1.LocalObjectReference" }, "description": "ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: http://kubernetes.io/docs/user-guide/secrets#manually-specifying-an-imagepullsecret" + }, + "automountServiceAccountToken": { + "type": "boolean", + "description": "AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level." } } }, @@ -19801,7 +20603,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19842,9 +20644,6 @@ "v1.ServiceSpec": { "id": "v1.ServiceSpec", "description": "ServiceSpec describes the attributes that a user creates on a service.", - "required": [ - "ports" - ], "properties": { "ports": { "type": "array", @@ -19968,8 +20767,8 @@ } } }, - "unversioned.APIResourceList": { - "id": "unversioned.APIResourceList", + "v1.APIResourceList": { + "id": "v1.APIResourceList", "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", "required": [ "groupVersion", @@ -19991,19 +20790,20 @@ "resources": { "type": "array", "items": { - "$ref": "unversioned.APIResource" + "$ref": "v1.APIResource" }, "description": "resources contains the name of the resources and if they are namespaced." } } }, - "unversioned.APIResource": { - "id": "unversioned.APIResource", + "v1.APIResource": { + "id": "v1.APIResource", "description": "APIResource specifies the name of a resource and whether it is namespaced.", "required": [ "name", "namespaced", - "kind" + "kind", + "verbs" ], "properties": { "name": { @@ -20017,6 +20817,20 @@ "kind": { "type": "string", "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')" + }, + "verbs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)" + }, + "shortNames": { + "type": "array", + "items": { + "type": "string" + }, + "description": "shortNames is a list of suggested short names of the resource." } } } diff --git a/k8s/.kube/schema/v1.5.3/apis/extensions/v1beta1/schema.json b/k8s/.kube/schema/v1.6.6/apis/extensions/v1beta1/schema.json similarity index 83% rename from k8s/.kube/schema/v1.5.3/apis/extensions/v1beta1/schema.json rename to k8s/.kube/schema/v1.6.6/apis/extensions/v1beta1/schema.json index 7f07b38b6..a112d2e67 100644 --- a/k8s/.kube/schema/v1.5.3/apis/extensions/v1beta1/schema.json +++ b/k8s/.kube/schema/v1.6.6/apis/extensions/v1beta1/schema.json @@ -1,7 +1,7 @@ { "swaggerVersion": "1.2", "apiVersion": "extensions/v1beta1", - "basePath": "https://10.240.255.5:443", + "basePath": "https://10.240.255.15:443", "resourcePath": "/apis/extensions/v1beta1", "info": { "title": "", @@ -54,7 +54,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -141,7 +141,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of DaemonSet", "nickname": "deletecollectionNamespacedDaemonSet", @@ -182,7 +182,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -207,7 +207,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -226,7 +226,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of DaemonSet", "nickname": "watchNamespacedDaemonSetList", @@ -267,7 +267,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -292,7 +292,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -338,7 +338,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -445,7 +445,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -488,7 +488,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a DaemonSet", "nickname": "deleteNamespacedDaemonSet", @@ -521,7 +521,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -546,7 +554,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -565,7 +573,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind DaemonSet", "nickname": "watchNamespacedDaemonSet", @@ -606,7 +614,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -639,7 +647,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -701,7 +709,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -739,7 +747,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of DaemonSet", "nickname": "watchDaemonSetListForAllNamespaces", @@ -780,7 +788,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -797,7 +805,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -934,7 +942,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -1024,7 +1032,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1111,7 +1119,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Deployment", "nickname": "deletecollectionNamespacedDeployment", @@ -1152,7 +1160,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1177,7 +1185,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -1196,7 +1204,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Deployment", "nickname": "watchNamespacedDeploymentList", @@ -1237,7 +1245,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1262,7 +1270,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1308,7 +1316,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -1415,7 +1423,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -1458,7 +1466,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Deployment", "nickname": "deleteNamespacedDeployment", @@ -1491,7 +1499,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -1516,7 +1532,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -1535,7 +1551,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Deployment", "nickname": "watchNamespacedDeployment", @@ -1576,7 +1592,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1609,7 +1625,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1671,7 +1687,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1709,7 +1725,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Deployment", "nickname": "watchDeploymentListForAllNamespaces", @@ -1750,7 +1766,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1767,7 +1783,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1965,7 +1981,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -2130,7 +2146,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -2175,14 +2191,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/horizontalpodautoscalers", + "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.HorizontalPodAutoscalerList", + "type": "v1beta1.IngressList", "method": "GET", - "summary": "list or watch objects of kind HorizontalPodAutoscaler", - "nickname": "listNamespacedHorizontalPodAutoscaler", + "summary": "list or watch objects of kind Ingress", + "nickname": "listNamespacedIngress", "parameters": [ { "type": "string", @@ -2220,7 +2236,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2245,7 +2261,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscalerList" + "responseModel": "v1beta1.IngressList" } ], "produces": [ @@ -2260,10 +2276,10 @@ ] }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "POST", - "summary": "create a HorizontalPodAutoscaler", - "nickname": "createNamespacedHorizontalPodAutoscaler", + "summary": "create an Ingress", + "nickname": "createNamespacedIngress", "parameters": [ { "type": "string", @@ -2274,7 +2290,7 @@ "allowMultiple": false }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "paramType": "body", "name": "body", "description": "", @@ -2294,7 +2310,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -2307,10 +2323,10 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", - "summary": "delete collection of HorizontalPodAutoscaler", - "nickname": "deletecollectionNamespacedHorizontalPodAutoscaler", + "summary": "delete collection of Ingress", + "nickname": "deletecollectionNamespacedIngress", "parameters": [ { "type": "string", @@ -2348,7 +2364,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2373,7 +2389,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -2388,14 +2404,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/horizontalpodautoscalers", + "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of HorizontalPodAutoscaler", - "nickname": "watchNamespacedHorizontalPodAutoscalerList", + "summary": "watch individual changes to a list of Ingress", + "nickname": "watchNamespacedIngressList", "parameters": [ { "type": "string", @@ -2433,7 +2449,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2458,7 +2474,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2475,14 +2491,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}", + "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "GET", - "summary": "read the specified HorizontalPodAutoscaler", - "nickname": "readNamespacedHorizontalPodAutoscaler", + "summary": "read the specified Ingress", + "nickname": "readNamespacedIngress", "parameters": [ { "type": "string", @@ -2504,7 +2520,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -2520,7 +2536,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -2529,7 +2545,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -2542,10 +2558,10 @@ ] }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "PUT", - "summary": "replace the specified HorizontalPodAutoscaler", - "nickname": "replaceNamespacedHorizontalPodAutoscaler", + "summary": "replace the specified Ingress", + "nickname": "replaceNamespacedIngress", "parameters": [ { "type": "string", @@ -2556,7 +2572,7 @@ "allowMultiple": false }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "paramType": "body", "name": "body", "description": "", @@ -2575,7 +2591,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -2584,7 +2600,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -2597,10 +2613,10 @@ ] }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "PATCH", - "summary": "partially update the specified HorizontalPodAutoscaler", - "nickname": "patchNamespacedHorizontalPodAutoscaler", + "summary": "partially update the specified Ingress", + "nickname": "patchNamespacedIngress", "parameters": [ { "type": "string", @@ -2611,7 +2627,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -2630,7 +2646,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -2639,7 +2655,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -2654,10 +2670,10 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", - "summary": "delete a HorizontalPodAutoscaler", - "nickname": "deleteNamespacedHorizontalPodAutoscaler", + "summary": "delete an Ingress", + "nickname": "deleteNamespacedIngress", "parameters": [ { "type": "string", @@ -2687,7 +2703,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -2703,7 +2727,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -2712,7 +2736,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -2727,14 +2751,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}", + "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch changes to an object of kind HorizontalPodAutoscaler", - "nickname": "watchNamespacedHorizontalPodAutoscaler", + "summary": "watch changes to an object of kind Ingress", + "nickname": "watchNamespacedIngress", "parameters": [ { "type": "string", @@ -2772,7 +2796,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2796,7 +2820,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -2805,7 +2829,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2822,14 +2846,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/horizontalpodautoscalers", + "path": "/apis/extensions/v1beta1/ingresses", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.HorizontalPodAutoscalerList", + "type": "v1beta1.IngressList", "method": "GET", - "summary": "list or watch objects of kind HorizontalPodAutoscaler", - "nickname": "listHorizontalPodAutoscalerForAllNamespaces", + "summary": "list or watch objects of kind Ingress", + "nickname": "listIngressForAllNamespaces", "parameters": [ { "type": "string", @@ -2867,7 +2891,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2884,7 +2908,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscalerList" + "responseModel": "v1beta1.IngressList" } ], "produces": [ @@ -2901,14 +2925,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/horizontalpodautoscalers", + "path": "/apis/extensions/v1beta1/watch/ingresses", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of HorizontalPodAutoscaler", - "nickname": "watchHorizontalPodAutoscalerListForAllNamespaces", + "summary": "watch individual changes to a list of Ingress", + "nickname": "watchIngressListForAllNamespaces", "parameters": [ { "type": "string", @@ -2946,7 +2970,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2963,7 +2987,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2980,14 +3004,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status", + "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}/status", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "GET", - "summary": "read status of the specified HorizontalPodAutoscaler", - "nickname": "readNamespacedHorizontalPodAutoscalerStatus", + "summary": "read status of the specified Ingress", + "nickname": "readNamespacedIngressStatus", "parameters": [ { "type": "string", @@ -3009,7 +3033,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -3018,7 +3042,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -3031,10 +3055,10 @@ ] }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "PUT", - "summary": "replace status of the specified HorizontalPodAutoscaler", - "nickname": "replaceNamespacedHorizontalPodAutoscalerStatus", + "summary": "replace status of the specified Ingress", + "nickname": "replaceNamespacedIngressStatus", "parameters": [ { "type": "string", @@ -3045,7 +3069,7 @@ "allowMultiple": false }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "paramType": "body", "name": "body", "description": "", @@ -3064,7 +3088,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -3073,7 +3097,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -3086,10 +3110,10 @@ ] }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "PATCH", - "summary": "partially update status of the specified HorizontalPodAutoscaler", - "nickname": "patchNamespacedHorizontalPodAutoscalerStatus", + "summary": "partially update status of the specified Ingress", + "nickname": "patchNamespacedIngressStatus", "parameters": [ { "type": "string", @@ -3100,7 +3124,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -3119,7 +3143,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -3128,7 +3152,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -3145,14 +3169,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses", + "path": "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.IngressList", + "type": "v1beta1.NetworkPolicyList", "method": "GET", - "summary": "list or watch objects of kind Ingress", - "nickname": "listNamespacedIngress", + "summary": "list or watch objects of kind NetworkPolicy", + "nickname": "listNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3190,7 +3214,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3215,7 +3239,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.IngressList" + "responseModel": "v1beta1.NetworkPolicyList" } ], "produces": [ @@ -3230,10 +3254,10 @@ ] }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "method": "POST", - "summary": "create an Ingress", - "nickname": "createNamespacedIngress", + "summary": "create a NetworkPolicy", + "nickname": "createNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3244,7 +3268,7 @@ "allowMultiple": false }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "paramType": "body", "name": "body", "description": "", @@ -3264,7 +3288,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.NetworkPolicy" } ], "produces": [ @@ -3277,10 +3301,10 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", - "summary": "delete collection of Ingress", - "nickname": "deletecollectionNamespacedIngress", + "summary": "delete collection of NetworkPolicy", + "nickname": "deletecollectionNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3318,7 +3342,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3343,7 +3367,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -3358,14 +3382,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses", + "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of Ingress", - "nickname": "watchNamespacedIngressList", + "summary": "watch individual changes to a list of NetworkPolicy", + "nickname": "watchNamespacedNetworkPolicyList", "parameters": [ { "type": "string", @@ -3403,7 +3427,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3428,7 +3452,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3445,14 +3469,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}", + "path": "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "method": "GET", - "summary": "read the specified Ingress", - "nickname": "readNamespacedIngress", + "summary": "read the specified NetworkPolicy", + "nickname": "readNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3474,7 +3498,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -3490,7 +3514,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the Ingress", + "description": "name of the NetworkPolicy", "required": true, "allowMultiple": false } @@ -3499,7 +3523,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.NetworkPolicy" } ], "produces": [ @@ -3512,10 +3536,10 @@ ] }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "method": "PUT", - "summary": "replace the specified Ingress", - "nickname": "replaceNamespacedIngress", + "summary": "replace the specified NetworkPolicy", + "nickname": "replaceNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3526,7 +3550,7 @@ "allowMultiple": false }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "paramType": "body", "name": "body", "description": "", @@ -3545,7 +3569,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the Ingress", + "description": "name of the NetworkPolicy", "required": true, "allowMultiple": false } @@ -3554,7 +3578,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.NetworkPolicy" } ], "produces": [ @@ -3567,10 +3591,10 @@ ] }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "method": "PATCH", - "summary": "partially update the specified Ingress", - "nickname": "patchNamespacedIngress", + "summary": "partially update the specified NetworkPolicy", + "nickname": "patchNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3581,7 +3605,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -3600,7 +3624,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the Ingress", + "description": "name of the NetworkPolicy", "required": true, "allowMultiple": false } @@ -3609,7 +3633,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.NetworkPolicy" } ], "produces": [ @@ -3624,10 +3648,10 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", - "summary": "delete an Ingress", - "nickname": "deleteNamespacedIngress", + "summary": "delete a NetworkPolicy", + "nickname": "deleteNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3657,7 +3681,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -3673,7 +3705,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the Ingress", + "description": "name of the NetworkPolicy", "required": true, "allowMultiple": false } @@ -3682,7 +3714,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -3697,14 +3729,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses/{name}", + "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch changes to an object of kind Ingress", - "nickname": "watchNamespacedIngress", + "summary": "watch changes to an object of kind NetworkPolicy", + "nickname": "watchNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3742,7 +3774,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3766,7 +3798,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the Ingress", + "description": "name of the NetworkPolicy", "required": true, "allowMultiple": false } @@ -3775,7 +3807,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3792,14 +3824,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/ingresses", + "path": "/apis/extensions/v1beta1/networkpolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.IngressList", + "type": "v1beta1.NetworkPolicyList", "method": "GET", - "summary": "list or watch objects of kind Ingress", - "nickname": "listIngressForAllNamespaces", + "summary": "list or watch objects of kind NetworkPolicy", + "nickname": "listNetworkPolicyForAllNamespaces", "parameters": [ { "type": "string", @@ -3837,7 +3869,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3854,7 +3886,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.IngressList" + "responseModel": "v1beta1.NetworkPolicyList" } ], "produces": [ @@ -3871,14 +3903,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/ingresses", + "path": "/apis/extensions/v1beta1/watch/networkpolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of Ingress", - "nickname": "watchIngressListForAllNamespaces", + "summary": "watch individual changes to a list of NetworkPolicy", + "nickname": "watchNetworkPolicyListForAllNamespaces", "parameters": [ { "type": "string", @@ -3916,7 +3948,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3933,7 +3965,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3950,14 +3982,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}/status", + "path": "/apis/extensions/v1beta1/podsecuritypolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.Ingress", + "type": "v1beta1.PodSecurityPolicyList", "method": "GET", - "summary": "read status of the specified Ingress", - "nickname": "readNamespacedIngressStatus", + "summary": "list or watch objects of kind PodSecurityPolicy", + "nickname": "listPodSecurityPolicy", "parameters": [ { "type": "string", @@ -3969,18 +4001,42 @@ }, { "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, "allowMultiple": false }, { "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Ingress", - "required": true, + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, "allowMultiple": false } ], @@ -3988,23 +4044,25 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.PodSecurityPolicyList" } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" ], "consumes": [ "*/*" ] }, { - "type": "v1beta1.Ingress", - "method": "PUT", - "summary": "replace status of the specified Ingress", - "nickname": "replaceNamespacedIngressStatus", + "type": "v1beta1.PodSecurityPolicy", + "method": "POST", + "summary": "create a PodSecurityPolicy", + "nickname": "createPodSecurityPolicy", "parameters": [ { "type": "string", @@ -4015,35 +4073,19 @@ "allowMultiple": false }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.PodSecurityPolicy", "paramType": "body", "name": "body", "description": "", "required": true, "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Ingress", - "required": true, - "allowMultiple": false } ], "responseMessages": [ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.PodSecurityPolicy" } ], "produces": [ @@ -4056,1171 +4098,10 @@ ] }, { - "type": "v1beta1.Ingress", - "method": "PATCH", - "summary": "partially update status of the specified Ingress", - "nickname": "patchNamespacedIngressStatus", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "unversioned.Patch", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Ingress", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Ingress" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/jobs", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "v1beta1.JobList", - "method": "GET", - "summary": "list or watch objects of kind Job", - "nickname": "listNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.JobList" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.Job", - "method": "POST", - "summary": "create a Job", - "nickname": "createNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "v1beta1.Job", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "unversioned.Status", - "method": "DELETE", - "summary": "delete collection of Job", - "nickname": "deletecollectionNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "unversioned.Status" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/jobs", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "versioned.Event", - "method": "GET", - "summary": "watch individual changes to a list of Job", - "nickname": "watchNamespacedJobList", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "versioned.Event" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/jobs/{name}", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "v1beta1.Job", - "method": "GET", - "summary": "read the specified Job", - "nickname": "readNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "export", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.Job", - "method": "PUT", - "summary": "replace the specified Job", - "nickname": "replaceNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "v1beta1.Job", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.Job", - "method": "PATCH", - "summary": "partially update the specified Job", - "nickname": "patchNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "unversioned.Patch", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ] - }, - { - "type": "unversioned.Status", - "method": "DELETE", - "summary": "delete a Job", - "nickname": "deleteNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "v1.DeleteOptions", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "gracePeriodSeconds", - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "unversioned.Status" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/jobs/{name}", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "versioned.Event", - "method": "GET", - "summary": "watch changes to an object of kind Job", - "nickname": "watchNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "versioned.Event" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/jobs", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "v1beta1.JobList", - "method": "GET", - "summary": "list or watch objects of kind Job", - "nickname": "listJobForAllNamespaces", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.JobList" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/watch/jobs", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "versioned.Event", - "method": "GET", - "summary": "watch individual changes to a list of Job", - "nickname": "watchJobListForAllNamespaces", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "versioned.Event" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/jobs/{name}/status", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "v1beta1.Job", - "method": "GET", - "summary": "read status of the specified Job", - "nickname": "readNamespacedJobStatus", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.Job", - "method": "PUT", - "summary": "replace status of the specified Job", - "nickname": "replaceNamespacedJobStatus", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "v1beta1.Job", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.Job", - "method": "PATCH", - "summary": "partially update status of the specified Job", - "nickname": "patchNamespacedJobStatus", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "unversioned.Patch", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "v1beta1.NetworkPolicyList", - "method": "GET", - "summary": "list or watch objects of kind NetworkPolicy", - "nickname": "listNamespacedNetworkPolicy", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.NetworkPolicyList" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.NetworkPolicy", - "method": "POST", - "summary": "create a NetworkPolicy", - "nickname": "createNamespacedNetworkPolicy", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "v1beta1.NetworkPolicy", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.NetworkPolicy" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", - "summary": "delete collection of NetworkPolicy", - "nickname": "deletecollectionNamespacedNetworkPolicy", + "summary": "delete collection of PodSecurityPolicy", + "nickname": "deletecollectionPodSecurityPolicy", "parameters": [ { "type": "string", @@ -5258,7 +4139,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5269,21 +4150,13 @@ "description": "Timeout for the list/watch call.", "required": false, "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false } ], "responseMessages": [ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -5298,14 +4171,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies", + "path": "/apis/extensions/v1beta1/watch/podsecuritypolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of NetworkPolicy", - "nickname": "watchNamespacedNetworkPolicyList", + "summary": "watch individual changes to a list of PodSecurityPolicy", + "nickname": "watchPodSecurityPolicyList", "parameters": [ { "type": "string", @@ -5343,7 +4216,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5354,21 +4227,13 @@ "description": "Timeout for the list/watch call.", "required": false, "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false } ], "responseMessages": [ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -5385,14 +4250,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}", + "path": "/apis/extensions/v1beta1/podsecuritypolicies/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.NetworkPolicy", + "type": "v1beta1.PodSecurityPolicy", "method": "GET", - "summary": "read the specified NetworkPolicy", - "nickname": "readNamespacedNetworkPolicy", + "summary": "read the specified PodSecurityPolicy", + "nickname": "readPodSecurityPolicy", "parameters": [ { "type": "string", @@ -5414,23 +4279,15 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, { "type": "string", "paramType": "path", "name": "name", - "description": "name of the NetworkPolicy", + "description": "name of the PodSecurityPolicy", "required": true, "allowMultiple": false } @@ -5439,7 +4296,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.NetworkPolicy" + "responseModel": "v1beta1.PodSecurityPolicy" } ], "produces": [ @@ -5452,10 +4309,10 @@ ] }, { - "type": "v1beta1.NetworkPolicy", + "type": "v1beta1.PodSecurityPolicy", "method": "PUT", - "summary": "replace the specified NetworkPolicy", - "nickname": "replaceNamespacedNetworkPolicy", + "summary": "replace the specified PodSecurityPolicy", + "nickname": "replacePodSecurityPolicy", "parameters": [ { "type": "string", @@ -5466,26 +4323,18 @@ "allowMultiple": false }, { - "type": "v1beta1.NetworkPolicy", + "type": "v1beta1.PodSecurityPolicy", "paramType": "body", "name": "body", "description": "", "required": true, "allowMultiple": false }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, { "type": "string", "paramType": "path", "name": "name", - "description": "name of the NetworkPolicy", + "description": "name of the PodSecurityPolicy", "required": true, "allowMultiple": false } @@ -5494,7 +4343,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.NetworkPolicy" + "responseModel": "v1beta1.PodSecurityPolicy" } ], "produces": [ @@ -5507,67 +4356,10 @@ ] }, { - "type": "v1beta1.NetworkPolicy", + "type": "v1beta1.PodSecurityPolicy", "method": "PATCH", - "summary": "partially update the specified NetworkPolicy", - "nickname": "patchNamespacedNetworkPolicy", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "unversioned.Patch", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the NetworkPolicy", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.NetworkPolicy" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ] - }, - { - "type": "unversioned.Status", - "method": "DELETE", - "summary": "delete a NetworkPolicy", - "nickname": "deleteNamespacedNetworkPolicy", + "summary": "partially update the specified PodSecurityPolicy", + "nickname": "patchPodSecurityPolicy", "parameters": [ { "type": "string", @@ -5578,127 +4370,10 @@ "allowMultiple": false }, { - "type": "v1.DeleteOptions", + "type": "v1.Patch", "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "gracePeriodSeconds", - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the NetworkPolicy", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "unversioned.Status" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies/{name}", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "versioned.Event", - "method": "GET", - "summary": "watch changes to an object of kind NetworkPolicy", - "nickname": "watchNamespacedNetworkPolicy", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", + "name": "body", + "description": "", "required": true, "allowMultiple": false }, @@ -5706,7 +4381,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the NetworkPolicy", + "description": "name of the PodSecurityPolicy", "required": true, "allowMultiple": false } @@ -5715,31 +4390,25 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1beta1.PodSecurityPolicy" } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf" ], "consumes": [ - "*/*" + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/networkpolicies", - "description": "API at /apis/extensions/v1beta1", - "operations": [ + }, { - "type": "v1beta1.NetworkPolicyList", - "method": "GET", - "summary": "list or watch objects of kind NetworkPolicy", - "nickname": "listNetworkPolicyForAllNamespaces", + "type": "v1.Status", + "method": "DELETE", + "summary": "delete a PodSecurityPolicy", + "nickname": "deletePodSecurityPolicy", "parameters": [ { "type": "string", @@ -5750,43 +4419,43 @@ "allowMultiple": false }, { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, + "type": "v1.DeleteOptions", + "paramType": "body", + "name": "body", + "description": "", + "required": true, "allowMultiple": false }, { - "type": "string", + "type": "integer", "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "gracePeriodSeconds", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", "required": false, "allowMultiple": false }, { "type": "boolean", "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "orphanDependents", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "required": false, "allowMultiple": false }, { "type": "string", "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the PodSecurityPolicy", + "required": true, "allowMultiple": false } ], @@ -5794,15 +4463,13 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.NetworkPolicyList" + "responseModel": "v1.Status" } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf" ], "consumes": [ "*/*" @@ -5811,14 +4478,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/networkpolicies", + "path": "/apis/extensions/v1beta1/watch/podsecuritypolicies/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of NetworkPolicy", - "nickname": "watchNetworkPolicyListForAllNamespaces", + "summary": "watch changes to an object of kind PodSecurityPolicy", + "nickname": "watchPodSecurityPolicy", "parameters": [ { "type": "string", @@ -5856,7 +4523,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5867,13 +4534,21 @@ "description": "Timeout for the list/watch call.", "required": false, "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the PodSecurityPolicy", + "required": true, + "allowMultiple": false } ], "responseMessages": [ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -5935,7 +4610,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6022,7 +4697,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ReplicaSet", "nickname": "deletecollectionNamespacedReplicaSet", @@ -6063,7 +4738,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6088,7 +4763,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -6107,7 +4782,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ReplicaSet", "nickname": "watchNamespacedReplicaSetList", @@ -6148,7 +4823,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6173,7 +4848,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6219,7 +4894,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -6326,7 +5001,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -6369,7 +5044,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ReplicaSet", "nickname": "deleteNamespacedReplicaSet", @@ -6402,7 +5077,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -6427,7 +5110,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -6446,7 +5129,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ReplicaSet", "nickname": "watchNamespacedReplicaSet", @@ -6487,7 +5170,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6520,7 +5203,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6582,7 +5265,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6620,7 +5303,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ReplicaSet", "nickname": "watchReplicaSetListForAllNamespaces", @@ -6661,7 +5344,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6678,7 +5361,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6815,7 +5498,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -6980,7 +5663,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7145,7 +5828,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7235,7 +5918,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7306,7 +5989,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ThirdPartyResource", "nickname": "deletecollectionThirdPartyResource", @@ -7347,7 +6030,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7364,7 +6047,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -7383,7 +6066,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ThirdPartyResource", "nickname": "watchThirdPartyResourceList", @@ -7424,7 +6107,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7441,7 +6124,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -7487,7 +6170,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -7578,7 +6261,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7613,7 +6296,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ThirdPartyResource", "nickname": "deleteThirdPartyResource", @@ -7646,7 +6329,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -7663,7 +6354,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -7682,7 +6373,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ThirdPartyResource", "nickname": "watchThirdPartyResource", @@ -7723,7 +6414,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7748,7 +6439,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -7769,7 +6460,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "unversioned.APIResourceList", + "type": "v1.APIResourceList", "method": "GET", "summary": "get available resources", "nickname": "getAPIResources", @@ -7805,7 +6496,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "items": { @@ -7813,12 +6504,12 @@ "items": { "$ref": "v1beta1.DaemonSet" }, - "description": "Items is a list of daemon sets." + "description": "A list of daemon sets." } } }, - "unversioned.ListMeta": { - "id": "unversioned.ListMeta", + "v1.ListMeta": { + "id": "v1.ListMeta", "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", "properties": { "selfLink": { @@ -7849,11 +6540,11 @@ }, "spec": { "$ref": "v1beta1.DaemonSetSpec", - "description": "Spec defines the desired behavior of this daemon set. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" + "description": "The desired behavior of this daemon set. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" }, "status": { "$ref": "v1beta1.DaemonSetStatus", - "description": "Status is the current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" + "description": "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" } } }, @@ -7892,12 +6583,10 @@ }, "creationTimestamp": { "type": "string", - "format": "date-time", "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "deletionTimestamp": { "type": "string", - "format": "date-time", "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "deletionGracePeriodSeconds": { @@ -7962,6 +6651,10 @@ "controller": { "type": "boolean", "description": "If true, this reference points to the managing controller." + }, + "blockOwnerDeletion": { + "type": "boolean", + "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned." } } }, @@ -7973,17 +6666,31 @@ ], "properties": { "selector": { - "$ref": "unversioned.LabelSelector", - "description": "Selector is a label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" + "$ref": "v1.LabelSelector", + "description": "A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" }, "template": { "$ref": "v1.PodTemplateSpec", - "description": "Template is the object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template" + "description": "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template" + }, + "updateStrategy": { + "$ref": "v1beta1.DaemonSetUpdateStrategy", + "description": "An update strategy to replace existing DaemonSet pods with new pods." + }, + "minReadySeconds": { + "type": "integer", + "format": "int32", + "description": "The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)." + }, + "templateGeneration": { + "type": "integer", + "format": "int64", + "description": "A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation." } } }, - "unversioned.LabelSelector": { - "id": "unversioned.LabelSelector", + "v1.LabelSelector": { + "id": "v1.LabelSelector", "description": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", "properties": { "matchLabels": { @@ -7993,14 +6700,14 @@ "matchExpressions": { "type": "array", "items": { - "$ref": "unversioned.LabelSelectorRequirement" + "$ref": "v1.LabelSelectorRequirement" }, "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed." } } }, - "unversioned.LabelSelectorRequirement": { - "id": "unversioned.LabelSelectorRequirement", + "v1.LabelSelectorRequirement": { + "id": "v1.LabelSelectorRequirement", "description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", "required": [ "key", @@ -8052,6 +6759,13 @@ }, "description": "List of volumes that can be mounted by containers belonging to the pod. More info: http://kubernetes.io/docs/user-guide/volumes" }, + "initContainers": { + "type": "array", + "items": { + "$ref": "v1.Container" + }, + "description": "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers" + }, "containers": { "type": "array", "items": { @@ -8075,7 +6789,7 @@ }, "dnsPolicy": { "type": "string", - "description": "Set DNS policy for containers within the pod. One of 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\"." + "description": "Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'." }, "nodeSelector": { "type": "object", @@ -8089,6 +6803,10 @@ "type": "string", "description": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead." }, + "automountServiceAccountToken": { + "type": "boolean", + "description": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted." + }, "nodeName": { "type": "string", "description": "NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements." @@ -8123,6 +6841,21 @@ "subdomain": { "type": "string", "description": "If specified, the fully qualified Pod hostname will be \"\u003chostname\u003e.\u003csubdomain\u003e.\u003cpod namespace\u003e.svc.\u003ccluster domain\u003e\". If not specified, the pod will not have a domainname at all." + }, + "affinity": { + "$ref": "v1.Affinity", + "description": "If specified, the pod's scheduling constraints" + }, + "schedulerName": { + "type": "string", + "description": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler." + }, + "tolerations": { + "type": "array", + "items": { + "$ref": "v1.Toleration" + }, + "description": "If specified, the pod's tolerations." } } }, @@ -8228,6 +6961,18 @@ "photonPersistentDisk": { "$ref": "v1.PhotonPersistentDiskVolumeSource", "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine" + }, + "projected": { + "$ref": "v1.ProjectedVolumeSource", + "description": "Items for all in one resources secrets, configmaps, and downward API" + }, + "portworxVolume": { + "$ref": "v1.PortworxVolumeSource", + "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine" + }, + "scaleIO": { + "$ref": "v1.ScaleIOVolumeSource", + "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes." } } }, @@ -8340,12 +7085,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's keys must be defined" } } }, @@ -8427,6 +7176,13 @@ "readOnly": { "type": "boolean", "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false." + }, + "portals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260)." } } }, @@ -8771,12 +7527,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's keys must be defined" } } }, @@ -8878,6 +7638,172 @@ } } }, + "v1.ProjectedVolumeSource": { + "id": "v1.ProjectedVolumeSource", + "description": "Represents a projected volume source", + "required": [ + "sources" + ], + "properties": { + "sources": { + "type": "array", + "items": { + "$ref": "v1.VolumeProjection" + }, + "description": "list of volume projections" + }, + "defaultMode": { + "type": "integer", + "format": "int32", + "description": "Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + } + } + }, + "v1.VolumeProjection": { + "id": "v1.VolumeProjection", + "description": "Projection that may be projected along with other supported volume types", + "properties": { + "secret": { + "$ref": "v1.SecretProjection", + "description": "information about the secret data to project" + }, + "downwardAPI": { + "$ref": "v1.DownwardAPIProjection", + "description": "information about the downwardAPI data to project" + }, + "configMap": { + "$ref": "v1.ConfigMapProjection", + "description": "information about the configMap data to project" + } + } + }, + "v1.SecretProjection": { + "id": "v1.SecretProjection", + "description": "Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "items": { + "type": "array", + "items": { + "$ref": "v1.KeyToPath" + }, + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or its key must be defined" + } + } + }, + "v1.DownwardAPIProjection": { + "id": "v1.DownwardAPIProjection", + "description": "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "v1.DownwardAPIVolumeFile" + }, + "description": "Items is a list of DownwardAPIVolume file" + } + } + }, + "v1.ConfigMapProjection": { + "id": "v1.ConfigMapProjection", + "description": "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "items": { + "type": "array", + "items": { + "$ref": "v1.KeyToPath" + }, + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's keys must be defined" + } + } + }, + "v1.PortworxVolumeSource": { + "id": "v1.PortworxVolumeSource", + "description": "PortworxVolumeSource represents a Portworx volume resource.", + "required": [ + "volumeID" + ], + "properties": { + "volumeID": { + "type": "string", + "description": "VolumeID uniquely identifies a Portworx volume" + }, + "fsType": { + "type": "string", + "description": "FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified." + }, + "readOnly": { + "type": "boolean", + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts." + } + } + }, + "v1.ScaleIOVolumeSource": { + "id": "v1.ScaleIOVolumeSource", + "description": "ScaleIOVolumeSource represents a persistent ScaleIO volume", + "required": [ + "gateway", + "system", + "secretRef" + ], + "properties": { + "gateway": { + "type": "string", + "description": "The host address of the ScaleIO API Gateway." + }, + "system": { + "type": "string", + "description": "The name of the storage system as configured in ScaleIO." + }, + "secretRef": { + "$ref": "v1.LocalObjectReference", + "description": "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail." + }, + "sslEnabled": { + "type": "boolean", + "description": "Flag to enable/disable SSL communication with Gateway, default false" + }, + "protectionDomain": { + "type": "string", + "description": "The name of the Protection Domain for the configured storage (defaults to \"default\")." + }, + "storagePool": { + "type": "string", + "description": "The Storage Pool associated with the protection domain (defaults to \"default\")." + }, + "storageMode": { + "type": "string", + "description": "Indicates whether the storage for a volume should be thick or thin (defaults to \"thin\")." + }, + "volumeName": { + "type": "string", + "description": "The name of a volume already created in the ScaleIO system that is associated with this volume source." + }, + "fsType": { + "type": "string", + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified." + }, + "readOnly": { + "type": "boolean", + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts." + } + } + }, "v1.Container": { "id": "v1.Container", "description": "A single application container that you want to run within a pod.", @@ -8918,6 +7844,13 @@ }, "description": "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated." }, + "envFrom": { + "type": "array", + "items": { + "$ref": "v1.EnvFromSource" + }, + "description": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated." + }, "env": { "type": "array", "items": { @@ -8950,7 +7883,11 @@ }, "terminationMessagePath": { "type": "string", - "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated." + "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated." + }, + "terminationMessagePolicy": { + "type": "string", + "description": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated." }, "imagePullPolicy": { "type": "string", @@ -9005,6 +7942,52 @@ } } }, + "v1.EnvFromSource": { + "id": "v1.EnvFromSource", + "description": "EnvFromSource represents the source of a set of ConfigMaps", + "properties": { + "prefix": { + "type": "string", + "description": "An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER." + }, + "configMapRef": { + "$ref": "v1.ConfigMapEnvSource", + "description": "The ConfigMap to select from" + }, + "secretRef": { + "$ref": "v1.SecretEnvSource", + "description": "The Secret to select from" + } + } + }, + "v1.ConfigMapEnvSource": { + "id": "v1.ConfigMapEnvSource", + "description": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap must be defined" + } + } + }, + "v1.SecretEnvSource": { + "id": "v1.SecretEnvSource", + "description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret must be defined" + } + } + }, "v1.EnvVar": { "id": "v1.EnvVar", "description": "EnvVar represents an environment variable present in a Container.", @@ -9062,6 +8045,10 @@ "key": { "type": "string", "description": "The key to select." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's key must be defined" } } }, @@ -9079,6 +8066,10 @@ "key": { "type": "string", "description": "The key of the secret to select from. Must be a valid secret key." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's key must be defined" } } }, @@ -9381,6 +8372,247 @@ } } }, + "v1.Affinity": { + "id": "v1.Affinity", + "description": "Affinity is a group of affinity scheduling rules.", + "properties": { + "nodeAffinity": { + "$ref": "v1.NodeAffinity", + "description": "Describes node affinity scheduling rules for the pod." + }, + "podAffinity": { + "$ref": "v1.PodAffinity", + "description": "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s))." + }, + "podAntiAffinity": { + "$ref": "v1.PodAntiAffinity", + "description": "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s))." + } + } + }, + "v1.NodeAffinity": { + "id": "v1.NodeAffinity", + "description": "Node affinity is a group of node affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "$ref": "v1.NodeSelector", + "description": "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PreferredSchedulingTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.NodeSelector": { + "id": "v1.NodeSelector", + "description": "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.", + "required": [ + "nodeSelectorTerms" + ], + "properties": { + "nodeSelectorTerms": { + "type": "array", + "items": { + "$ref": "v1.NodeSelectorTerm" + }, + "description": "Required. A list of node selector terms. The terms are ORed." + } + } + }, + "v1.NodeSelectorTerm": { + "id": "v1.NodeSelectorTerm", + "description": "A null or empty node selector term matches no objects.", + "required": [ + "matchExpressions" + ], + "properties": { + "matchExpressions": { + "type": "array", + "items": { + "$ref": "v1.NodeSelectorRequirement" + }, + "description": "Required. A list of node selector requirements. The requirements are ANDed." + } + } + }, + "v1.NodeSelectorRequirement": { + "id": "v1.NodeSelectorRequirement", + "description": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "required": [ + "key", + "operator" + ], + "properties": { + "key": { + "type": "string", + "description": "The label key that the selector applies to." + }, + "operator": { + "type": "string", + "description": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt." + }, + "values": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch." + } + } + }, + "v1.PreferredSchedulingTerm": { + "id": "v1.PreferredSchedulingTerm", + "description": "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).", + "required": [ + "weight", + "preference" + ], + "properties": { + "weight": { + "type": "integer", + "format": "int32", + "description": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100." + }, + "preference": { + "$ref": "v1.NodeSelectorTerm", + "description": "A node selector term, associated with the corresponding weight." + } + } + }, + "v1.PodAffinity": { + "id": "v1.PodAffinity", + "description": "Pod affinity is a group of inter pod affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PodAffinityTerm" + }, + "description": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.WeightedPodAffinityTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.PodAffinityTerm": { + "id": "v1.PodAffinityTerm", + "description": "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key \u003ctopologyKey\u003e tches that of any node on which a pod of the set of pods is running", + "properties": { + "labelSelector": { + "$ref": "v1.LabelSelector", + "description": "A label query over a set of resources, in this case pods." + }, + "namespaces": { + "type": "array", + "items": { + "type": "string" + }, + "description": "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"" + }, + "topologyKey": { + "type": "string", + "description": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as \"all topologies\" (\"all topologies\" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed." + } + } + }, + "v1.WeightedPodAffinityTerm": { + "id": "v1.WeightedPodAffinityTerm", + "description": "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)", + "required": [ + "weight", + "podAffinityTerm" + ], + "properties": { + "weight": { + "type": "integer", + "format": "int32", + "description": "weight associated with matching the corresponding podAffinityTerm, in the range 1-100." + }, + "podAffinityTerm": { + "$ref": "v1.PodAffinityTerm", + "description": "Required. A pod affinity term, associated with the corresponding weight." + } + } + }, + "v1.PodAntiAffinity": { + "id": "v1.PodAntiAffinity", + "description": "Pod anti affinity is a group of inter pod anti affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PodAffinityTerm" + }, + "description": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.WeightedPodAffinityTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.Toleration": { + "id": "v1.Toleration", + "description": "The pod this Toleration is attached to tolerates any taint that matches the triple \u003ckey,value,effect\u003e using the matching operator \u003coperator\u003e.", + "properties": { + "key": { + "type": "string", + "description": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys." + }, + "operator": { + "type": "string", + "description": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category." + }, + "value": { + "type": "string", + "description": "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string." + }, + "effect": { + "type": "string", + "description": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute." + }, + "tolerationSeconds": { + "type": "integer", + "format": "int64", + "description": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system." + } + } + }, + "v1beta1.DaemonSetUpdateStrategy": { + "id": "v1beta1.DaemonSetUpdateStrategy", + "properties": { + "type": { + "type": "string", + "description": "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is OnDelete." + }, + "rollingUpdate": { + "$ref": "v1beta1.RollingUpdateDaemonSet", + "description": "Rolling update config params. Present only if type = \"RollingUpdate\"." + } + } + }, + "v1beta1.RollingUpdateDaemonSet": { + "id": "v1beta1.RollingUpdateDaemonSet", + "description": "Spec to control the desired behavior of daemon set rolling update.", + "properties": { + "maxUnavailable": { + "type": "string", + "description": "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update." + } + } + }, "v1beta1.DaemonSetStatus": { "id": "v1beta1.DaemonSetStatus", "description": "DaemonSetStatus represents the current status of a daemon set.", @@ -9394,27 +8626,47 @@ "currentNumberScheduled": { "type": "integer", "format": "int32", - "description": "CurrentNumberScheduled is the number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" + "description": "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" }, "numberMisscheduled": { "type": "integer", "format": "int32", - "description": "NumberMisscheduled is the number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" + "description": "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" }, "desiredNumberScheduled": { "type": "integer", "format": "int32", - "description": "DesiredNumberScheduled is the total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" + "description": "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" }, "numberReady": { "type": "integer", "format": "int32", - "description": "NumberReady is the number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready." + "description": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready." + }, + "observedGeneration": { + "type": "integer", + "format": "int64", + "description": "The most recent generation observed by the daemon set controller." + }, + "updatedNumberScheduled": { + "type": "integer", + "format": "int32", + "description": "The total number of nodes that are running updated daemon pod" + }, + "numberAvailable": { + "type": "integer", + "format": "int32", + "description": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)" + }, + "numberUnavailable": { + "type": "integer", + "format": "int32", + "description": "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)" } } }, - "unversioned.Status": { - "id": "unversioned.Status", + "v1.Status": { + "id": "v1.Status", "description": "Status is a return value for calls that don't return other objects.", "properties": { "kind": { @@ -9426,7 +8678,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "status": { @@ -9442,7 +8694,7 @@ "description": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it." }, "details": { - "$ref": "unversioned.StatusDetails", + "$ref": "v1.StatusDetails", "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "code": { @@ -9452,8 +8704,8 @@ } } }, - "unversioned.StatusDetails": { - "id": "unversioned.StatusDetails", + "v1.StatusDetails": { + "id": "v1.StatusDetails", "description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", "properties": { "name": { @@ -9471,7 +8723,7 @@ "causes": { "type": "array", "items": { - "$ref": "unversioned.StatusCause" + "$ref": "v1.StatusCause" }, "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes." }, @@ -9482,8 +8734,8 @@ } } }, - "unversioned.StatusCause": { - "id": "unversioned.StatusCause", + "v1.StatusCause": { + "id": "v1.StatusCause", "description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", "properties": { "reason": { @@ -9500,8 +8752,8 @@ } } }, - "versioned.Event": { - "id": "versioned.Event", + "v1.WatchEvent": { + "id": "v1.WatchEvent", "required": [ "type", "object" @@ -9515,14 +8767,14 @@ } } }, - "unversioned.Patch": { - "id": "unversioned.Patch", + "v1.Patch": { + "id": "v1.Patch", "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", "properties": {} }, "v1.DeleteOptions": { "id": "v1.DeleteOptions", - "description": "DeleteOptions may be provided when deleting an API object", + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "kind": { "type": "string", @@ -9543,7 +8795,11 @@ }, "orphanDependents": { "type": "boolean", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list." + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both." + }, + "propagationPolicy": { + "$ref": "v1.DeletionPropagation", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy." } } }, @@ -9561,6 +8817,10 @@ "id": "types.UID", "properties": {} }, + "v1.DeletionPropagation": { + "id": "v1.DeletionPropagation", + "properties": {} + }, "v1beta1.DeploymentList": { "id": "v1beta1.DeploymentList", "description": "DeploymentList is a list of Deployments.", @@ -9577,7 +8837,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata." }, "items": { @@ -9628,7 +8888,7 @@ "description": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1." }, "selector": { - "$ref": "unversioned.LabelSelector", + "$ref": "v1.LabelSelector", "description": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment." }, "template": { @@ -9684,7 +8944,7 @@ "properties": { "maxUnavailable": { "type": "string", - "description": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding up. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods." + "description": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods." }, "maxSurge": { "type": "string", @@ -9721,6 +8981,11 @@ "format": "int32", "description": "Total number of non-terminated pods targeted by this deployment that have the desired template spec." }, + "readyReplicas": { + "type": "integer", + "format": "int32", + "description": "Total number of ready pods targeted by this deployment." + }, "availableReplicas": { "type": "integer", "format": "int32", @@ -9758,12 +9023,10 @@ }, "lastUpdateTime": { "type": "string", - "format": "date-time", "description": "The last time this condition was updated." }, "lastTransitionTime": { "type": "string", - "format": "date-time", "description": "Last time the condition transitioned from one status to another." }, "reason": { @@ -9850,170 +9113,18 @@ "replicas" ], "properties": { - "replicas": { - "type": "integer", - "format": "int32", - "description": "actual number of observed instances of the scaled object." - }, - "selector": { - "type": "object", - "description": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" - }, - "targetSelector": { - "type": "string", - "description": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" - } - } - }, - "v1beta1.HorizontalPodAutoscalerList": { - "id": "v1beta1.HorizontalPodAutoscalerList", - "description": "list of horizontal pod autoscaler objects.", - "required": [ - "items" - ], - "properties": { - "kind": { - "type": "string", - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" - }, - "apiVersion": { - "type": "string", - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" - }, - "metadata": { - "$ref": "unversioned.ListMeta", - "description": "Standard list metadata." - }, - "items": { - "type": "array", - "items": { - "$ref": "v1beta1.HorizontalPodAutoscaler" - }, - "description": "list of horizontal pod autoscaler objects." - } - } - }, - "v1beta1.HorizontalPodAutoscaler": { - "id": "v1beta1.HorizontalPodAutoscaler", - "description": "configuration of a horizontal pod autoscaler.", - "properties": { - "kind": { - "type": "string", - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" - }, - "apiVersion": { - "type": "string", - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" - }, - "metadata": { - "$ref": "v1.ObjectMeta", - "description": "Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" - }, - "spec": { - "$ref": "v1beta1.HorizontalPodAutoscalerSpec", - "description": "behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status." - }, - "status": { - "$ref": "v1beta1.HorizontalPodAutoscalerStatus", - "description": "current information about the autoscaler." - } - } - }, - "v1beta1.HorizontalPodAutoscalerSpec": { - "id": "v1beta1.HorizontalPodAutoscalerSpec", - "description": "specification of a horizontal pod autoscaler.", - "required": [ - "scaleRef", - "maxReplicas" - ], - "properties": { - "scaleRef": { - "$ref": "v1beta1.SubresourceReference", - "description": "reference to Scale subresource; horizontal pod autoscaler will learn the current resource consumption from its status, and will set the desired number of pods by modifying its spec." - }, - "minReplicas": { - "type": "integer", - "format": "int32", - "description": "lower limit for the number of pods that can be set by the autoscaler, default 1." - }, - "maxReplicas": { - "type": "integer", - "format": "int32", - "description": "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas." - }, - "cpuUtilization": { - "$ref": "v1beta1.CPUTargetUtilization", - "description": "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified it defaults to the target CPU utilization at 80% of the requested resources." - } - } - }, - "v1beta1.SubresourceReference": { - "id": "v1beta1.SubresourceReference", - "description": "SubresourceReference contains enough information to let you inspect or modify the referred subresource.", - "properties": { - "kind": { - "type": "string", - "description": "Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" - }, - "name": { - "type": "string", - "description": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names" - }, - "apiVersion": { - "type": "string", - "description": "API version of the referent" - }, - "subresource": { - "type": "string", - "description": "Subresource name of the referent" - } - } - }, - "v1beta1.CPUTargetUtilization": { - "id": "v1beta1.CPUTargetUtilization", - "required": [ - "targetPercentage" - ], - "properties": { - "targetPercentage": { - "type": "integer", - "format": "int32", - "description": "fraction of the requested CPU that should be utilized/used, e.g. 70 means that 70% of the requested CPU should be in use." - } - } - }, - "v1beta1.HorizontalPodAutoscalerStatus": { - "id": "v1beta1.HorizontalPodAutoscalerStatus", - "description": "current status of a horizontal pod autoscaler", - "required": [ - "currentReplicas", - "desiredReplicas" - ], - "properties": { - "observedGeneration": { - "type": "integer", - "format": "int64", - "description": "most recent generation observed by this autoscaler." - }, - "lastScaleTime": { - "type": "string", - "format": "date-time", - "description": "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed." - }, - "currentReplicas": { + "replicas": { "type": "integer", "format": "int32", - "description": "current number of replicas of pods managed by this autoscaler." + "description": "actual number of observed instances of the scaled object." }, - "desiredReplicas": { - "type": "integer", - "format": "int32", - "description": "desired number of replicas of pods managed by this autoscaler." + "selector": { + "type": "object", + "description": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" }, - "currentCPUUtilizationPercentage": { - "type": "integer", - "format": "int32", - "description": "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU." + "targetSelector": { + "type": "string", + "description": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" } } }, @@ -10033,7 +9144,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "items": { @@ -10213,9 +9324,9 @@ } } }, - "v1beta1.JobList": { - "id": "v1beta1.JobList", - "description": "JobList is a collection of jobs. DEPRECATED: extensions/v1beta1.JobList is deprecated, use batch/v1.JobList instead.", + "v1beta1.NetworkPolicyList": { + "id": "v1beta1.NetworkPolicyList", + "description": "Network Policy List is a list of NetworkPolicy objects.", "required": [ "items" ], @@ -10229,21 +9340,20 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", - "description": "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" + "$ref": "v1.ListMeta", + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "items": { "type": "array", "items": { - "$ref": "v1beta1.Job" + "$ref": "v1beta1.NetworkPolicy" }, - "description": "Items is the list of Job." + "description": "Items is a list of schema objects." } } }, - "v1beta1.Job": { - "id": "v1beta1.Job", - "description": "Job represents the configuration of a single job. DEPRECATED: extensions/v1beta1.Job is deprecated, use batch/v1.Job instead.", + "v1beta1.NetworkPolicy": { + "id": "v1beta1.NetworkPolicy", "properties": { "kind": { "type": "string", @@ -10258,128 +9368,83 @@ "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "spec": { - "$ref": "v1beta1.JobSpec", - "description": "Spec is a structure defining the expected behavior of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" - }, - "status": { - "$ref": "v1beta1.JobStatus", - "description": "Status is a structure describing current status of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" + "$ref": "v1beta1.NetworkPolicySpec", + "description": "Specification of the desired behavior for this NetworkPolicy." } } }, - "v1beta1.JobSpec": { - "id": "v1beta1.JobSpec", - "description": "JobSpec describes how the job execution will look like.", + "v1beta1.NetworkPolicySpec": { + "id": "v1beta1.NetworkPolicySpec", "required": [ - "template" + "podSelector" ], "properties": { - "parallelism": { - "type": "integer", - "format": "int32", - "description": "Parallelism specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) \u003c .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: http://kubernetes.io/docs/user-guide/jobs" - }, - "completions": { - "type": "integer", - "format": "int32", - "description": "Completions specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: http://kubernetes.io/docs/user-guide/jobs" - }, - "activeDeadlineSeconds": { - "type": "integer", - "format": "int64", - "description": "Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer" - }, - "selector": { - "$ref": "unversioned.LabelSelector", - "description": "Selector is a label query over pods that should match the pod count. Normally, the system sets this field for you. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" - }, - "autoSelector": { - "type": "boolean", - "description": "AutoSelector controls generation of pod labels and pod selectors. It was not present in the original extensions/v1beta1 Job definition, but exists to allow conversion from batch/v1 Jobs, where it corresponds to, but has the opposite meaning as, ManualSelector. More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md" + "podSelector": { + "$ref": "v1.LabelSelector", + "description": "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace." }, - "template": { - "$ref": "v1.PodTemplateSpec", - "description": "Template is the object that describes the pod that will be created when executing a job. More info: http://kubernetes.io/docs/user-guide/jobs" + "ingress": { + "type": "array", + "items": { + "$ref": "v1beta1.NetworkPolicyIngressRule" + }, + "description": "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if namespace.networkPolicy.ingress.isolation is undefined and cluster policy allows it, OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not affect ingress isolation. If this field is present and contains at least one rule, this policy allows any traffic which matches at least one of the ingress rules in this list." } } }, - "v1beta1.JobStatus": { - "id": "v1beta1.JobStatus", - "description": "JobStatus represents the current state of a Job.", + "v1beta1.NetworkPolicyIngressRule": { + "id": "v1beta1.NetworkPolicyIngressRule", + "description": "This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.", "properties": { - "conditions": { + "ports": { "type": "array", "items": { - "$ref": "v1beta1.JobCondition" + "$ref": "v1beta1.NetworkPolicyPort" }, - "description": "Conditions represent the latest available observations of an object's current state. More info: http://kubernetes.io/docs/user-guide/jobs" - }, - "startTime": { - "type": "string", - "format": "date-time", - "description": "StartTime represents time when the job was acknowledged by the Job Manager. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC." - }, - "completionTime": { - "type": "string", - "format": "date-time", - "description": "CompletionTime represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC." - }, - "active": { - "type": "integer", - "format": "int32", - "description": "Active is the number of actively running pods." - }, - "succeeded": { - "type": "integer", - "format": "int32", - "description": "Succeeded is the number of pods which reached Phase Succeeded." + "description": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is not provided, this rule matches all ports (traffic not restricted by port). If this field is empty, this rule matches no ports (no traffic matches). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list." }, - "failed": { - "type": "integer", - "format": "int32", - "description": "Failed is the number of pods which reached Phase Failed." + "from": { + "type": "array", + "items": { + "$ref": "v1beta1.NetworkPolicyPeer" + }, + "description": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is not provided, this rule matches all sources (traffic not restricted by source). If this field is empty, this rule matches no sources (no traffic matches). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list." } } }, - "v1beta1.JobCondition": { - "id": "v1beta1.JobCondition", - "description": "JobCondition describes current state of a job.", - "required": [ - "type", - "status" - ], + "v1beta1.NetworkPolicyPort": { + "id": "v1beta1.NetworkPolicyPort", "properties": { - "type": { - "type": "string", - "description": "Type of job condition, Complete or Failed." - }, - "status": { - "type": "string", - "description": "Status of the condition, one of True, False, Unknown." - }, - "lastProbeTime": { - "type": "string", - "format": "date-time", - "description": "Last time the condition was checked." - }, - "lastTransitionTime": { - "type": "string", - "format": "date-time", - "description": "Last time the condition transit from one status to another." + "protocol": { + "$ref": "v1.Protocol", + "description": "Optional. The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP." }, - "reason": { + "port": { "type": "string", - "description": "(brief) reason for the condition's last transition." + "description": "If specified, the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched." + } + } + }, + "v1.Protocol": { + "id": "v1.Protocol", + "properties": {} + }, + "v1beta1.NetworkPolicyPeer": { + "id": "v1beta1.NetworkPolicyPeer", + "properties": { + "podSelector": { + "$ref": "v1.LabelSelector", + "description": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If not provided, this selector selects no pods. If present but empty, this selector selects all pods in this namespace." }, - "message": { - "type": "string", - "description": "Human readable message indicating details about last transition." + "namespaceSelector": { + "$ref": "v1.LabelSelector", + "description": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If omitted, this selector selects no namespaces. If present but empty, this selector selects all namespaces." } } }, - "v1beta1.NetworkPolicyList": { - "id": "v1beta1.NetworkPolicyList", - "description": "Network Policy List is a list of NetworkPolicy objects.", + "v1beta1.PodSecurityPolicyList": { + "id": "v1beta1.PodSecurityPolicyList", + "description": "Pod Security Policy List is a list of PodSecurityPolicy objects.", "required": [ "items" ], @@ -10393,20 +9458,21 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "items": { "type": "array", "items": { - "$ref": "v1beta1.NetworkPolicy" + "$ref": "v1beta1.PodSecurityPolicy" }, "description": "Items is a list of schema objects." } } }, - "v1beta1.NetworkPolicy": { - "id": "v1beta1.NetworkPolicy", + "v1beta1.PodSecurityPolicy": { + "id": "v1beta1.PodSecurityPolicy", + "description": "Pod Security Policy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.", "properties": { "kind": { "type": "string", @@ -10421,77 +9487,206 @@ "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "spec": { - "$ref": "v1beta1.NetworkPolicySpec", - "description": "Specification of the desired behavior for this NetworkPolicy." + "$ref": "v1beta1.PodSecurityPolicySpec", + "description": "spec defines the policy enforced." } } }, - "v1beta1.NetworkPolicySpec": { - "id": "v1beta1.NetworkPolicySpec", + "v1beta1.PodSecurityPolicySpec": { + "id": "v1beta1.PodSecurityPolicySpec", + "description": "Pod Security Policy Spec defines the policy enforced.", "required": [ - "podSelector" + "seLinux", + "runAsUser", + "supplementalGroups", + "fsGroup" ], "properties": { - "podSelector": { - "$ref": "unversioned.LabelSelector", - "description": "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace." + "privileged": { + "type": "boolean", + "description": "privileged determines if a pod can request to be run as privileged." }, - "ingress": { + "defaultAddCapabilities": { "type": "array", "items": { - "$ref": "v1beta1.NetworkPolicyIngressRule" + "$ref": "v1.Capability" }, - "description": "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if namespace.networkPolicy.ingress.isolation is undefined and cluster policy allows it, OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not affect ingress isolation. If this field is present and contains at least one rule, this policy allows any traffic which matches at least one of the ingress rules in this list." - } - } - }, - "v1beta1.NetworkPolicyIngressRule": { - "id": "v1beta1.NetworkPolicyIngressRule", - "description": "This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.", - "properties": { - "ports": { + "description": "DefaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capabiility in both DefaultAddCapabilities and RequiredDropCapabilities." + }, + "requiredDropCapabilities": { "type": "array", "items": { - "$ref": "v1beta1.NetworkPolicyPort" + "$ref": "v1.Capability" }, - "description": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is not provided, this rule matches all ports (traffic not restricted by port). If this field is empty, this rule matches no ports (no traffic matches). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list." + "description": "RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added." }, - "from": { + "allowedCapabilities": { "type": "array", "items": { - "$ref": "v1beta1.NetworkPolicyPeer" + "$ref": "v1.Capability" }, - "description": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is not provided, this rule matches all sources (traffic not restricted by source). If this field is empty, this rule matches no sources (no traffic matches). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list." + "description": "AllowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities." + }, + "volumes": { + "type": "array", + "items": { + "$ref": "v1beta1.FSType" + }, + "description": "volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used." + }, + "hostNetwork": { + "type": "boolean", + "description": "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec." + }, + "hostPorts": { + "type": "array", + "items": { + "$ref": "v1beta1.HostPortRange" + }, + "description": "hostPorts determines which host port ranges are allowed to be exposed." + }, + "hostPID": { + "type": "boolean", + "description": "hostPID determines if the policy allows the use of HostPID in the pod spec." + }, + "hostIPC": { + "type": "boolean", + "description": "hostIPC determines if the policy allows the use of HostIPC in the pod spec." + }, + "seLinux": { + "$ref": "v1beta1.SELinuxStrategyOptions", + "description": "seLinux is the strategy that will dictate the allowable labels that may be set." + }, + "runAsUser": { + "$ref": "v1beta1.RunAsUserStrategyOptions", + "description": "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set." + }, + "supplementalGroups": { + "$ref": "v1beta1.SupplementalGroupsStrategyOptions", + "description": "SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext." + }, + "fsGroup": { + "$ref": "v1beta1.FSGroupStrategyOptions", + "description": "FSGroup is the strategy that will dictate what fs group is used by the SecurityContext." + }, + "readOnlyRootFilesystem": { + "type": "boolean", + "description": "ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to." } } }, - "v1beta1.NetworkPolicyPort": { - "id": "v1beta1.NetworkPolicyPort", + "v1beta1.FSType": { + "id": "v1beta1.FSType", + "properties": {} + }, + "v1beta1.HostPortRange": { + "id": "v1beta1.HostPortRange", + "description": "Host Port Range defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.", + "required": [ + "min", + "max" + ], "properties": { - "protocol": { - "$ref": "v1.Protocol", - "description": "Optional. The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP." + "min": { + "type": "integer", + "format": "int32", + "description": "min is the start of the range, inclusive." }, - "port": { + "max": { + "type": "integer", + "format": "int32", + "description": "max is the end of the range, inclusive." + } + } + }, + "v1beta1.SELinuxStrategyOptions": { + "id": "v1beta1.SELinuxStrategyOptions", + "description": "SELinux Strategy Options defines the strategy type and any options used to create the strategy.", + "required": [ + "rule" + ], + "properties": { + "rule": { "type": "string", - "description": "If specified, the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched." + "description": "type is the strategy that will dictate the allowable labels that may be set." + }, + "seLinuxOptions": { + "$ref": "v1.SELinuxOptions", + "description": "seLinuxOptions required to run as; required for MustRunAs More info: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context" } } }, - "v1.Protocol": { - "id": "v1.Protocol", - "properties": {} + "v1beta1.RunAsUserStrategyOptions": { + "id": "v1beta1.RunAsUserStrategyOptions", + "description": "Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.", + "required": [ + "rule" + ], + "properties": { + "rule": { + "type": "string", + "description": "Rule is the strategy that will dictate the allowable RunAsUser values that may be set." + }, + "ranges": { + "type": "array", + "items": { + "$ref": "v1beta1.IDRange" + }, + "description": "Ranges are the allowed ranges of uids that may be used." + } + } }, - "v1beta1.NetworkPolicyPeer": { - "id": "v1beta1.NetworkPolicyPeer", + "v1beta1.IDRange": { + "id": "v1beta1.IDRange", + "description": "ID Range provides a min/max of an allowed range of IDs.", + "required": [ + "min", + "max" + ], "properties": { - "podSelector": { - "$ref": "unversioned.LabelSelector", - "description": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If not provided, this selector selects no pods. If present but empty, this selector selects all pods in this namespace." + "min": { + "type": "integer", + "format": "int64", + "description": "Min is the start of the range, inclusive." }, - "namespaceSelector": { - "$ref": "unversioned.LabelSelector", - "description": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If omitted, this selector selects no namespaces. If present but empty, this selector selects all namespaces." + "max": { + "type": "integer", + "format": "int64", + "description": "Max is the end of the range, inclusive." + } + } + }, + "v1beta1.SupplementalGroupsStrategyOptions": { + "id": "v1beta1.SupplementalGroupsStrategyOptions", + "description": "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.", + "properties": { + "rule": { + "type": "string", + "description": "Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext." + }, + "ranges": { + "type": "array", + "items": { + "$ref": "v1beta1.IDRange" + }, + "description": "Ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end." + } + } + }, + "v1beta1.FSGroupStrategyOptions": { + "id": "v1beta1.FSGroupStrategyOptions", + "description": "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.", + "properties": { + "rule": { + "type": "string", + "description": "Rule is the strategy that will dictate what FSGroup is used in the SecurityContext." + }, + "ranges": { + "type": "array", + "items": { + "$ref": "v1beta1.IDRange" + }, + "description": "Ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end." } } }, @@ -10511,7 +9706,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -10564,7 +9759,7 @@ "description": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)" }, "selector": { - "$ref": "unversioned.LabelSelector", + "$ref": "v1.LabelSelector", "description": "Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" }, "template": { @@ -10632,7 +9827,6 @@ }, "lastTransitionTime": { "type": "string", - "format": "date-time", "description": "The last time the condition transitioned from one status to another." }, "reason": { @@ -10661,7 +9855,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata." }, "items": { @@ -10712,8 +9906,8 @@ } } }, - "unversioned.APIResourceList": { - "id": "unversioned.APIResourceList", + "v1.APIResourceList": { + "id": "v1.APIResourceList", "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", "required": [ "groupVersion", @@ -10735,19 +9929,20 @@ "resources": { "type": "array", "items": { - "$ref": "unversioned.APIResource" + "$ref": "v1.APIResource" }, "description": "resources contains the name of the resources and if they are namespaced." } } }, - "unversioned.APIResource": { - "id": "unversioned.APIResource", + "v1.APIResource": { + "id": "v1.APIResource", "description": "APIResource specifies the name of a resource and whether it is namespaced.", "required": [ "name", "namespaced", - "kind" + "kind", + "verbs" ], "properties": { "name": { @@ -10761,6 +9956,20 @@ "kind": { "type": "string", "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')" + }, + "verbs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)" + }, + "shortNames": { + "type": "array", + "items": { + "type": "string" + }, + "description": "shortNames is a list of suggested short names of the resource." } } } diff --git a/k8s/.kube/schema/v1.5.3/schema392735526 b/k8s/.kube/schema/v1.6.6/schema566625515 similarity index 83% rename from k8s/.kube/schema/v1.5.3/schema392735526 rename to k8s/.kube/schema/v1.6.6/schema566625515 index 7f07b38b6..a112d2e67 100644 --- a/k8s/.kube/schema/v1.5.3/schema392735526 +++ b/k8s/.kube/schema/v1.6.6/schema566625515 @@ -1,7 +1,7 @@ { "swaggerVersion": "1.2", "apiVersion": "extensions/v1beta1", - "basePath": "https://10.240.255.5:443", + "basePath": "https://10.240.255.15:443", "resourcePath": "/apis/extensions/v1beta1", "info": { "title": "", @@ -54,7 +54,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -141,7 +141,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of DaemonSet", "nickname": "deletecollectionNamespacedDaemonSet", @@ -182,7 +182,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -207,7 +207,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -226,7 +226,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of DaemonSet", "nickname": "watchNamespacedDaemonSetList", @@ -267,7 +267,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -292,7 +292,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -338,7 +338,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -445,7 +445,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -488,7 +488,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a DaemonSet", "nickname": "deleteNamespacedDaemonSet", @@ -521,7 +521,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -546,7 +554,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -565,7 +573,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind DaemonSet", "nickname": "watchNamespacedDaemonSet", @@ -606,7 +614,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -639,7 +647,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -701,7 +709,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -739,7 +747,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of DaemonSet", "nickname": "watchDaemonSetListForAllNamespaces", @@ -780,7 +788,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -797,7 +805,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -934,7 +942,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -1024,7 +1032,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1111,7 +1119,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Deployment", "nickname": "deletecollectionNamespacedDeployment", @@ -1152,7 +1160,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1177,7 +1185,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -1196,7 +1204,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Deployment", "nickname": "watchNamespacedDeploymentList", @@ -1237,7 +1245,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1262,7 +1270,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1308,7 +1316,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -1415,7 +1423,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -1458,7 +1466,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Deployment", "nickname": "deleteNamespacedDeployment", @@ -1491,7 +1499,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -1516,7 +1532,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -1535,7 +1551,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Deployment", "nickname": "watchNamespacedDeployment", @@ -1576,7 +1592,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1609,7 +1625,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1671,7 +1687,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1709,7 +1725,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Deployment", "nickname": "watchDeploymentListForAllNamespaces", @@ -1750,7 +1766,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1767,7 +1783,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1965,7 +1981,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -2130,7 +2146,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -2175,14 +2191,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/horizontalpodautoscalers", + "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.HorizontalPodAutoscalerList", + "type": "v1beta1.IngressList", "method": "GET", - "summary": "list or watch objects of kind HorizontalPodAutoscaler", - "nickname": "listNamespacedHorizontalPodAutoscaler", + "summary": "list or watch objects of kind Ingress", + "nickname": "listNamespacedIngress", "parameters": [ { "type": "string", @@ -2220,7 +2236,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2245,7 +2261,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscalerList" + "responseModel": "v1beta1.IngressList" } ], "produces": [ @@ -2260,10 +2276,10 @@ ] }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "POST", - "summary": "create a HorizontalPodAutoscaler", - "nickname": "createNamespacedHorizontalPodAutoscaler", + "summary": "create an Ingress", + "nickname": "createNamespacedIngress", "parameters": [ { "type": "string", @@ -2274,7 +2290,7 @@ "allowMultiple": false }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "paramType": "body", "name": "body", "description": "", @@ -2294,7 +2310,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -2307,10 +2323,10 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", - "summary": "delete collection of HorizontalPodAutoscaler", - "nickname": "deletecollectionNamespacedHorizontalPodAutoscaler", + "summary": "delete collection of Ingress", + "nickname": "deletecollectionNamespacedIngress", "parameters": [ { "type": "string", @@ -2348,7 +2364,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2373,7 +2389,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -2388,14 +2404,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/horizontalpodautoscalers", + "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of HorizontalPodAutoscaler", - "nickname": "watchNamespacedHorizontalPodAutoscalerList", + "summary": "watch individual changes to a list of Ingress", + "nickname": "watchNamespacedIngressList", "parameters": [ { "type": "string", @@ -2433,7 +2449,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2458,7 +2474,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2475,14 +2491,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}", + "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "GET", - "summary": "read the specified HorizontalPodAutoscaler", - "nickname": "readNamespacedHorizontalPodAutoscaler", + "summary": "read the specified Ingress", + "nickname": "readNamespacedIngress", "parameters": [ { "type": "string", @@ -2504,7 +2520,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -2520,7 +2536,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -2529,7 +2545,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -2542,10 +2558,10 @@ ] }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "PUT", - "summary": "replace the specified HorizontalPodAutoscaler", - "nickname": "replaceNamespacedHorizontalPodAutoscaler", + "summary": "replace the specified Ingress", + "nickname": "replaceNamespacedIngress", "parameters": [ { "type": "string", @@ -2556,7 +2572,7 @@ "allowMultiple": false }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "paramType": "body", "name": "body", "description": "", @@ -2575,7 +2591,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -2584,7 +2600,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -2597,10 +2613,10 @@ ] }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "PATCH", - "summary": "partially update the specified HorizontalPodAutoscaler", - "nickname": "patchNamespacedHorizontalPodAutoscaler", + "summary": "partially update the specified Ingress", + "nickname": "patchNamespacedIngress", "parameters": [ { "type": "string", @@ -2611,7 +2627,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -2630,7 +2646,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -2639,7 +2655,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -2654,10 +2670,10 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", - "summary": "delete a HorizontalPodAutoscaler", - "nickname": "deleteNamespacedHorizontalPodAutoscaler", + "summary": "delete an Ingress", + "nickname": "deleteNamespacedIngress", "parameters": [ { "type": "string", @@ -2687,7 +2703,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -2703,7 +2727,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -2712,7 +2736,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -2727,14 +2751,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/horizontalpodautoscalers/{name}", + "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch changes to an object of kind HorizontalPodAutoscaler", - "nickname": "watchNamespacedHorizontalPodAutoscaler", + "summary": "watch changes to an object of kind Ingress", + "nickname": "watchNamespacedIngress", "parameters": [ { "type": "string", @@ -2772,7 +2796,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2796,7 +2820,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -2805,7 +2829,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2822,14 +2846,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/horizontalpodautoscalers", + "path": "/apis/extensions/v1beta1/ingresses", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.HorizontalPodAutoscalerList", + "type": "v1beta1.IngressList", "method": "GET", - "summary": "list or watch objects of kind HorizontalPodAutoscaler", - "nickname": "listHorizontalPodAutoscalerForAllNamespaces", + "summary": "list or watch objects of kind Ingress", + "nickname": "listIngressForAllNamespaces", "parameters": [ { "type": "string", @@ -2867,7 +2891,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2884,7 +2908,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscalerList" + "responseModel": "v1beta1.IngressList" } ], "produces": [ @@ -2901,14 +2925,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/horizontalpodautoscalers", + "path": "/apis/extensions/v1beta1/watch/ingresses", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of HorizontalPodAutoscaler", - "nickname": "watchHorizontalPodAutoscalerListForAllNamespaces", + "summary": "watch individual changes to a list of Ingress", + "nickname": "watchIngressListForAllNamespaces", "parameters": [ { "type": "string", @@ -2946,7 +2970,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2963,7 +2987,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2980,14 +3004,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status", + "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}/status", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "GET", - "summary": "read status of the specified HorizontalPodAutoscaler", - "nickname": "readNamespacedHorizontalPodAutoscalerStatus", + "summary": "read status of the specified Ingress", + "nickname": "readNamespacedIngressStatus", "parameters": [ { "type": "string", @@ -3009,7 +3033,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -3018,7 +3042,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -3031,10 +3055,10 @@ ] }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "PUT", - "summary": "replace status of the specified HorizontalPodAutoscaler", - "nickname": "replaceNamespacedHorizontalPodAutoscalerStatus", + "summary": "replace status of the specified Ingress", + "nickname": "replaceNamespacedIngressStatus", "parameters": [ { "type": "string", @@ -3045,7 +3069,7 @@ "allowMultiple": false }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "paramType": "body", "name": "body", "description": "", @@ -3064,7 +3088,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -3073,7 +3097,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -3086,10 +3110,10 @@ ] }, { - "type": "v1beta1.HorizontalPodAutoscaler", + "type": "v1beta1.Ingress", "method": "PATCH", - "summary": "partially update status of the specified HorizontalPodAutoscaler", - "nickname": "patchNamespacedHorizontalPodAutoscalerStatus", + "summary": "partially update status of the specified Ingress", + "nickname": "patchNamespacedIngressStatus", "parameters": [ { "type": "string", @@ -3100,7 +3124,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -3119,7 +3143,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the HorizontalPodAutoscaler", + "description": "name of the Ingress", "required": true, "allowMultiple": false } @@ -3128,7 +3152,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.HorizontalPodAutoscaler" + "responseModel": "v1beta1.Ingress" } ], "produces": [ @@ -3145,14 +3169,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses", + "path": "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.IngressList", + "type": "v1beta1.NetworkPolicyList", "method": "GET", - "summary": "list or watch objects of kind Ingress", - "nickname": "listNamespacedIngress", + "summary": "list or watch objects of kind NetworkPolicy", + "nickname": "listNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3190,7 +3214,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3215,7 +3239,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.IngressList" + "responseModel": "v1beta1.NetworkPolicyList" } ], "produces": [ @@ -3230,10 +3254,10 @@ ] }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "method": "POST", - "summary": "create an Ingress", - "nickname": "createNamespacedIngress", + "summary": "create a NetworkPolicy", + "nickname": "createNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3244,7 +3268,7 @@ "allowMultiple": false }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "paramType": "body", "name": "body", "description": "", @@ -3264,7 +3288,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.NetworkPolicy" } ], "produces": [ @@ -3277,10 +3301,10 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", - "summary": "delete collection of Ingress", - "nickname": "deletecollectionNamespacedIngress", + "summary": "delete collection of NetworkPolicy", + "nickname": "deletecollectionNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3318,7 +3342,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3343,7 +3367,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -3358,14 +3382,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses", + "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of Ingress", - "nickname": "watchNamespacedIngressList", + "summary": "watch individual changes to a list of NetworkPolicy", + "nickname": "watchNamespacedNetworkPolicyList", "parameters": [ { "type": "string", @@ -3403,7 +3427,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3428,7 +3452,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3445,14 +3469,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}", + "path": "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "method": "GET", - "summary": "read the specified Ingress", - "nickname": "readNamespacedIngress", + "summary": "read the specified NetworkPolicy", + "nickname": "readNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3474,7 +3498,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -3490,7 +3514,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the Ingress", + "description": "name of the NetworkPolicy", "required": true, "allowMultiple": false } @@ -3499,7 +3523,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.NetworkPolicy" } ], "produces": [ @@ -3512,10 +3536,10 @@ ] }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "method": "PUT", - "summary": "replace the specified Ingress", - "nickname": "replaceNamespacedIngress", + "summary": "replace the specified NetworkPolicy", + "nickname": "replaceNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3526,7 +3550,7 @@ "allowMultiple": false }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "paramType": "body", "name": "body", "description": "", @@ -3545,7 +3569,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the Ingress", + "description": "name of the NetworkPolicy", "required": true, "allowMultiple": false } @@ -3554,7 +3578,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.NetworkPolicy" } ], "produces": [ @@ -3567,10 +3591,10 @@ ] }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.NetworkPolicy", "method": "PATCH", - "summary": "partially update the specified Ingress", - "nickname": "patchNamespacedIngress", + "summary": "partially update the specified NetworkPolicy", + "nickname": "patchNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3581,7 +3605,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -3600,7 +3624,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the Ingress", + "description": "name of the NetworkPolicy", "required": true, "allowMultiple": false } @@ -3609,7 +3633,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.NetworkPolicy" } ], "produces": [ @@ -3624,10 +3648,10 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", - "summary": "delete an Ingress", - "nickname": "deleteNamespacedIngress", + "summary": "delete a NetworkPolicy", + "nickname": "deleteNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3657,7 +3681,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -3673,7 +3705,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the Ingress", + "description": "name of the NetworkPolicy", "required": true, "allowMultiple": false } @@ -3682,7 +3714,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -3697,14 +3729,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/ingresses/{name}", + "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch changes to an object of kind Ingress", - "nickname": "watchNamespacedIngress", + "summary": "watch changes to an object of kind NetworkPolicy", + "nickname": "watchNamespacedNetworkPolicy", "parameters": [ { "type": "string", @@ -3742,7 +3774,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3766,7 +3798,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the Ingress", + "description": "name of the NetworkPolicy", "required": true, "allowMultiple": false } @@ -3775,7 +3807,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3792,14 +3824,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/ingresses", + "path": "/apis/extensions/v1beta1/networkpolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.IngressList", + "type": "v1beta1.NetworkPolicyList", "method": "GET", - "summary": "list or watch objects of kind Ingress", - "nickname": "listIngressForAllNamespaces", + "summary": "list or watch objects of kind NetworkPolicy", + "nickname": "listNetworkPolicyForAllNamespaces", "parameters": [ { "type": "string", @@ -3837,7 +3869,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3854,7 +3886,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.IngressList" + "responseModel": "v1beta1.NetworkPolicyList" } ], "produces": [ @@ -3871,14 +3903,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/ingresses", + "path": "/apis/extensions/v1beta1/watch/networkpolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of Ingress", - "nickname": "watchIngressListForAllNamespaces", + "summary": "watch individual changes to a list of NetworkPolicy", + "nickname": "watchNetworkPolicyListForAllNamespaces", "parameters": [ { "type": "string", @@ -3916,7 +3948,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3933,7 +3965,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3950,14 +3982,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}/status", + "path": "/apis/extensions/v1beta1/podsecuritypolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.Ingress", + "type": "v1beta1.PodSecurityPolicyList", "method": "GET", - "summary": "read status of the specified Ingress", - "nickname": "readNamespacedIngressStatus", + "summary": "list or watch objects of kind PodSecurityPolicy", + "nickname": "listPodSecurityPolicy", "parameters": [ { "type": "string", @@ -3969,18 +4001,42 @@ }, { "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, + "paramType": "query", + "name": "labelSelector", + "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", + "required": false, "allowMultiple": false }, { "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Ingress", - "required": true, + "paramType": "query", + "name": "fieldSelector", + "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "required": false, + "allowMultiple": false + }, + { + "type": "boolean", + "paramType": "query", + "name": "watch", + "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "resourceVersion", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", + "required": false, + "allowMultiple": false + }, + { + "type": "integer", + "paramType": "query", + "name": "timeoutSeconds", + "description": "Timeout for the list/watch call.", + "required": false, "allowMultiple": false } ], @@ -3988,23 +4044,25 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.PodSecurityPolicyList" } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf" + "application/vnd.kubernetes.protobuf", + "application/json;stream=watch", + "application/vnd.kubernetes.protobuf;stream=watch" ], "consumes": [ "*/*" ] }, { - "type": "v1beta1.Ingress", - "method": "PUT", - "summary": "replace status of the specified Ingress", - "nickname": "replaceNamespacedIngressStatus", + "type": "v1beta1.PodSecurityPolicy", + "method": "POST", + "summary": "create a PodSecurityPolicy", + "nickname": "createPodSecurityPolicy", "parameters": [ { "type": "string", @@ -4015,35 +4073,19 @@ "allowMultiple": false }, { - "type": "v1beta1.Ingress", + "type": "v1beta1.PodSecurityPolicy", "paramType": "body", "name": "body", "description": "", "required": true, "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Ingress", - "required": true, - "allowMultiple": false } ], "responseMessages": [ { "code": 200, "message": "OK", - "responseModel": "v1beta1.Ingress" + "responseModel": "v1beta1.PodSecurityPolicy" } ], "produces": [ @@ -4056,1171 +4098,10 @@ ] }, { - "type": "v1beta1.Ingress", - "method": "PATCH", - "summary": "partially update status of the specified Ingress", - "nickname": "patchNamespacedIngressStatus", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "unversioned.Patch", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Ingress", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Ingress" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/jobs", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "v1beta1.JobList", - "method": "GET", - "summary": "list or watch objects of kind Job", - "nickname": "listNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.JobList" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.Job", - "method": "POST", - "summary": "create a Job", - "nickname": "createNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "v1beta1.Job", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "unversioned.Status", - "method": "DELETE", - "summary": "delete collection of Job", - "nickname": "deletecollectionNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "unversioned.Status" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/jobs", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "versioned.Event", - "method": "GET", - "summary": "watch individual changes to a list of Job", - "nickname": "watchNamespacedJobList", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "versioned.Event" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/jobs/{name}", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "v1beta1.Job", - "method": "GET", - "summary": "read the specified Job", - "nickname": "readNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "export", - "description": "Should this value be exported. Export strips fields that a user can not specify.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.Job", - "method": "PUT", - "summary": "replace the specified Job", - "nickname": "replaceNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "v1beta1.Job", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.Job", - "method": "PATCH", - "summary": "partially update the specified Job", - "nickname": "patchNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "unversioned.Patch", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ] - }, - { - "type": "unversioned.Status", - "method": "DELETE", - "summary": "delete a Job", - "nickname": "deleteNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "v1.DeleteOptions", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "gracePeriodSeconds", - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "unversioned.Status" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/jobs/{name}", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "versioned.Event", - "method": "GET", - "summary": "watch changes to an object of kind Job", - "nickname": "watchNamespacedJob", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "versioned.Event" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/jobs", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "v1beta1.JobList", - "method": "GET", - "summary": "list or watch objects of kind Job", - "nickname": "listJobForAllNamespaces", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.JobList" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/watch/jobs", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "versioned.Event", - "method": "GET", - "summary": "watch individual changes to a list of Job", - "nickname": "watchJobListForAllNamespaces", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "versioned.Event" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/jobs/{name}/status", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "v1beta1.Job", - "method": "GET", - "summary": "read status of the specified Job", - "nickname": "readNamespacedJobStatus", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.Job", - "method": "PUT", - "summary": "replace status of the specified Job", - "nickname": "replaceNamespacedJobStatus", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "v1beta1.Job", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.Job", - "method": "PATCH", - "summary": "partially update status of the specified Job", - "nickname": "patchNamespacedJobStatus", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "unversioned.Patch", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the Job", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.Job" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "v1beta1.NetworkPolicyList", - "method": "GET", - "summary": "list or watch objects of kind NetworkPolicy", - "nickname": "listNamespacedNetworkPolicy", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.NetworkPolicyList" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "v1beta1.NetworkPolicy", - "method": "POST", - "summary": "create a NetworkPolicy", - "nickname": "createNamespacedNetworkPolicy", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "v1beta1.NetworkPolicy", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.NetworkPolicy" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - }, - { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", - "summary": "delete collection of NetworkPolicy", - "nickname": "deletecollectionNamespacedNetworkPolicy", + "summary": "delete collection of PodSecurityPolicy", + "nickname": "deletecollectionPodSecurityPolicy", "parameters": [ { "type": "string", @@ -5258,7 +4139,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5269,21 +4150,13 @@ "description": "Timeout for the list/watch call.", "required": false, "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false } ], "responseMessages": [ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -5298,14 +4171,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies", + "path": "/apis/extensions/v1beta1/watch/podsecuritypolicies", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of NetworkPolicy", - "nickname": "watchNamespacedNetworkPolicyList", + "summary": "watch individual changes to a list of PodSecurityPolicy", + "nickname": "watchPodSecurityPolicyList", "parameters": [ { "type": "string", @@ -5343,7 +4216,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5354,21 +4227,13 @@ "description": "Timeout for the list/watch call.", "required": false, "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false } ], "responseMessages": [ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -5385,14 +4250,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/namespaces/{namespace}/networkpolicies/{name}", + "path": "/apis/extensions/v1beta1/podsecuritypolicies/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "v1beta1.NetworkPolicy", + "type": "v1beta1.PodSecurityPolicy", "method": "GET", - "summary": "read the specified NetworkPolicy", - "nickname": "readNamespacedNetworkPolicy", + "summary": "read the specified PodSecurityPolicy", + "nickname": "readPodSecurityPolicy", "parameters": [ { "type": "string", @@ -5414,23 +4279,15 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, { "type": "string", "paramType": "path", "name": "name", - "description": "name of the NetworkPolicy", + "description": "name of the PodSecurityPolicy", "required": true, "allowMultiple": false } @@ -5439,7 +4296,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.NetworkPolicy" + "responseModel": "v1beta1.PodSecurityPolicy" } ], "produces": [ @@ -5452,10 +4309,10 @@ ] }, { - "type": "v1beta1.NetworkPolicy", + "type": "v1beta1.PodSecurityPolicy", "method": "PUT", - "summary": "replace the specified NetworkPolicy", - "nickname": "replaceNamespacedNetworkPolicy", + "summary": "replace the specified PodSecurityPolicy", + "nickname": "replacePodSecurityPolicy", "parameters": [ { "type": "string", @@ -5466,26 +4323,18 @@ "allowMultiple": false }, { - "type": "v1beta1.NetworkPolicy", + "type": "v1beta1.PodSecurityPolicy", "paramType": "body", "name": "body", "description": "", "required": true, "allowMultiple": false }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, { "type": "string", "paramType": "path", "name": "name", - "description": "name of the NetworkPolicy", + "description": "name of the PodSecurityPolicy", "required": true, "allowMultiple": false } @@ -5494,7 +4343,7 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.NetworkPolicy" + "responseModel": "v1beta1.PodSecurityPolicy" } ], "produces": [ @@ -5507,67 +4356,10 @@ ] }, { - "type": "v1beta1.NetworkPolicy", + "type": "v1beta1.PodSecurityPolicy", "method": "PATCH", - "summary": "partially update the specified NetworkPolicy", - "nickname": "patchNamespacedNetworkPolicy", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "unversioned.Patch", - "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the NetworkPolicy", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "v1beta1.NetworkPolicy" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "application/json-patch+json", - "application/merge-patch+json", - "application/strategic-merge-patch+json" - ] - }, - { - "type": "unversioned.Status", - "method": "DELETE", - "summary": "delete a NetworkPolicy", - "nickname": "deleteNamespacedNetworkPolicy", + "summary": "partially update the specified PodSecurityPolicy", + "nickname": "patchPodSecurityPolicy", "parameters": [ { "type": "string", @@ -5578,127 +4370,10 @@ "allowMultiple": false }, { - "type": "v1.DeleteOptions", + "type": "v1.Patch", "paramType": "body", - "name": "body", - "description": "", - "required": true, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "gracePeriodSeconds", - "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", - "required": true, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "name", - "description": "name of the NetworkPolicy", - "required": true, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "unversioned.Status" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/watch/namespaces/{namespace}/networkpolicies/{name}", - "description": "API at /apis/extensions/v1beta1", - "operations": [ - { - "type": "versioned.Event", - "method": "GET", - "summary": "watch changes to an object of kind NetworkPolicy", - "nickname": "watchNamespacedNetworkPolicy", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "path", - "name": "namespace", - "description": "object name and auth scope, such as for teams and projects", + "name": "body", + "description": "", "required": true, "allowMultiple": false }, @@ -5706,7 +4381,7 @@ "type": "string", "paramType": "path", "name": "name", - "description": "name of the NetworkPolicy", + "description": "name of the PodSecurityPolicy", "required": true, "allowMultiple": false } @@ -5715,31 +4390,25 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1beta1.PodSecurityPolicy" } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf" ], "consumes": [ - "*/*" + "application/json-patch+json", + "application/merge-patch+json", + "application/strategic-merge-patch+json" ] - } - ] - }, - { - "path": "/apis/extensions/v1beta1/networkpolicies", - "description": "API at /apis/extensions/v1beta1", - "operations": [ + }, { - "type": "v1beta1.NetworkPolicyList", - "method": "GET", - "summary": "list or watch objects of kind NetworkPolicy", - "nickname": "listNetworkPolicyForAllNamespaces", + "type": "v1.Status", + "method": "DELETE", + "summary": "delete a PodSecurityPolicy", + "nickname": "deletePodSecurityPolicy", "parameters": [ { "type": "string", @@ -5750,43 +4419,43 @@ "allowMultiple": false }, { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, + "type": "v1.DeleteOptions", + "paramType": "body", + "name": "body", + "description": "", + "required": true, "allowMultiple": false }, { - "type": "string", + "type": "integer", "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", + "name": "gracePeriodSeconds", + "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.", "required": false, "allowMultiple": false }, { "type": "boolean", "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", + "name": "orphanDependents", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", "required": false, "allowMultiple": false }, { "type": "string", "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the PodSecurityPolicy", + "required": true, "allowMultiple": false } ], @@ -5794,15 +4463,13 @@ { "code": 200, "message": "OK", - "responseModel": "v1beta1.NetworkPolicyList" + "responseModel": "v1.Status" } ], "produces": [ "application/json", "application/yaml", - "application/vnd.kubernetes.protobuf", - "application/json;stream=watch", - "application/vnd.kubernetes.protobuf;stream=watch" + "application/vnd.kubernetes.protobuf" ], "consumes": [ "*/*" @@ -5811,14 +4478,14 @@ ] }, { - "path": "/apis/extensions/v1beta1/watch/networkpolicies", + "path": "/apis/extensions/v1beta1/watch/podsecuritypolicies/{name}", "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", - "summary": "watch individual changes to a list of NetworkPolicy", - "nickname": "watchNetworkPolicyListForAllNamespaces", + "summary": "watch changes to an object of kind PodSecurityPolicy", + "nickname": "watchPodSecurityPolicy", "parameters": [ { "type": "string", @@ -5856,7 +4523,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5867,13 +4534,21 @@ "description": "Timeout for the list/watch call.", "required": false, "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the PodSecurityPolicy", + "required": true, + "allowMultiple": false } ], "responseMessages": [ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -5935,7 +4610,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6022,7 +4697,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ReplicaSet", "nickname": "deletecollectionNamespacedReplicaSet", @@ -6063,7 +4738,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6088,7 +4763,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -6107,7 +4782,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ReplicaSet", "nickname": "watchNamespacedReplicaSetList", @@ -6148,7 +4823,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6173,7 +4848,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6219,7 +4894,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -6326,7 +5001,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -6369,7 +5044,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ReplicaSet", "nickname": "deleteNamespacedReplicaSet", @@ -6402,7 +5077,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -6427,7 +5110,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -6446,7 +5129,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ReplicaSet", "nickname": "watchNamespacedReplicaSet", @@ -6487,7 +5170,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6520,7 +5203,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6582,7 +5265,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6620,7 +5303,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ReplicaSet", "nickname": "watchReplicaSetListForAllNamespaces", @@ -6661,7 +5344,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6678,7 +5361,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6815,7 +5498,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -6980,7 +5663,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7145,7 +5828,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7235,7 +5918,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7306,7 +5989,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ThirdPartyResource", "nickname": "deletecollectionThirdPartyResource", @@ -7347,7 +6030,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7364,7 +6047,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -7383,7 +6066,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ThirdPartyResource", "nickname": "watchThirdPartyResourceList", @@ -7424,7 +6107,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7441,7 +6124,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -7487,7 +6170,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -7578,7 +6261,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7613,7 +6296,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ThirdPartyResource", "nickname": "deleteThirdPartyResource", @@ -7646,7 +6329,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -7663,7 +6354,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -7682,7 +6373,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ThirdPartyResource", "nickname": "watchThirdPartyResource", @@ -7723,7 +6414,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7748,7 +6439,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -7769,7 +6460,7 @@ "description": "API at /apis/extensions/v1beta1", "operations": [ { - "type": "unversioned.APIResourceList", + "type": "v1.APIResourceList", "method": "GET", "summary": "get available resources", "nickname": "getAPIResources", @@ -7805,7 +6496,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "items": { @@ -7813,12 +6504,12 @@ "items": { "$ref": "v1beta1.DaemonSet" }, - "description": "Items is a list of daemon sets." + "description": "A list of daemon sets." } } }, - "unversioned.ListMeta": { - "id": "unversioned.ListMeta", + "v1.ListMeta": { + "id": "v1.ListMeta", "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", "properties": { "selfLink": { @@ -7849,11 +6540,11 @@ }, "spec": { "$ref": "v1beta1.DaemonSetSpec", - "description": "Spec defines the desired behavior of this daemon set. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" + "description": "The desired behavior of this daemon set. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" }, "status": { "$ref": "v1beta1.DaemonSetStatus", - "description": "Status is the current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" + "description": "The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" } } }, @@ -7892,12 +6583,10 @@ }, "creationTimestamp": { "type": "string", - "format": "date-time", "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "deletionTimestamp": { "type": "string", - "format": "date-time", "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "deletionGracePeriodSeconds": { @@ -7962,6 +6651,10 @@ "controller": { "type": "boolean", "description": "If true, this reference points to the managing controller." + }, + "blockOwnerDeletion": { + "type": "boolean", + "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned." } } }, @@ -7973,17 +6666,31 @@ ], "properties": { "selector": { - "$ref": "unversioned.LabelSelector", - "description": "Selector is a label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" + "$ref": "v1.LabelSelector", + "description": "A label query over pods that are managed by the daemon set. Must match in order to be controlled. If empty, defaulted to labels on Pod template. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" }, "template": { "$ref": "v1.PodTemplateSpec", - "description": "Template is the object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template" + "description": "An object that describes the pod that will be created. The DaemonSet will create exactly one copy of this pod on every node that matches the template's node selector (or on every node if no node selector is specified). More info: http://kubernetes.io/docs/user-guide/replication-controller#pod-template" + }, + "updateStrategy": { + "$ref": "v1beta1.DaemonSetUpdateStrategy", + "description": "An update strategy to replace existing DaemonSet pods with new pods." + }, + "minReadySeconds": { + "type": "integer", + "format": "int32", + "description": "The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)." + }, + "templateGeneration": { + "type": "integer", + "format": "int64", + "description": "A sequence number representing a specific generation of the template. Populated by the system. It can be set only during the creation." } } }, - "unversioned.LabelSelector": { - "id": "unversioned.LabelSelector", + "v1.LabelSelector": { + "id": "v1.LabelSelector", "description": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", "properties": { "matchLabels": { @@ -7993,14 +6700,14 @@ "matchExpressions": { "type": "array", "items": { - "$ref": "unversioned.LabelSelectorRequirement" + "$ref": "v1.LabelSelectorRequirement" }, "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed." } } }, - "unversioned.LabelSelectorRequirement": { - "id": "unversioned.LabelSelectorRequirement", + "v1.LabelSelectorRequirement": { + "id": "v1.LabelSelectorRequirement", "description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", "required": [ "key", @@ -8052,6 +6759,13 @@ }, "description": "List of volumes that can be mounted by containers belonging to the pod. More info: http://kubernetes.io/docs/user-guide/volumes" }, + "initContainers": { + "type": "array", + "items": { + "$ref": "v1.Container" + }, + "description": "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers" + }, "containers": { "type": "array", "items": { @@ -8075,7 +6789,7 @@ }, "dnsPolicy": { "type": "string", - "description": "Set DNS policy for containers within the pod. One of 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\"." + "description": "Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'." }, "nodeSelector": { "type": "object", @@ -8089,6 +6803,10 @@ "type": "string", "description": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead." }, + "automountServiceAccountToken": { + "type": "boolean", + "description": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted." + }, "nodeName": { "type": "string", "description": "NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements." @@ -8123,6 +6841,21 @@ "subdomain": { "type": "string", "description": "If specified, the fully qualified Pod hostname will be \"\u003chostname\u003e.\u003csubdomain\u003e.\u003cpod namespace\u003e.svc.\u003ccluster domain\u003e\". If not specified, the pod will not have a domainname at all." + }, + "affinity": { + "$ref": "v1.Affinity", + "description": "If specified, the pod's scheduling constraints" + }, + "schedulerName": { + "type": "string", + "description": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler." + }, + "tolerations": { + "type": "array", + "items": { + "$ref": "v1.Toleration" + }, + "description": "If specified, the pod's tolerations." } } }, @@ -8228,6 +6961,18 @@ "photonPersistentDisk": { "$ref": "v1.PhotonPersistentDiskVolumeSource", "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine" + }, + "projected": { + "$ref": "v1.ProjectedVolumeSource", + "description": "Items for all in one resources secrets, configmaps, and downward API" + }, + "portworxVolume": { + "$ref": "v1.PortworxVolumeSource", + "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine" + }, + "scaleIO": { + "$ref": "v1.ScaleIOVolumeSource", + "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes." } } }, @@ -8340,12 +7085,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's keys must be defined" } } }, @@ -8427,6 +7176,13 @@ "readOnly": { "type": "boolean", "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false." + }, + "portals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260)." } } }, @@ -8771,12 +7527,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's keys must be defined" } } }, @@ -8878,6 +7638,172 @@ } } }, + "v1.ProjectedVolumeSource": { + "id": "v1.ProjectedVolumeSource", + "description": "Represents a projected volume source", + "required": [ + "sources" + ], + "properties": { + "sources": { + "type": "array", + "items": { + "$ref": "v1.VolumeProjection" + }, + "description": "list of volume projections" + }, + "defaultMode": { + "type": "integer", + "format": "int32", + "description": "Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + } + } + }, + "v1.VolumeProjection": { + "id": "v1.VolumeProjection", + "description": "Projection that may be projected along with other supported volume types", + "properties": { + "secret": { + "$ref": "v1.SecretProjection", + "description": "information about the secret data to project" + }, + "downwardAPI": { + "$ref": "v1.DownwardAPIProjection", + "description": "information about the downwardAPI data to project" + }, + "configMap": { + "$ref": "v1.ConfigMapProjection", + "description": "information about the configMap data to project" + } + } + }, + "v1.SecretProjection": { + "id": "v1.SecretProjection", + "description": "Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "items": { + "type": "array", + "items": { + "$ref": "v1.KeyToPath" + }, + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or its key must be defined" + } + } + }, + "v1.DownwardAPIProjection": { + "id": "v1.DownwardAPIProjection", + "description": "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "v1.DownwardAPIVolumeFile" + }, + "description": "Items is a list of DownwardAPIVolume file" + } + } + }, + "v1.ConfigMapProjection": { + "id": "v1.ConfigMapProjection", + "description": "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "items": { + "type": "array", + "items": { + "$ref": "v1.KeyToPath" + }, + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's keys must be defined" + } + } + }, + "v1.PortworxVolumeSource": { + "id": "v1.PortworxVolumeSource", + "description": "PortworxVolumeSource represents a Portworx volume resource.", + "required": [ + "volumeID" + ], + "properties": { + "volumeID": { + "type": "string", + "description": "VolumeID uniquely identifies a Portworx volume" + }, + "fsType": { + "type": "string", + "description": "FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified." + }, + "readOnly": { + "type": "boolean", + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts." + } + } + }, + "v1.ScaleIOVolumeSource": { + "id": "v1.ScaleIOVolumeSource", + "description": "ScaleIOVolumeSource represents a persistent ScaleIO volume", + "required": [ + "gateway", + "system", + "secretRef" + ], + "properties": { + "gateway": { + "type": "string", + "description": "The host address of the ScaleIO API Gateway." + }, + "system": { + "type": "string", + "description": "The name of the storage system as configured in ScaleIO." + }, + "secretRef": { + "$ref": "v1.LocalObjectReference", + "description": "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail." + }, + "sslEnabled": { + "type": "boolean", + "description": "Flag to enable/disable SSL communication with Gateway, default false" + }, + "protectionDomain": { + "type": "string", + "description": "The name of the Protection Domain for the configured storage (defaults to \"default\")." + }, + "storagePool": { + "type": "string", + "description": "The Storage Pool associated with the protection domain (defaults to \"default\")." + }, + "storageMode": { + "type": "string", + "description": "Indicates whether the storage for a volume should be thick or thin (defaults to \"thin\")." + }, + "volumeName": { + "type": "string", + "description": "The name of a volume already created in the ScaleIO system that is associated with this volume source." + }, + "fsType": { + "type": "string", + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified." + }, + "readOnly": { + "type": "boolean", + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts." + } + } + }, "v1.Container": { "id": "v1.Container", "description": "A single application container that you want to run within a pod.", @@ -8918,6 +7844,13 @@ }, "description": "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated." }, + "envFrom": { + "type": "array", + "items": { + "$ref": "v1.EnvFromSource" + }, + "description": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated." + }, "env": { "type": "array", "items": { @@ -8950,7 +7883,11 @@ }, "terminationMessagePath": { "type": "string", - "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated." + "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated." + }, + "terminationMessagePolicy": { + "type": "string", + "description": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated." }, "imagePullPolicy": { "type": "string", @@ -9005,6 +7942,52 @@ } } }, + "v1.EnvFromSource": { + "id": "v1.EnvFromSource", + "description": "EnvFromSource represents the source of a set of ConfigMaps", + "properties": { + "prefix": { + "type": "string", + "description": "An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER." + }, + "configMapRef": { + "$ref": "v1.ConfigMapEnvSource", + "description": "The ConfigMap to select from" + }, + "secretRef": { + "$ref": "v1.SecretEnvSource", + "description": "The Secret to select from" + } + } + }, + "v1.ConfigMapEnvSource": { + "id": "v1.ConfigMapEnvSource", + "description": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap must be defined" + } + } + }, + "v1.SecretEnvSource": { + "id": "v1.SecretEnvSource", + "description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret must be defined" + } + } + }, "v1.EnvVar": { "id": "v1.EnvVar", "description": "EnvVar represents an environment variable present in a Container.", @@ -9062,6 +8045,10 @@ "key": { "type": "string", "description": "The key to select." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's key must be defined" } } }, @@ -9079,6 +8066,10 @@ "key": { "type": "string", "description": "The key of the secret to select from. Must be a valid secret key." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's key must be defined" } } }, @@ -9381,6 +8372,247 @@ } } }, + "v1.Affinity": { + "id": "v1.Affinity", + "description": "Affinity is a group of affinity scheduling rules.", + "properties": { + "nodeAffinity": { + "$ref": "v1.NodeAffinity", + "description": "Describes node affinity scheduling rules for the pod." + }, + "podAffinity": { + "$ref": "v1.PodAffinity", + "description": "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s))." + }, + "podAntiAffinity": { + "$ref": "v1.PodAntiAffinity", + "description": "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s))." + } + } + }, + "v1.NodeAffinity": { + "id": "v1.NodeAffinity", + "description": "Node affinity is a group of node affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "$ref": "v1.NodeSelector", + "description": "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PreferredSchedulingTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.NodeSelector": { + "id": "v1.NodeSelector", + "description": "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.", + "required": [ + "nodeSelectorTerms" + ], + "properties": { + "nodeSelectorTerms": { + "type": "array", + "items": { + "$ref": "v1.NodeSelectorTerm" + }, + "description": "Required. A list of node selector terms. The terms are ORed." + } + } + }, + "v1.NodeSelectorTerm": { + "id": "v1.NodeSelectorTerm", + "description": "A null or empty node selector term matches no objects.", + "required": [ + "matchExpressions" + ], + "properties": { + "matchExpressions": { + "type": "array", + "items": { + "$ref": "v1.NodeSelectorRequirement" + }, + "description": "Required. A list of node selector requirements. The requirements are ANDed." + } + } + }, + "v1.NodeSelectorRequirement": { + "id": "v1.NodeSelectorRequirement", + "description": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "required": [ + "key", + "operator" + ], + "properties": { + "key": { + "type": "string", + "description": "The label key that the selector applies to." + }, + "operator": { + "type": "string", + "description": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt." + }, + "values": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch." + } + } + }, + "v1.PreferredSchedulingTerm": { + "id": "v1.PreferredSchedulingTerm", + "description": "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).", + "required": [ + "weight", + "preference" + ], + "properties": { + "weight": { + "type": "integer", + "format": "int32", + "description": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100." + }, + "preference": { + "$ref": "v1.NodeSelectorTerm", + "description": "A node selector term, associated with the corresponding weight." + } + } + }, + "v1.PodAffinity": { + "id": "v1.PodAffinity", + "description": "Pod affinity is a group of inter pod affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PodAffinityTerm" + }, + "description": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.WeightedPodAffinityTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.PodAffinityTerm": { + "id": "v1.PodAffinityTerm", + "description": "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key \u003ctopologyKey\u003e tches that of any node on which a pod of the set of pods is running", + "properties": { + "labelSelector": { + "$ref": "v1.LabelSelector", + "description": "A label query over a set of resources, in this case pods." + }, + "namespaces": { + "type": "array", + "items": { + "type": "string" + }, + "description": "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"" + }, + "topologyKey": { + "type": "string", + "description": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as \"all topologies\" (\"all topologies\" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed." + } + } + }, + "v1.WeightedPodAffinityTerm": { + "id": "v1.WeightedPodAffinityTerm", + "description": "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)", + "required": [ + "weight", + "podAffinityTerm" + ], + "properties": { + "weight": { + "type": "integer", + "format": "int32", + "description": "weight associated with matching the corresponding podAffinityTerm, in the range 1-100." + }, + "podAffinityTerm": { + "$ref": "v1.PodAffinityTerm", + "description": "Required. A pod affinity term, associated with the corresponding weight." + } + } + }, + "v1.PodAntiAffinity": { + "id": "v1.PodAntiAffinity", + "description": "Pod anti affinity is a group of inter pod anti affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PodAffinityTerm" + }, + "description": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.WeightedPodAffinityTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.Toleration": { + "id": "v1.Toleration", + "description": "The pod this Toleration is attached to tolerates any taint that matches the triple \u003ckey,value,effect\u003e using the matching operator \u003coperator\u003e.", + "properties": { + "key": { + "type": "string", + "description": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys." + }, + "operator": { + "type": "string", + "description": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category." + }, + "value": { + "type": "string", + "description": "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string." + }, + "effect": { + "type": "string", + "description": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute." + }, + "tolerationSeconds": { + "type": "integer", + "format": "int64", + "description": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system." + } + } + }, + "v1beta1.DaemonSetUpdateStrategy": { + "id": "v1beta1.DaemonSetUpdateStrategy", + "properties": { + "type": { + "type": "string", + "description": "Type of daemon set update. Can be \"RollingUpdate\" or \"OnDelete\". Default is OnDelete." + }, + "rollingUpdate": { + "$ref": "v1beta1.RollingUpdateDaemonSet", + "description": "Rolling update config params. Present only if type = \"RollingUpdate\"." + } + } + }, + "v1beta1.RollingUpdateDaemonSet": { + "id": "v1beta1.RollingUpdateDaemonSet", + "description": "Spec to control the desired behavior of daemon set rolling update.", + "properties": { + "maxUnavailable": { + "type": "string", + "description": "The maximum number of DaemonSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update." + } + } + }, "v1beta1.DaemonSetStatus": { "id": "v1beta1.DaemonSetStatus", "description": "DaemonSetStatus represents the current status of a daemon set.", @@ -9394,27 +8626,47 @@ "currentNumberScheduled": { "type": "integer", "format": "int32", - "description": "CurrentNumberScheduled is the number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" + "description": "The number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" }, "numberMisscheduled": { "type": "integer", "format": "int32", - "description": "NumberMisscheduled is the number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" + "description": "The number of nodes that are running the daemon pod, but are not supposed to run the daemon pod. More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" }, "desiredNumberScheduled": { "type": "integer", "format": "int32", - "description": "DesiredNumberScheduled is the total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" + "description": "The total number of nodes that should be running the daemon pod (including nodes correctly running the daemon pod). More info: http://releases.k8s.io/HEAD/docs/admin/daemons.md" }, "numberReady": { "type": "integer", "format": "int32", - "description": "NumberReady is the number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready." + "description": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready." + }, + "observedGeneration": { + "type": "integer", + "format": "int64", + "description": "The most recent generation observed by the daemon set controller." + }, + "updatedNumberScheduled": { + "type": "integer", + "format": "int32", + "description": "The total number of nodes that are running updated daemon pod" + }, + "numberAvailable": { + "type": "integer", + "format": "int32", + "description": "The number of nodes that should be running the daemon pod and have one or more of the daemon pod running and available (ready for at least spec.minReadySeconds)" + }, + "numberUnavailable": { + "type": "integer", + "format": "int32", + "description": "The number of nodes that should be running the daemon pod and have none of the daemon pod running and available (ready for at least spec.minReadySeconds)" } } }, - "unversioned.Status": { - "id": "unversioned.Status", + "v1.Status": { + "id": "v1.Status", "description": "Status is a return value for calls that don't return other objects.", "properties": { "kind": { @@ -9426,7 +8678,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "status": { @@ -9442,7 +8694,7 @@ "description": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it." }, "details": { - "$ref": "unversioned.StatusDetails", + "$ref": "v1.StatusDetails", "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "code": { @@ -9452,8 +8704,8 @@ } } }, - "unversioned.StatusDetails": { - "id": "unversioned.StatusDetails", + "v1.StatusDetails": { + "id": "v1.StatusDetails", "description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", "properties": { "name": { @@ -9471,7 +8723,7 @@ "causes": { "type": "array", "items": { - "$ref": "unversioned.StatusCause" + "$ref": "v1.StatusCause" }, "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes." }, @@ -9482,8 +8734,8 @@ } } }, - "unversioned.StatusCause": { - "id": "unversioned.StatusCause", + "v1.StatusCause": { + "id": "v1.StatusCause", "description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", "properties": { "reason": { @@ -9500,8 +8752,8 @@ } } }, - "versioned.Event": { - "id": "versioned.Event", + "v1.WatchEvent": { + "id": "v1.WatchEvent", "required": [ "type", "object" @@ -9515,14 +8767,14 @@ } } }, - "unversioned.Patch": { - "id": "unversioned.Patch", + "v1.Patch": { + "id": "v1.Patch", "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", "properties": {} }, "v1.DeleteOptions": { "id": "v1.DeleteOptions", - "description": "DeleteOptions may be provided when deleting an API object", + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "kind": { "type": "string", @@ -9543,7 +8795,11 @@ }, "orphanDependents": { "type": "boolean", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list." + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both." + }, + "propagationPolicy": { + "$ref": "v1.DeletionPropagation", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy." } } }, @@ -9561,6 +8817,10 @@ "id": "types.UID", "properties": {} }, + "v1.DeletionPropagation": { + "id": "v1.DeletionPropagation", + "properties": {} + }, "v1beta1.DeploymentList": { "id": "v1beta1.DeploymentList", "description": "DeploymentList is a list of Deployments.", @@ -9577,7 +8837,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata." }, "items": { @@ -9628,7 +8888,7 @@ "description": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1." }, "selector": { - "$ref": "unversioned.LabelSelector", + "$ref": "v1.LabelSelector", "description": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment." }, "template": { @@ -9684,7 +8944,7 @@ "properties": { "maxUnavailable": { "type": "string", - "description": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding up. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods." + "description": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. By default, a fixed value of 1 is used. Example: when this is set to 30%, the old RC can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods." }, "maxSurge": { "type": "string", @@ -9721,6 +8981,11 @@ "format": "int32", "description": "Total number of non-terminated pods targeted by this deployment that have the desired template spec." }, + "readyReplicas": { + "type": "integer", + "format": "int32", + "description": "Total number of ready pods targeted by this deployment." + }, "availableReplicas": { "type": "integer", "format": "int32", @@ -9758,12 +9023,10 @@ }, "lastUpdateTime": { "type": "string", - "format": "date-time", "description": "The last time this condition was updated." }, "lastTransitionTime": { "type": "string", - "format": "date-time", "description": "Last time the condition transitioned from one status to another." }, "reason": { @@ -9850,170 +9113,18 @@ "replicas" ], "properties": { - "replicas": { - "type": "integer", - "format": "int32", - "description": "actual number of observed instances of the scaled object." - }, - "selector": { - "type": "object", - "description": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" - }, - "targetSelector": { - "type": "string", - "description": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" - } - } - }, - "v1beta1.HorizontalPodAutoscalerList": { - "id": "v1beta1.HorizontalPodAutoscalerList", - "description": "list of horizontal pod autoscaler objects.", - "required": [ - "items" - ], - "properties": { - "kind": { - "type": "string", - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" - }, - "apiVersion": { - "type": "string", - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" - }, - "metadata": { - "$ref": "unversioned.ListMeta", - "description": "Standard list metadata." - }, - "items": { - "type": "array", - "items": { - "$ref": "v1beta1.HorizontalPodAutoscaler" - }, - "description": "list of horizontal pod autoscaler objects." - } - } - }, - "v1beta1.HorizontalPodAutoscaler": { - "id": "v1beta1.HorizontalPodAutoscaler", - "description": "configuration of a horizontal pod autoscaler.", - "properties": { - "kind": { - "type": "string", - "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" - }, - "apiVersion": { - "type": "string", - "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" - }, - "metadata": { - "$ref": "v1.ObjectMeta", - "description": "Standard object metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" - }, - "spec": { - "$ref": "v1beta1.HorizontalPodAutoscalerSpec", - "description": "behaviour of autoscaler. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status." - }, - "status": { - "$ref": "v1beta1.HorizontalPodAutoscalerStatus", - "description": "current information about the autoscaler." - } - } - }, - "v1beta1.HorizontalPodAutoscalerSpec": { - "id": "v1beta1.HorizontalPodAutoscalerSpec", - "description": "specification of a horizontal pod autoscaler.", - "required": [ - "scaleRef", - "maxReplicas" - ], - "properties": { - "scaleRef": { - "$ref": "v1beta1.SubresourceReference", - "description": "reference to Scale subresource; horizontal pod autoscaler will learn the current resource consumption from its status, and will set the desired number of pods by modifying its spec." - }, - "minReplicas": { - "type": "integer", - "format": "int32", - "description": "lower limit for the number of pods that can be set by the autoscaler, default 1." - }, - "maxReplicas": { - "type": "integer", - "format": "int32", - "description": "upper limit for the number of pods that can be set by the autoscaler; cannot be smaller than MinReplicas." - }, - "cpuUtilization": { - "$ref": "v1beta1.CPUTargetUtilization", - "description": "target average CPU utilization (represented as a percentage of requested CPU) over all the pods; if not specified it defaults to the target CPU utilization at 80% of the requested resources." - } - } - }, - "v1beta1.SubresourceReference": { - "id": "v1beta1.SubresourceReference", - "description": "SubresourceReference contains enough information to let you inspect or modify the referred subresource.", - "properties": { - "kind": { - "type": "string", - "description": "Kind of the referent; More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" - }, - "name": { - "type": "string", - "description": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names" - }, - "apiVersion": { - "type": "string", - "description": "API version of the referent" - }, - "subresource": { - "type": "string", - "description": "Subresource name of the referent" - } - } - }, - "v1beta1.CPUTargetUtilization": { - "id": "v1beta1.CPUTargetUtilization", - "required": [ - "targetPercentage" - ], - "properties": { - "targetPercentage": { - "type": "integer", - "format": "int32", - "description": "fraction of the requested CPU that should be utilized/used, e.g. 70 means that 70% of the requested CPU should be in use." - } - } - }, - "v1beta1.HorizontalPodAutoscalerStatus": { - "id": "v1beta1.HorizontalPodAutoscalerStatus", - "description": "current status of a horizontal pod autoscaler", - "required": [ - "currentReplicas", - "desiredReplicas" - ], - "properties": { - "observedGeneration": { - "type": "integer", - "format": "int64", - "description": "most recent generation observed by this autoscaler." - }, - "lastScaleTime": { - "type": "string", - "format": "date-time", - "description": "last time the HorizontalPodAutoscaler scaled the number of pods; used by the autoscaler to control how often the number of pods is changed." - }, - "currentReplicas": { + "replicas": { "type": "integer", "format": "int32", - "description": "current number of replicas of pods managed by this autoscaler." + "description": "actual number of observed instances of the scaled object." }, - "desiredReplicas": { - "type": "integer", - "format": "int32", - "description": "desired number of replicas of pods managed by this autoscaler." + "selector": { + "type": "object", + "description": "label query over pods that should match the replicas count. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" }, - "currentCPUUtilizationPercentage": { - "type": "integer", - "format": "int32", - "description": "current average CPU utilization over all pods, represented as a percentage of requested CPU, e.g. 70 means that an average pod is using now 70% of its requested CPU." + "targetSelector": { + "type": "string", + "description": "label selector for pods that should match the replicas count. This is a serializated version of both map-based and more expressive set-based selectors. This is done to avoid introspection in the clients. The string will be in the same format as the query-param syntax. If the target type only supports map-based selectors, both this field and map-based selector field are populated. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" } } }, @@ -10033,7 +9144,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "items": { @@ -10213,9 +9324,9 @@ } } }, - "v1beta1.JobList": { - "id": "v1beta1.JobList", - "description": "JobList is a collection of jobs. DEPRECATED: extensions/v1beta1.JobList is deprecated, use batch/v1.JobList instead.", + "v1beta1.NetworkPolicyList": { + "id": "v1beta1.NetworkPolicyList", + "description": "Network Policy List is a list of NetworkPolicy objects.", "required": [ "items" ], @@ -10229,21 +9340,20 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", - "description": "Standard list metadata More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" + "$ref": "v1.ListMeta", + "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "items": { "type": "array", "items": { - "$ref": "v1beta1.Job" + "$ref": "v1beta1.NetworkPolicy" }, - "description": "Items is the list of Job." + "description": "Items is a list of schema objects." } } }, - "v1beta1.Job": { - "id": "v1beta1.Job", - "description": "Job represents the configuration of a single job. DEPRECATED: extensions/v1beta1.Job is deprecated, use batch/v1.Job instead.", + "v1beta1.NetworkPolicy": { + "id": "v1beta1.NetworkPolicy", "properties": { "kind": { "type": "string", @@ -10258,128 +9368,83 @@ "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "spec": { - "$ref": "v1beta1.JobSpec", - "description": "Spec is a structure defining the expected behavior of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" - }, - "status": { - "$ref": "v1beta1.JobStatus", - "description": "Status is a structure describing current status of a job. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#spec-and-status" + "$ref": "v1beta1.NetworkPolicySpec", + "description": "Specification of the desired behavior for this NetworkPolicy." } } }, - "v1beta1.JobSpec": { - "id": "v1beta1.JobSpec", - "description": "JobSpec describes how the job execution will look like.", + "v1beta1.NetworkPolicySpec": { + "id": "v1beta1.NetworkPolicySpec", "required": [ - "template" + "podSelector" ], "properties": { - "parallelism": { - "type": "integer", - "format": "int32", - "description": "Parallelism specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) \u003c .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: http://kubernetes.io/docs/user-guide/jobs" - }, - "completions": { - "type": "integer", - "format": "int32", - "description": "Completions specifies the desired number of successfully finished pods the job should be run with. Setting to nil means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: http://kubernetes.io/docs/user-guide/jobs" - }, - "activeDeadlineSeconds": { - "type": "integer", - "format": "int64", - "description": "Optional duration in seconds relative to the startTime that the job may be active before the system tries to terminate it; value must be positive integer" - }, - "selector": { - "$ref": "unversioned.LabelSelector", - "description": "Selector is a label query over pods that should match the pod count. Normally, the system sets this field for you. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" - }, - "autoSelector": { - "type": "boolean", - "description": "AutoSelector controls generation of pod labels and pod selectors. It was not present in the original extensions/v1beta1 Job definition, but exists to allow conversion from batch/v1 Jobs, where it corresponds to, but has the opposite meaning as, ManualSelector. More info: http://releases.k8s.io/HEAD/docs/design/selector-generation.md" + "podSelector": { + "$ref": "v1.LabelSelector", + "description": "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace." }, - "template": { - "$ref": "v1.PodTemplateSpec", - "description": "Template is the object that describes the pod that will be created when executing a job. More info: http://kubernetes.io/docs/user-guide/jobs" + "ingress": { + "type": "array", + "items": { + "$ref": "v1beta1.NetworkPolicyIngressRule" + }, + "description": "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if namespace.networkPolicy.ingress.isolation is undefined and cluster policy allows it, OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not affect ingress isolation. If this field is present and contains at least one rule, this policy allows any traffic which matches at least one of the ingress rules in this list." } } }, - "v1beta1.JobStatus": { - "id": "v1beta1.JobStatus", - "description": "JobStatus represents the current state of a Job.", + "v1beta1.NetworkPolicyIngressRule": { + "id": "v1beta1.NetworkPolicyIngressRule", + "description": "This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.", "properties": { - "conditions": { + "ports": { "type": "array", "items": { - "$ref": "v1beta1.JobCondition" + "$ref": "v1beta1.NetworkPolicyPort" }, - "description": "Conditions represent the latest available observations of an object's current state. More info: http://kubernetes.io/docs/user-guide/jobs" - }, - "startTime": { - "type": "string", - "format": "date-time", - "description": "StartTime represents time when the job was acknowledged by the Job Manager. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC." - }, - "completionTime": { - "type": "string", - "format": "date-time", - "description": "CompletionTime represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC." - }, - "active": { - "type": "integer", - "format": "int32", - "description": "Active is the number of actively running pods." - }, - "succeeded": { - "type": "integer", - "format": "int32", - "description": "Succeeded is the number of pods which reached Phase Succeeded." + "description": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is not provided, this rule matches all ports (traffic not restricted by port). If this field is empty, this rule matches no ports (no traffic matches). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list." }, - "failed": { - "type": "integer", - "format": "int32", - "description": "Failed is the number of pods which reached Phase Failed." + "from": { + "type": "array", + "items": { + "$ref": "v1beta1.NetworkPolicyPeer" + }, + "description": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is not provided, this rule matches all sources (traffic not restricted by source). If this field is empty, this rule matches no sources (no traffic matches). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list." } } }, - "v1beta1.JobCondition": { - "id": "v1beta1.JobCondition", - "description": "JobCondition describes current state of a job.", - "required": [ - "type", - "status" - ], + "v1beta1.NetworkPolicyPort": { + "id": "v1beta1.NetworkPolicyPort", "properties": { - "type": { - "type": "string", - "description": "Type of job condition, Complete or Failed." - }, - "status": { - "type": "string", - "description": "Status of the condition, one of True, False, Unknown." - }, - "lastProbeTime": { - "type": "string", - "format": "date-time", - "description": "Last time the condition was checked." - }, - "lastTransitionTime": { - "type": "string", - "format": "date-time", - "description": "Last time the condition transit from one status to another." + "protocol": { + "$ref": "v1.Protocol", + "description": "Optional. The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP." }, - "reason": { + "port": { "type": "string", - "description": "(brief) reason for the condition's last transition." + "description": "If specified, the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched." + } + } + }, + "v1.Protocol": { + "id": "v1.Protocol", + "properties": {} + }, + "v1beta1.NetworkPolicyPeer": { + "id": "v1beta1.NetworkPolicyPeer", + "properties": { + "podSelector": { + "$ref": "v1.LabelSelector", + "description": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If not provided, this selector selects no pods. If present but empty, this selector selects all pods in this namespace." }, - "message": { - "type": "string", - "description": "Human readable message indicating details about last transition." + "namespaceSelector": { + "$ref": "v1.LabelSelector", + "description": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If omitted, this selector selects no namespaces. If present but empty, this selector selects all namespaces." } } }, - "v1beta1.NetworkPolicyList": { - "id": "v1beta1.NetworkPolicyList", - "description": "Network Policy List is a list of NetworkPolicy objects.", + "v1beta1.PodSecurityPolicyList": { + "id": "v1beta1.PodSecurityPolicyList", + "description": "Pod Security Policy List is a list of PodSecurityPolicy objects.", "required": [ "items" ], @@ -10393,20 +9458,21 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "items": { "type": "array", "items": { - "$ref": "v1beta1.NetworkPolicy" + "$ref": "v1beta1.PodSecurityPolicy" }, "description": "Items is a list of schema objects." } } }, - "v1beta1.NetworkPolicy": { - "id": "v1beta1.NetworkPolicy", + "v1beta1.PodSecurityPolicy": { + "id": "v1beta1.PodSecurityPolicy", + "description": "Pod Security Policy governs the ability to make requests that affect the Security Context that will be applied to a pod and container.", "properties": { "kind": { "type": "string", @@ -10421,77 +9487,206 @@ "description": "Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "spec": { - "$ref": "v1beta1.NetworkPolicySpec", - "description": "Specification of the desired behavior for this NetworkPolicy." + "$ref": "v1beta1.PodSecurityPolicySpec", + "description": "spec defines the policy enforced." } } }, - "v1beta1.NetworkPolicySpec": { - "id": "v1beta1.NetworkPolicySpec", + "v1beta1.PodSecurityPolicySpec": { + "id": "v1beta1.PodSecurityPolicySpec", + "description": "Pod Security Policy Spec defines the policy enforced.", "required": [ - "podSelector" + "seLinux", + "runAsUser", + "supplementalGroups", + "fsGroup" ], "properties": { - "podSelector": { - "$ref": "unversioned.LabelSelector", - "description": "Selects the pods to which this NetworkPolicy object applies. The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace." + "privileged": { + "type": "boolean", + "description": "privileged determines if a pod can request to be run as privileged." }, - "ingress": { + "defaultAddCapabilities": { "type": "array", "items": { - "$ref": "v1beta1.NetworkPolicyIngressRule" + "$ref": "v1.Capability" }, - "description": "List of ingress rules to be applied to the selected pods. Traffic is allowed to a pod if namespace.networkPolicy.ingress.isolation is undefined and cluster policy allows it, OR if the traffic source is the pod's local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not affect ingress isolation. If this field is present and contains at least one rule, this policy allows any traffic which matches at least one of the ingress rules in this list." - } - } - }, - "v1beta1.NetworkPolicyIngressRule": { - "id": "v1beta1.NetworkPolicyIngressRule", - "description": "This NetworkPolicyIngressRule matches traffic if and only if the traffic matches both ports AND from.", - "properties": { - "ports": { + "description": "DefaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capabiility in both DefaultAddCapabilities and RequiredDropCapabilities." + }, + "requiredDropCapabilities": { "type": "array", "items": { - "$ref": "v1beta1.NetworkPolicyPort" + "$ref": "v1.Capability" }, - "description": "List of ports which should be made accessible on the pods selected for this rule. Each item in this list is combined using a logical OR. If this field is not provided, this rule matches all ports (traffic not restricted by port). If this field is empty, this rule matches no ports (no traffic matches). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list." + "description": "RequiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added." }, - "from": { + "allowedCapabilities": { "type": "array", "items": { - "$ref": "v1beta1.NetworkPolicyPeer" + "$ref": "v1.Capability" }, - "description": "List of sources which should be able to access the pods selected for this rule. Items in this list are combined using a logical OR operation. If this field is not provided, this rule matches all sources (traffic not restricted by source). If this field is empty, this rule matches no sources (no traffic matches). If this field is present and contains at least on item, this rule allows traffic only if the traffic matches at least one item in the from list." + "description": "AllowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author's discretion. You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities." + }, + "volumes": { + "type": "array", + "items": { + "$ref": "v1beta1.FSType" + }, + "description": "volumes is a white list of allowed volume plugins. Empty indicates that all plugins may be used." + }, + "hostNetwork": { + "type": "boolean", + "description": "hostNetwork determines if the policy allows the use of HostNetwork in the pod spec." + }, + "hostPorts": { + "type": "array", + "items": { + "$ref": "v1beta1.HostPortRange" + }, + "description": "hostPorts determines which host port ranges are allowed to be exposed." + }, + "hostPID": { + "type": "boolean", + "description": "hostPID determines if the policy allows the use of HostPID in the pod spec." + }, + "hostIPC": { + "type": "boolean", + "description": "hostIPC determines if the policy allows the use of HostIPC in the pod spec." + }, + "seLinux": { + "$ref": "v1beta1.SELinuxStrategyOptions", + "description": "seLinux is the strategy that will dictate the allowable labels that may be set." + }, + "runAsUser": { + "$ref": "v1beta1.RunAsUserStrategyOptions", + "description": "runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set." + }, + "supplementalGroups": { + "$ref": "v1beta1.SupplementalGroupsStrategyOptions", + "description": "SupplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext." + }, + "fsGroup": { + "$ref": "v1beta1.FSGroupStrategyOptions", + "description": "FSGroup is the strategy that will dictate what fs group is used by the SecurityContext." + }, + "readOnlyRootFilesystem": { + "type": "boolean", + "description": "ReadOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to." } } }, - "v1beta1.NetworkPolicyPort": { - "id": "v1beta1.NetworkPolicyPort", + "v1beta1.FSType": { + "id": "v1beta1.FSType", + "properties": {} + }, + "v1beta1.HostPortRange": { + "id": "v1beta1.HostPortRange", + "description": "Host Port Range defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.", + "required": [ + "min", + "max" + ], "properties": { - "protocol": { - "$ref": "v1.Protocol", - "description": "Optional. The protocol (TCP or UDP) which traffic must match. If not specified, this field defaults to TCP." + "min": { + "type": "integer", + "format": "int32", + "description": "min is the start of the range, inclusive." }, - "port": { + "max": { + "type": "integer", + "format": "int32", + "description": "max is the end of the range, inclusive." + } + } + }, + "v1beta1.SELinuxStrategyOptions": { + "id": "v1beta1.SELinuxStrategyOptions", + "description": "SELinux Strategy Options defines the strategy type and any options used to create the strategy.", + "required": [ + "rule" + ], + "properties": { + "rule": { "type": "string", - "description": "If specified, the port on the given protocol. This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched." + "description": "type is the strategy that will dictate the allowable labels that may be set." + }, + "seLinuxOptions": { + "$ref": "v1.SELinuxOptions", + "description": "seLinuxOptions required to run as; required for MustRunAs More info: http://releases.k8s.io/HEAD/docs/design/security_context.md#security-context" } } }, - "v1.Protocol": { - "id": "v1.Protocol", - "properties": {} + "v1beta1.RunAsUserStrategyOptions": { + "id": "v1beta1.RunAsUserStrategyOptions", + "description": "Run A sUser Strategy Options defines the strategy type and any options used to create the strategy.", + "required": [ + "rule" + ], + "properties": { + "rule": { + "type": "string", + "description": "Rule is the strategy that will dictate the allowable RunAsUser values that may be set." + }, + "ranges": { + "type": "array", + "items": { + "$ref": "v1beta1.IDRange" + }, + "description": "Ranges are the allowed ranges of uids that may be used." + } + } }, - "v1beta1.NetworkPolicyPeer": { - "id": "v1beta1.NetworkPolicyPeer", + "v1beta1.IDRange": { + "id": "v1beta1.IDRange", + "description": "ID Range provides a min/max of an allowed range of IDs.", + "required": [ + "min", + "max" + ], "properties": { - "podSelector": { - "$ref": "unversioned.LabelSelector", - "description": "This is a label selector which selects Pods in this namespace. This field follows standard label selector semantics. If not provided, this selector selects no pods. If present but empty, this selector selects all pods in this namespace." + "min": { + "type": "integer", + "format": "int64", + "description": "Min is the start of the range, inclusive." }, - "namespaceSelector": { - "$ref": "unversioned.LabelSelector", - "description": "Selects Namespaces using cluster scoped-labels. This matches all pods in all namespaces selected by this label selector. This field follows standard label selector semantics. If omitted, this selector selects no namespaces. If present but empty, this selector selects all namespaces." + "max": { + "type": "integer", + "format": "int64", + "description": "Max is the end of the range, inclusive." + } + } + }, + "v1beta1.SupplementalGroupsStrategyOptions": { + "id": "v1beta1.SupplementalGroupsStrategyOptions", + "description": "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.", + "properties": { + "rule": { + "type": "string", + "description": "Rule is the strategy that will dictate what supplemental groups is used in the SecurityContext." + }, + "ranges": { + "type": "array", + "items": { + "$ref": "v1beta1.IDRange" + }, + "description": "Ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end." + } + } + }, + "v1beta1.FSGroupStrategyOptions": { + "id": "v1beta1.FSGroupStrategyOptions", + "description": "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.", + "properties": { + "rule": { + "type": "string", + "description": "Rule is the strategy that will dictate what FSGroup is used in the SecurityContext." + }, + "ranges": { + "type": "array", + "items": { + "$ref": "v1beta1.IDRange" + }, + "description": "Ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end." } } }, @@ -10511,7 +9706,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -10564,7 +9759,7 @@ "description": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)" }, "selector": { - "$ref": "unversioned.LabelSelector", + "$ref": "v1.LabelSelector", "description": "Selector is a label query over pods that should match the replica count. If the selector is empty, it is defaulted to the labels present on the pod template. Label keys and values that must match in order to be controlled by this replica set. More info: http://kubernetes.io/docs/user-guide/labels#label-selectors" }, "template": { @@ -10632,7 +9827,6 @@ }, "lastTransitionTime": { "type": "string", - "format": "date-time", "description": "The last time the condition transitioned from one status to another." }, "reason": { @@ -10661,7 +9855,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata." }, "items": { @@ -10712,8 +9906,8 @@ } } }, - "unversioned.APIResourceList": { - "id": "unversioned.APIResourceList", + "v1.APIResourceList": { + "id": "v1.APIResourceList", "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", "required": [ "groupVersion", @@ -10735,19 +9929,20 @@ "resources": { "type": "array", "items": { - "$ref": "unversioned.APIResource" + "$ref": "v1.APIResource" }, "description": "resources contains the name of the resources and if they are namespaced." } } }, - "unversioned.APIResource": { - "id": "unversioned.APIResource", + "v1.APIResource": { + "id": "v1.APIResource", "description": "APIResource specifies the name of a resource and whether it is namespaced.", "required": [ "name", "namespaced", - "kind" + "kind", + "verbs" ], "properties": { "name": { @@ -10761,6 +9956,20 @@ "kind": { "type": "string", "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')" + }, + "verbs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)" + }, + "shortNames": { + "type": "array", + "items": { + "type": "string" + }, + "description": "shortNames is a list of suggested short names of the resource." } } } diff --git a/k8s/.kube/schema/v1.5.3/schema095733259 b/k8s/.kube/schema/v1.6.6/schema629255130 similarity index 88% rename from k8s/.kube/schema/v1.5.3/schema095733259 rename to k8s/.kube/schema/v1.6.6/schema629255130 index 2143db573..1fb315f47 100644 --- a/k8s/.kube/schema/v1.5.3/schema095733259 +++ b/k8s/.kube/schema/v1.6.6/schema629255130 @@ -1,7 +1,7 @@ { "swaggerVersion": "1.2", "apiVersion": "v1", - "basePath": "https://10.240.255.5:443", + "basePath": "https://10.240.255.15:443", "resourcePath": "/api/v1", "info": { "title": "", @@ -107,7 +107,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -231,7 +231,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -318,7 +318,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ConfigMap", "nickname": "deletecollectionNamespacedConfigMap", @@ -359,7 +359,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -384,7 +384,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -403,7 +403,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ConfigMap", "nickname": "watchNamespacedConfigMapList", @@ -444,7 +444,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -469,7 +469,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -515,7 +515,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -622,7 +622,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -665,7 +665,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ConfigMap", "nickname": "deleteNamespacedConfigMap", @@ -698,7 +698,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -723,7 +731,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -742,7 +750,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ConfigMap", "nickname": "watchNamespacedConfigMap", @@ -783,7 +791,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -816,7 +824,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -878,7 +886,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -916,7 +924,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ConfigMap", "nickname": "watchConfigMapListForAllNamespaces", @@ -957,7 +965,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -974,7 +982,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1036,7 +1044,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1123,7 +1131,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Endpoints", "nickname": "deletecollectionNamespacedEndpoints", @@ -1164,7 +1172,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1189,7 +1197,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -1208,7 +1216,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Endpoints", "nickname": "watchNamespacedEndpointsList", @@ -1249,7 +1257,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1274,7 +1282,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1320,7 +1328,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -1427,7 +1435,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -1470,7 +1478,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete Endpoints", "nickname": "deleteNamespacedEndpoints", @@ -1503,7 +1511,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -1528,7 +1544,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -1547,7 +1563,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Endpoints", "nickname": "watchNamespacedEndpoints", @@ -1588,7 +1604,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1621,7 +1637,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1683,7 +1699,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1721,7 +1737,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Endpoints", "nickname": "watchEndpointsListForAllNamespaces", @@ -1762,7 +1778,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1779,7 +1795,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -1841,7 +1857,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1928,7 +1944,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Event", "nickname": "deletecollectionNamespacedEvent", @@ -1969,7 +1985,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -1994,7 +2010,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -2013,7 +2029,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Event", "nickname": "watchNamespacedEventList", @@ -2054,7 +2070,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2079,7 +2095,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2125,7 +2141,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -2232,7 +2248,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -2275,7 +2291,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete an Event", "nickname": "deleteNamespacedEvent", @@ -2308,7 +2324,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -2333,7 +2357,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -2352,7 +2376,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Event", "nickname": "watchNamespacedEvent", @@ -2393,7 +2417,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2426,7 +2450,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2488,7 +2512,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2526,7 +2550,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Event", "nickname": "watchEventListForAllNamespaces", @@ -2567,7 +2591,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2584,7 +2608,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2646,7 +2670,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2733,7 +2757,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of LimitRange", "nickname": "deletecollectionNamespacedLimitRange", @@ -2774,7 +2798,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2799,7 +2823,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -2818,7 +2842,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of LimitRange", "nickname": "watchNamespacedLimitRangeList", @@ -2859,7 +2883,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -2884,7 +2908,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -2930,7 +2954,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -3037,7 +3061,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -3080,7 +3104,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a LimitRange", "nickname": "deleteNamespacedLimitRange", @@ -3113,7 +3137,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -3138,7 +3170,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -3157,7 +3189,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind LimitRange", "nickname": "watchNamespacedLimitRange", @@ -3198,7 +3230,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3231,7 +3263,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3293,7 +3325,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3331,7 +3363,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of LimitRange", "nickname": "watchLimitRangeListForAllNamespaces", @@ -3372,7 +3404,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3389,7 +3421,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3451,7 +3483,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3520,77 +3552,6 @@ "consumes": [ "*/*" ] - }, - { - "type": "unversioned.Status", - "method": "DELETE", - "summary": "delete collection of Namespace", - "nickname": "deletecollectionNamespace", - "parameters": [ - { - "type": "string", - "paramType": "query", - "name": "pretty", - "description": "If 'true', then the output is pretty printed.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "labelSelector", - "description": "A selector to restrict the list of returned objects by their labels. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "fieldSelector", - "description": "A selector to restrict the list of returned objects by their fields. Defaults to everything.", - "required": false, - "allowMultiple": false - }, - { - "type": "boolean", - "paramType": "query", - "name": "watch", - "description": "Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.", - "required": false, - "allowMultiple": false - }, - { - "type": "string", - "paramType": "query", - "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", - "required": false, - "allowMultiple": false - }, - { - "type": "integer", - "paramType": "query", - "name": "timeoutSeconds", - "description": "Timeout for the list/watch call.", - "required": false, - "allowMultiple": false - } - ], - "responseMessages": [ - { - "code": 200, - "message": "OK", - "responseModel": "unversioned.Status" - } - ], - "produces": [ - "application/json", - "application/yaml", - "application/vnd.kubernetes.protobuf" - ], - "consumes": [ - "*/*" - ] } ] }, @@ -3599,7 +3560,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Namespace", "nickname": "watchNamespaceList", @@ -3640,7 +3601,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3657,7 +3618,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -3703,7 +3664,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -3794,7 +3755,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -3829,7 +3790,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Namespace", "nickname": "deleteNamespace", @@ -3862,7 +3823,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -3879,7 +3848,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -3898,7 +3867,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Namespace", "nickname": "watchNamespace", @@ -3939,7 +3908,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -3964,7 +3933,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -4138,7 +4107,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -4220,7 +4189,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -4291,7 +4260,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Node", "nickname": "deletecollectionNode", @@ -4332,7 +4301,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -4349,7 +4318,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -4368,7 +4337,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Node", "nickname": "watchNodeList", @@ -4409,7 +4378,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -4426,7 +4395,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -4472,7 +4441,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -4563,7 +4532,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -4598,7 +4567,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Node", "nickname": "deleteNode", @@ -4631,7 +4600,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -4648,7 +4625,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -4667,7 +4644,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Node", "nickname": "watchNode", @@ -4708,7 +4685,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -4733,7 +4710,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -4843,6 +4820,36 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Node", + "nickname": "proxyPATCHNodeWithPath", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Node", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "path", + "description": "path to the resource", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -5005,6 +5012,28 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Node", + "nickname": "proxyPATCHNode", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Node", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -5598,7 +5627,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -5680,7 +5709,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5767,7 +5796,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of PersistentVolumeClaim", "nickname": "deletecollectionNamespacedPersistentVolumeClaim", @@ -5808,7 +5837,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5833,7 +5862,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -5852,7 +5881,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of PersistentVolumeClaim", "nickname": "watchNamespacedPersistentVolumeClaimList", @@ -5893,7 +5922,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -5918,7 +5947,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -5964,7 +5993,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -6071,7 +6100,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -6114,7 +6143,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a PersistentVolumeClaim", "nickname": "deleteNamespacedPersistentVolumeClaim", @@ -6147,7 +6176,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -6172,7 +6209,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -6191,7 +6228,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind PersistentVolumeClaim", "nickname": "watchNamespacedPersistentVolumeClaim", @@ -6232,7 +6269,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6265,7 +6302,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6327,7 +6364,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6365,7 +6402,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of PersistentVolumeClaim", "nickname": "watchPersistentVolumeClaimListForAllNamespaces", @@ -6406,7 +6443,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6423,7 +6460,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6560,7 +6597,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -6650,7 +6687,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6721,7 +6758,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of PersistentVolume", "nickname": "deletecollectionPersistentVolume", @@ -6762,7 +6799,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6779,7 +6816,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -6798,7 +6835,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of PersistentVolume", "nickname": "watchPersistentVolumeList", @@ -6839,7 +6876,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -6856,7 +6893,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -6902,7 +6939,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -6993,7 +7030,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7028,7 +7065,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a PersistentVolume", "nickname": "deletePersistentVolume", @@ -7061,7 +7098,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -7078,7 +7123,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -7097,7 +7142,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind PersistentVolume", "nickname": "watchPersistentVolume", @@ -7138,7 +7183,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7163,7 +7208,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -7284,7 +7329,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7366,7 +7411,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7453,7 +7498,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Pod", "nickname": "deletecollectionNamespacedPod", @@ -7494,7 +7539,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7519,7 +7564,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -7538,7 +7583,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Pod", "nickname": "watchNamespacedPodList", @@ -7579,7 +7624,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7604,7 +7649,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -7650,7 +7695,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -7757,7 +7802,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -7800,7 +7845,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Pod", "nickname": "deleteNamespacedPod", @@ -7833,7 +7878,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -7858,7 +7911,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -7877,7 +7930,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Pod", "nickname": "watchNamespacedPod", @@ -7918,7 +7971,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -7951,7 +8004,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -8085,6 +8138,44 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Pod", + "nickname": "proxyPATCHNamespacedPodWithPath", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Pod", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "path", + "description": "path to the resource", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -8295,6 +8386,36 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Pod", + "nickname": "proxyPATCHNamespacedPod", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Pod", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -8433,7 +8554,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -8471,7 +8592,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Pod", "nickname": "watchPodListForAllNamespaces", @@ -8512,7 +8633,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -8529,7 +8650,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -9025,14 +9146,6 @@ "required": false, "allowMultiple": false }, - { - "type": "string", - "paramType": "query", - "name": "sinceTime", - "description": "An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", - "required": false, - "allowMultiple": false - }, { "type": "boolean", "paramType": "query", @@ -9103,6 +9216,14 @@ "summary": "connect GET requests to portforward of Pod", "nickname": "connectGetNamespacedPodPortforward", "parameters": [ + { + "type": "integer", + "paramType": "query", + "name": "ports", + "description": "List of ports to forward Required when using WebSockets", + "required": false, + "allowMultiple": false + }, { "type": "string", "paramType": "path", @@ -9133,6 +9254,14 @@ "summary": "connect POST requests to portforward of Pod", "nickname": "connectPostNamespacedPodPortforward", "parameters": [ + { + "type": "integer", + "paramType": "query", + "name": "ports", + "description": "List of ports to forward Required when using WebSockets", + "required": false, + "allowMultiple": false + }, { "type": "string", "paramType": "path", @@ -9796,7 +9925,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -9886,7 +10015,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -9973,7 +10102,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of PodTemplate", "nickname": "deletecollectionNamespacedPodTemplate", @@ -10014,7 +10143,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10039,7 +10168,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -10058,7 +10187,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of PodTemplate", "nickname": "watchNamespacedPodTemplateList", @@ -10099,7 +10228,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10124,7 +10253,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -10170,7 +10299,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -10277,7 +10406,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -10320,7 +10449,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a PodTemplate", "nickname": "deleteNamespacedPodTemplate", @@ -10353,7 +10482,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -10378,7 +10515,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -10397,7 +10534,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind PodTemplate", "nickname": "watchNamespacedPodTemplate", @@ -10438,7 +10575,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10471,7 +10608,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -10533,7 +10670,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10571,7 +10708,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of PodTemplate", "nickname": "watchPodTemplateListForAllNamespaces", @@ -10612,7 +10749,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10629,7 +10766,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -10691,7 +10828,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10778,7 +10915,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ReplicationController", "nickname": "deletecollectionNamespacedReplicationController", @@ -10819,7 +10956,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10844,7 +10981,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -10863,7 +11000,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ReplicationController", "nickname": "watchNamespacedReplicationControllerList", @@ -10904,7 +11041,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -10929,7 +11066,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -10975,7 +11112,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -11082,7 +11219,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -11125,7 +11262,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ReplicationController", "nickname": "deleteNamespacedReplicationController", @@ -11158,7 +11295,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -11183,7 +11328,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -11202,7 +11347,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ReplicationController", "nickname": "watchNamespacedReplicationController", @@ -11243,7 +11388,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -11276,7 +11421,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -11338,7 +11483,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -11376,7 +11521,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ReplicationController", "nickname": "watchReplicationControllerListForAllNamespaces", @@ -11417,7 +11562,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -11434,7 +11579,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -11571,7 +11716,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -11736,7 +11881,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -11826,7 +11971,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -11913,7 +12058,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ResourceQuota", "nickname": "deletecollectionNamespacedResourceQuota", @@ -11954,7 +12099,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -11979,7 +12124,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -11998,7 +12143,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ResourceQuota", "nickname": "watchNamespacedResourceQuotaList", @@ -12039,7 +12184,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12064,7 +12209,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -12110,7 +12255,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -12217,7 +12362,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -12260,7 +12405,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ResourceQuota", "nickname": "deleteNamespacedResourceQuota", @@ -12293,7 +12438,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -12318,7 +12471,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -12337,7 +12490,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ResourceQuota", "nickname": "watchNamespacedResourceQuota", @@ -12378,7 +12531,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12411,7 +12564,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -12473,7 +12626,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12511,7 +12664,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ResourceQuota", "nickname": "watchResourceQuotaListForAllNamespaces", @@ -12552,7 +12705,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12569,7 +12722,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -12706,7 +12859,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -12796,7 +12949,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12883,7 +13036,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of Secret", "nickname": "deletecollectionNamespacedSecret", @@ -12924,7 +13077,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -12949,7 +13102,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -12968,7 +13121,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Secret", "nickname": "watchNamespacedSecretList", @@ -13009,7 +13162,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13034,7 +13187,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -13080,7 +13233,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -13187,7 +13340,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -13230,7 +13383,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Secret", "nickname": "deleteNamespacedSecret", @@ -13263,7 +13416,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -13288,7 +13449,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -13307,7 +13468,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Secret", "nickname": "watchNamespacedSecret", @@ -13348,7 +13509,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13381,7 +13542,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -13443,7 +13604,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13481,7 +13642,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Secret", "nickname": "watchSecretListForAllNamespaces", @@ -13522,7 +13683,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13539,7 +13700,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -13601,7 +13762,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13688,7 +13849,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete collection of ServiceAccount", "nickname": "deletecollectionNamespacedServiceAccount", @@ -13729,7 +13890,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13754,7 +13915,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -13773,7 +13934,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ServiceAccount", "nickname": "watchNamespacedServiceAccountList", @@ -13814,7 +13975,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -13839,7 +14000,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -13885,7 +14046,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -13992,7 +14153,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -14035,7 +14196,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a ServiceAccount", "nickname": "deleteNamespacedServiceAccount", @@ -14068,7 +14229,15 @@ "type": "boolean", "paramType": "query", "name": "orphanDependents", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list.", + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both.", + "required": false, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "query", + "name": "propagationPolicy", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy.", "required": false, "allowMultiple": false }, @@ -14093,7 +14262,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -14112,7 +14281,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind ServiceAccount", "nickname": "watchNamespacedServiceAccount", @@ -14153,7 +14322,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14186,7 +14355,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -14248,7 +14417,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14286,7 +14455,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of ServiceAccount", "nickname": "watchServiceAccountListForAllNamespaces", @@ -14327,7 +14496,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14344,7 +14513,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -14406,7 +14575,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14499,7 +14668,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Service", "nickname": "watchNamespacedServiceList", @@ -14540,7 +14709,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14565,7 +14734,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -14611,7 +14780,7 @@ "type": "boolean", "paramType": "query", "name": "exact", - "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'", + "description": "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'.", "required": false, "allowMultiple": false }, @@ -14718,7 +14887,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -14761,7 +14930,7 @@ ] }, { - "type": "unversioned.Status", + "type": "v1.Status", "method": "DELETE", "summary": "delete a Service", "nickname": "deleteNamespacedService", @@ -14795,7 +14964,7 @@ { "code": 200, "message": "OK", - "responseModel": "unversioned.Status" + "responseModel": "v1.Status" } ], "produces": [ @@ -14814,7 +14983,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch changes to an object of kind Service", "nickname": "watchNamespacedService", @@ -14855,7 +15024,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -14888,7 +15057,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -15022,6 +15191,44 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Service", + "nickname": "proxyPATCHNamespacedServiceWithPath", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Service", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "path", + "description": "path to the resource", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -15232,6 +15439,36 @@ "*/*" ] }, + { + "type": "string", + "method": "PATCH", + "summary": "proxy PATCH requests to Service", + "nickname": "proxyPATCHNamespacedService", + "parameters": [ + { + "type": "string", + "paramType": "path", + "name": "namespace", + "description": "object name and auth scope, such as for teams and projects", + "required": true, + "allowMultiple": false + }, + { + "type": "string", + "paramType": "path", + "name": "name", + "description": "name of the Service", + "required": true, + "allowMultiple": false + } + ], + "produces": [ + "*/*" + ], + "consumes": [ + "*/*" + ] + }, { "type": "string", "method": "DELETE", @@ -15370,7 +15607,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -15408,7 +15645,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "versioned.Event", + "type": "v1.WatchEvent", "method": "GET", "summary": "watch individual changes to a list of Service", "nickname": "watchServiceListForAllNamespaces", @@ -15449,7 +15686,7 @@ "type": "string", "paramType": "query", "name": "resourceVersion", - "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history.", + "description": "When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. When specified for list: - if unset, then the result is returned from remote storage based on quorum-read flag; - if it's 0, then we simply return what we currently have in cache, no guarantee; - if set to non zero, then the result is at least as fresh as given rv.", "required": false, "allowMultiple": false }, @@ -15466,7 +15703,7 @@ { "code": 200, "message": "OK", - "responseModel": "versioned.Event" + "responseModel": "v1.WatchEvent" } ], "produces": [ @@ -16119,7 +16356,7 @@ "allowMultiple": false }, { - "type": "unversioned.Patch", + "type": "v1.Patch", "paramType": "body", "name": "body", "description": "", @@ -16168,7 +16405,7 @@ "description": "API at /api/v1", "operations": [ { - "type": "unversioned.APIResourceList", + "type": "v1.APIResourceList", "method": "GET", "summary": "get available resources", "nickname": "getAPIResources", @@ -16248,12 +16485,10 @@ }, "creationTimestamp": { "type": "string", - "format": "date-time", "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "deletionTimestamp": { "type": "string", - "format": "date-time", "description": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field. Once set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "deletionGracePeriodSeconds": { @@ -16318,6 +16553,10 @@ "controller": { "type": "boolean", "description": "If true, this reference points to the managing controller." + }, + "blockOwnerDeletion": { + "type": "boolean", + "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned." } } }, @@ -16371,7 +16610,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -16383,8 +16622,8 @@ } } }, - "unversioned.ListMeta": { - "id": "unversioned.ListMeta", + "v1.ListMeta": { + "id": "v1.ListMeta", "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", "properties": { "selfLink": { @@ -16464,7 +16703,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata" }, "items": { @@ -16498,8 +16737,8 @@ } } }, - "unversioned.Status": { - "id": "unversioned.Status", + "v1.Status": { + "id": "v1.Status", "description": "Status is a return value for calls that don't return other objects.", "properties": { "kind": { @@ -16511,7 +16750,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "status": { @@ -16527,7 +16766,7 @@ "description": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it." }, "details": { - "$ref": "unversioned.StatusDetails", + "$ref": "v1.StatusDetails", "description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." }, "code": { @@ -16537,8 +16776,8 @@ } } }, - "unversioned.StatusDetails": { - "id": "unversioned.StatusDetails", + "v1.StatusDetails": { + "id": "v1.StatusDetails", "description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", "properties": { "name": { @@ -16556,7 +16795,7 @@ "causes": { "type": "array", "items": { - "$ref": "unversioned.StatusCause" + "$ref": "v1.StatusCause" }, "description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes." }, @@ -16567,8 +16806,8 @@ } } }, - "unversioned.StatusCause": { - "id": "unversioned.StatusCause", + "v1.StatusCause": { + "id": "v1.StatusCause", "description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", "properties": { "reason": { @@ -16585,8 +16824,8 @@ } } }, - "versioned.Event": { - "id": "versioned.Event", + "v1.WatchEvent": { + "id": "v1.WatchEvent", "required": [ "type", "object" @@ -16600,14 +16839,14 @@ } } }, - "unversioned.Patch": { - "id": "unversioned.Patch", + "v1.Patch": { + "id": "v1.Patch", "description": "Patch is provided to give a concrete name and type to the Kubernetes PATCH request body.", "properties": {} }, "v1.DeleteOptions": { "id": "v1.DeleteOptions", - "description": "DeleteOptions may be provided when deleting an API object", + "description": "DeleteOptions may be provided when deleting an API object.", "properties": { "kind": { "type": "string", @@ -16628,7 +16867,11 @@ }, "orphanDependents": { "type": "boolean", - "description": "Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list." + "description": "Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both." + }, + "propagationPolicy": { + "$ref": "v1.DeletionPropagation", + "description": "Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy." } } }, @@ -16646,6 +16889,10 @@ "id": "types.UID", "properties": {} }, + "v1.DeletionPropagation": { + "id": "v1.DeletionPropagation", + "properties": {} + }, "v1.EndpointsList": { "id": "v1.EndpointsList", "description": "EndpointsList is a list of endpoints.", @@ -16662,7 +16909,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -16792,7 +17039,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -16842,12 +17089,10 @@ }, "firstTimestamp": { "type": "string", - "format": "date-time", "description": "The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)" }, "lastTimestamp": { "type": "string", - "format": "date-time", "description": "The time at which the most recent occurrence of this event was recorded." }, "count": { @@ -16891,7 +17136,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -16987,7 +17232,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -17068,7 +17313,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -17124,7 +17369,40 @@ }, "unschedulable": { "type": "boolean", - "description": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration\"" + "description": "Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: http://releases.k8s.io/HEAD/docs/admin/node.md#manual-node-administration" + }, + "taints": { + "type": "array", + "items": { + "$ref": "v1.Taint" + }, + "description": "If specified, the node's taints." + } + } + }, + "v1.Taint": { + "id": "v1.Taint", + "description": "The node this Taint is attached to has the effect \"effect\" on any pod that that does not tolerate the Taint.", + "required": [ + "key", + "effect" + ], + "properties": { + "key": { + "type": "string", + "description": "Required. The taint key to be applied to a node." + }, + "value": { + "type": "string", + "description": "Required. The taint value corresponding to the taint key." + }, + "effect": { + "type": "string", + "description": "Required. The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute." + }, + "timeAdded": { + "type": "string", + "description": "TimeAdded represents the time at which the taint was added. It is only written for NoExecute taints." } } }, @@ -17207,12 +17485,10 @@ }, "lastHeartbeatTime": { "type": "string", - "format": "date-time", "description": "Last time we got an update on a given condition." }, "lastTransitionTime": { "type": "string", - "format": "date-time", "description": "Last time the condition transit from one status to another." }, "reason": { @@ -17384,7 +17660,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -17434,7 +17710,7 @@ "description": "AccessModes contains the desired access modes the volume should have. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#access-modes-1" }, "selector": { - "$ref": "unversioned.LabelSelector", + "$ref": "v1.LabelSelector", "description": "A label query over volumes to consider for binding." }, "resources": { @@ -17444,6 +17720,10 @@ "volumeName": { "type": "string", "description": "VolumeName is the binding reference to the PersistentVolume backing this claim." + }, + "storageClassName": { + "type": "string", + "description": "Name of the StorageClass required by the claim. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#class-1" } } }, @@ -17451,8 +17731,8 @@ "id": "v1.PersistentVolumeAccessMode", "properties": {} }, - "unversioned.LabelSelector": { - "id": "unversioned.LabelSelector", + "v1.LabelSelector": { + "id": "v1.LabelSelector", "description": "A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.", "properties": { "matchLabels": { @@ -17462,14 +17742,14 @@ "matchExpressions": { "type": "array", "items": { - "$ref": "unversioned.LabelSelectorRequirement" + "$ref": "v1.LabelSelectorRequirement" }, "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed." } } }, - "unversioned.LabelSelectorRequirement": { - "id": "unversioned.LabelSelectorRequirement", + "v1.LabelSelectorRequirement": { + "id": "v1.LabelSelectorRequirement", "description": "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", "required": [ "key", @@ -17544,7 +17824,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -17658,6 +17938,14 @@ "$ref": "v1.PhotonPersistentDiskVolumeSource", "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine" }, + "portworxVolume": { + "$ref": "v1.PortworxVolumeSource", + "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine" + }, + "scaleIO": { + "$ref": "v1.ScaleIOVolumeSource", + "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes." + }, "accessModes": { "type": "array", "items": { @@ -17672,6 +17960,10 @@ "persistentVolumeReclaimPolicy": { "type": "string", "description": "What happens to a persistent volume when released from its claim. Valid options are Retain (default) and Recycle. Recycling must be supported by the volume plugin underlying this persistent volume. More info: http://kubernetes.io/docs/user-guide/persistent-volumes#recycling-policy" + }, + "storageClassName": { + "type": "string", + "description": "Name of StorageClass to which this persistent volume belongs. Empty value means that this volume does not belong to any StorageClass." } } }, @@ -17872,6 +18164,13 @@ "readOnly": { "type": "boolean", "description": "ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false." + }, + "portals": { + "type": "array", + "items": { + "type": "string" + }, + "description": "iSCSI target portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260)." } } }, @@ -18125,6 +18424,78 @@ } } }, + "v1.PortworxVolumeSource": { + "id": "v1.PortworxVolumeSource", + "description": "PortworxVolumeSource represents a Portworx volume resource.", + "required": [ + "volumeID" + ], + "properties": { + "volumeID": { + "type": "string", + "description": "VolumeID uniquely identifies a Portworx volume" + }, + "fsType": { + "type": "string", + "description": "FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified." + }, + "readOnly": { + "type": "boolean", + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts." + } + } + }, + "v1.ScaleIOVolumeSource": { + "id": "v1.ScaleIOVolumeSource", + "description": "ScaleIOVolumeSource represents a persistent ScaleIO volume", + "required": [ + "gateway", + "system", + "secretRef" + ], + "properties": { + "gateway": { + "type": "string", + "description": "The host address of the ScaleIO API Gateway." + }, + "system": { + "type": "string", + "description": "The name of the storage system as configured in ScaleIO." + }, + "secretRef": { + "$ref": "v1.LocalObjectReference", + "description": "SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail." + }, + "sslEnabled": { + "type": "boolean", + "description": "Flag to enable/disable SSL communication with Gateway, default false" + }, + "protectionDomain": { + "type": "string", + "description": "The name of the Protection Domain for the configured storage (defaults to \"default\")." + }, + "storagePool": { + "type": "string", + "description": "The Storage Pool associated with the protection domain (defaults to \"default\")." + }, + "storageMode": { + "type": "string", + "description": "Indicates whether the storage for a volume should be thick or thin (defaults to \"thin\")." + }, + "volumeName": { + "type": "string", + "description": "The name of a volume already created in the ScaleIO system that is associated with this volume source." + }, + "fsType": { + "type": "string", + "description": "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified." + }, + "readOnly": { + "type": "boolean", + "description": "Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts." + } + } + }, "v1.PersistentVolumeStatus": { "id": "v1.PersistentVolumeStatus", "description": "PersistentVolumeStatus is the current status of a persistent volume.", @@ -18159,7 +18530,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -18211,6 +18582,13 @@ }, "description": "List of volumes that can be mounted by containers belonging to the pod. More info: http://kubernetes.io/docs/user-guide/volumes" }, + "initContainers": { + "type": "array", + "items": { + "$ref": "v1.Container" + }, + "description": "List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/containers" + }, "containers": { "type": "array", "items": { @@ -18234,7 +18612,7 @@ }, "dnsPolicy": { "type": "string", - "description": "Set DNS policy for containers within the pod. One of 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\"." + "description": "Set DNS policy for containers within the pod. One of 'ClusterFirstWithHostNet', 'ClusterFirst' or 'Default'. Defaults to \"ClusterFirst\". To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'." }, "nodeSelector": { "type": "object", @@ -18248,6 +18626,10 @@ "type": "string", "description": "DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead." }, + "automountServiceAccountToken": { + "type": "boolean", + "description": "AutomountServiceAccountToken indicates whether a service account token should be automatically mounted." + }, "nodeName": { "type": "string", "description": "NodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements." @@ -18282,6 +18664,21 @@ "subdomain": { "type": "string", "description": "If specified, the fully qualified Pod hostname will be \"\u003chostname\u003e.\u003csubdomain\u003e.\u003cpod namespace\u003e.svc.\u003ccluster domain\u003e\". If not specified, the pod will not have a domainname at all." + }, + "affinity": { + "$ref": "v1.Affinity", + "description": "If specified, the pod's scheduling constraints" + }, + "schedulerName": { + "type": "string", + "description": "If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler." + }, + "tolerations": { + "type": "array", + "items": { + "$ref": "v1.Toleration" + }, + "description": "If specified, the pod's tolerations." } } }, @@ -18387,6 +18784,18 @@ "photonPersistentDisk": { "$ref": "v1.PhotonPersistentDiskVolumeSource", "description": "PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine" + }, + "projected": { + "$ref": "v1.ProjectedVolumeSource", + "description": "Items for all in one resources secrets, configmaps, and downward API" + }, + "portworxVolume": { + "$ref": "v1.PortworxVolumeSource", + "description": "PortworxVolume represents a portworx volume attached and mounted on kubelets host machine" + }, + "scaleIO": { + "$ref": "v1.ScaleIOVolumeSource", + "description": "ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes." } } }, @@ -18434,12 +18843,16 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's keys must be defined" } } }, @@ -18578,12 +18991,110 @@ "items": { "$ref": "v1.KeyToPath" }, - "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error. Paths must be relative and may not contain the '..' path or start with '..'." + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." }, "defaultMode": { "type": "integer", "format": "int32", "description": "Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's keys must be defined" + } + } + }, + "v1.ProjectedVolumeSource": { + "id": "v1.ProjectedVolumeSource", + "description": "Represents a projected volume source", + "required": [ + "sources" + ], + "properties": { + "sources": { + "type": "array", + "items": { + "$ref": "v1.VolumeProjection" + }, + "description": "list of volume projections" + }, + "defaultMode": { + "type": "integer", + "format": "int32", + "description": "Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set." + } + } + }, + "v1.VolumeProjection": { + "id": "v1.VolumeProjection", + "description": "Projection that may be projected along with other supported volume types", + "properties": { + "secret": { + "$ref": "v1.SecretProjection", + "description": "information about the secret data to project" + }, + "downwardAPI": { + "$ref": "v1.DownwardAPIProjection", + "description": "information about the downwardAPI data to project" + }, + "configMap": { + "$ref": "v1.ConfigMapProjection", + "description": "information about the configMap data to project" + } + } + }, + "v1.SecretProjection": { + "id": "v1.SecretProjection", + "description": "Adapts a secret into a projected volume.\n\nThe contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "items": { + "type": "array", + "items": { + "$ref": "v1.KeyToPath" + }, + "description": "If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or its key must be defined" + } + } + }, + "v1.DownwardAPIProjection": { + "id": "v1.DownwardAPIProjection", + "description": "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "v1.DownwardAPIVolumeFile" + }, + "description": "Items is a list of DownwardAPIVolume file" + } + } + }, + "v1.ConfigMapProjection": { + "id": "v1.ConfigMapProjection", + "description": "Adapts a ConfigMap into a projected volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "items": { + "type": "array", + "items": { + "$ref": "v1.KeyToPath" + }, + "description": "If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's keys must be defined" } } }, @@ -18627,6 +19138,13 @@ }, "description": "List of ports to expose from the container. Exposing a port here gives the system additional information about the network connections a container uses, but is primarily informational. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Cannot be updated." }, + "envFrom": { + "type": "array", + "items": { + "$ref": "v1.EnvFromSource" + }, + "description": "List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated." + }, "env": { "type": "array", "items": { @@ -18659,7 +19177,11 @@ }, "terminationMessagePath": { "type": "string", - "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Defaults to /dev/termination-log. Cannot be updated." + "description": "Optional: Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated." + }, + "terminationMessagePolicy": { + "type": "string", + "description": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated." }, "imagePullPolicy": { "type": "string", @@ -18714,6 +19236,52 @@ } } }, + "v1.EnvFromSource": { + "id": "v1.EnvFromSource", + "description": "EnvFromSource represents the source of a set of ConfigMaps", + "properties": { + "prefix": { + "type": "string", + "description": "An optional identifer to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER." + }, + "configMapRef": { + "$ref": "v1.ConfigMapEnvSource", + "description": "The ConfigMap to select from" + }, + "secretRef": { + "$ref": "v1.SecretEnvSource", + "description": "The Secret to select from" + } + } + }, + "v1.ConfigMapEnvSource": { + "id": "v1.ConfigMapEnvSource", + "description": "ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.\n\nThe contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap must be defined" + } + } + }, + "v1.SecretEnvSource": { + "id": "v1.SecretEnvSource", + "description": "SecretEnvSource selects a Secret to populate the environment variables with.\n\nThe contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + "properties": { + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret must be defined" + } + } + }, "v1.EnvVar": { "id": "v1.EnvVar", "description": "EnvVar represents an environment variable present in a Container.", @@ -18771,6 +19339,10 @@ "key": { "type": "string", "description": "The key to select." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the ConfigMap or it's key must be defined" } } }, @@ -18788,6 +19360,10 @@ "key": { "type": "string", "description": "The key of the secret to select from. Must be a valid secret key." + }, + "optional": { + "type": "boolean", + "description": "Specify whether the Secret or it's key must be defined" } } }, @@ -19076,6 +19652,224 @@ } } }, + "v1.Affinity": { + "id": "v1.Affinity", + "description": "Affinity is a group of affinity scheduling rules.", + "properties": { + "nodeAffinity": { + "$ref": "v1.NodeAffinity", + "description": "Describes node affinity scheduling rules for the pod." + }, + "podAffinity": { + "$ref": "v1.PodAffinity", + "description": "Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s))." + }, + "podAntiAffinity": { + "$ref": "v1.PodAntiAffinity", + "description": "Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s))." + } + } + }, + "v1.NodeAffinity": { + "id": "v1.NodeAffinity", + "description": "Node affinity is a group of node affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "$ref": "v1.NodeSelector", + "description": "If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PreferredSchedulingTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.NodeSelector": { + "id": "v1.NodeSelector", + "description": "A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.", + "required": [ + "nodeSelectorTerms" + ], + "properties": { + "nodeSelectorTerms": { + "type": "array", + "items": { + "$ref": "v1.NodeSelectorTerm" + }, + "description": "Required. A list of node selector terms. The terms are ORed." + } + } + }, + "v1.NodeSelectorTerm": { + "id": "v1.NodeSelectorTerm", + "description": "A null or empty node selector term matches no objects.", + "required": [ + "matchExpressions" + ], + "properties": { + "matchExpressions": { + "type": "array", + "items": { + "$ref": "v1.NodeSelectorRequirement" + }, + "description": "Required. A list of node selector requirements. The requirements are ANDed." + } + } + }, + "v1.NodeSelectorRequirement": { + "id": "v1.NodeSelectorRequirement", + "description": "A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.", + "required": [ + "key", + "operator" + ], + "properties": { + "key": { + "type": "string", + "description": "The label key that the selector applies to." + }, + "operator": { + "type": "string", + "description": "Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt." + }, + "values": { + "type": "array", + "items": { + "type": "string" + }, + "description": "An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch." + } + } + }, + "v1.PreferredSchedulingTerm": { + "id": "v1.PreferredSchedulingTerm", + "description": "An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).", + "required": [ + "weight", + "preference" + ], + "properties": { + "weight": { + "type": "integer", + "format": "int32", + "description": "Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100." + }, + "preference": { + "$ref": "v1.NodeSelectorTerm", + "description": "A node selector term, associated with the corresponding weight." + } + } + }, + "v1.PodAffinity": { + "id": "v1.PodAffinity", + "description": "Pod affinity is a group of inter pod affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PodAffinityTerm" + }, + "description": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.WeightedPodAffinityTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.PodAffinityTerm": { + "id": "v1.PodAffinityTerm", + "description": "Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key \u003ctopologyKey\u003e tches that of any node on which a pod of the set of pods is running", + "properties": { + "labelSelector": { + "$ref": "v1.LabelSelector", + "description": "A label query over a set of resources, in this case pods." + }, + "namespaces": { + "type": "array", + "items": { + "type": "string" + }, + "description": "namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"" + }, + "topologyKey": { + "type": "string", + "description": "This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. For PreferredDuringScheduling pod anti-affinity, empty topologyKey is interpreted as \"all topologies\" (\"all topologies\" here means all the topologyKeys indicated by scheduler command-line argument --failure-domains); for affinity and for RequiredDuringScheduling pod anti-affinity, empty topologyKey is not allowed." + } + } + }, + "v1.WeightedPodAffinityTerm": { + "id": "v1.WeightedPodAffinityTerm", + "description": "The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)", + "required": [ + "weight", + "podAffinityTerm" + ], + "properties": { + "weight": { + "type": "integer", + "format": "int32", + "description": "weight associated with matching the corresponding podAffinityTerm, in the range 1-100." + }, + "podAffinityTerm": { + "$ref": "v1.PodAffinityTerm", + "description": "Required. A pod affinity term, associated with the corresponding weight." + } + } + }, + "v1.PodAntiAffinity": { + "id": "v1.PodAntiAffinity", + "description": "Pod anti affinity is a group of inter pod anti affinity scheduling rules.", + "properties": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.PodAffinityTerm" + }, + "description": "NOT YET IMPLEMENTED. TODO: Uncomment field once it is implemented. If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system will try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. RequiredDuringSchedulingRequiredDuringExecution []PodAffinityTerm `json:\"requiredDuringSchedulingRequiredDuringExecution,omitempty\"` If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied." + }, + "preferredDuringSchedulingIgnoredDuringExecution": { + "type": "array", + "items": { + "$ref": "v1.WeightedPodAffinityTerm" + }, + "description": "The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred." + } + } + }, + "v1.Toleration": { + "id": "v1.Toleration", + "description": "The pod this Toleration is attached to tolerates any taint that matches the triple \u003ckey,value,effect\u003e using the matching operator \u003coperator\u003e.", + "properties": { + "key": { + "type": "string", + "description": "Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys." + }, + "operator": { + "type": "string", + "description": "Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category." + }, + "value": { + "type": "string", + "description": "Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string." + }, + "effect": { + "type": "string", + "description": "Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute." + }, + "tolerationSeconds": { + "type": "integer", + "format": "int64", + "description": "TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system." + } + } + }, "v1.PodStatus": { "id": "v1.PodStatus", "description": "PodStatus represents information about the status of a pod. Status may trail the actual state of a system.", @@ -19109,15 +19903,25 @@ }, "startTime": { "type": "string", - "format": "date-time", "description": "RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod." }, + "initContainerStatuses": { + "type": "array", + "items": { + "$ref": "v1.ContainerStatus" + }, + "description": "The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: http://kubernetes.io/docs/user-guide/pod-states#container-statuses" + }, "containerStatuses": { "type": "array", "items": { "$ref": "v1.ContainerStatus" }, "description": "The list has one entry per container in the manifest. Each entry is currently the output of `docker inspect`. More info: http://kubernetes.io/docs/user-guide/pod-states#container-statuses" + }, + "qosClass": { + "type": "string", + "description": "The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://github.com/kubernetes/kubernetes/blob/master/docs/design/resource-qos.md" } } }, @@ -19139,12 +19943,10 @@ }, "lastProbeTime": { "type": "string", - "format": "date-time", "description": "Last time we probed the condition." }, "lastTransitionTime": { "type": "string", - "format": "date-time", "description": "Last time the condition transitioned from one status to another." }, "reason": { @@ -19241,7 +20043,6 @@ "properties": { "startedAt": { "type": "string", - "format": "date-time", "description": "Time at which the container was last (re-)started" } } @@ -19273,12 +20074,10 @@ }, "startedAt": { "type": "string", - "format": "date-time", "description": "Time at which previous execution of the container started" }, "finishedAt": { "type": "string", - "format": "date-time", "description": "Time at which the container last terminated" }, "containerID": { @@ -19325,7 +20124,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19389,7 +20188,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19510,7 +20309,6 @@ }, "lastTransitionTime": { "type": "string", - "format": "date-time", "description": "The last time the condition transitioned from one status to another." }, "reason": { @@ -19594,7 +20392,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19683,7 +20481,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19741,7 +20539,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19782,6 +20580,10 @@ "$ref": "v1.LocalObjectReference" }, "description": "ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: http://kubernetes.io/docs/user-guide/secrets#manually-specifying-an-imagepullsecret" + }, + "automountServiceAccountToken": { + "type": "boolean", + "description": "AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. Can be overridden at the pod level." } } }, @@ -19801,7 +20603,7 @@ "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources" }, "metadata": { - "$ref": "unversioned.ListMeta", + "$ref": "v1.ListMeta", "description": "Standard list metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds" }, "items": { @@ -19842,9 +20644,6 @@ "v1.ServiceSpec": { "id": "v1.ServiceSpec", "description": "ServiceSpec describes the attributes that a user creates on a service.", - "required": [ - "ports" - ], "properties": { "ports": { "type": "array", @@ -19968,8 +20767,8 @@ } } }, - "unversioned.APIResourceList": { - "id": "unversioned.APIResourceList", + "v1.APIResourceList": { + "id": "v1.APIResourceList", "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", "required": [ "groupVersion", @@ -19991,19 +20790,20 @@ "resources": { "type": "array", "items": { - "$ref": "unversioned.APIResource" + "$ref": "v1.APIResource" }, "description": "resources contains the name of the resources and if they are namespaced." } } }, - "unversioned.APIResource": { - "id": "unversioned.APIResource", + "v1.APIResource": { + "id": "v1.APIResource", "description": "APIResource specifies the name of a resource and whether it is namespaced.", "required": [ "name", "namespaced", - "kind" + "kind", + "verbs" ], "properties": { "name": { @@ -20017,6 +20817,20 @@ "kind": { "type": "string", "description": "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')" + }, + "verbs": { + "type": "array", + "items": { + "type": "string" + }, + "description": "verbs is a list of supported kube verbs (this includes get, list, watch, create, update, patch, delete, deletecollection, and proxy)" + }, + "shortNames": { + "type": "array", + "items": { + "type": "string" + }, + "description": "shortNames is a list of suggested short names of the resource." } } } diff --git a/k8s/README.k8s.md b/k8s/README.k8s.md index 2192959d5..ebbca0c33 100644 --- a/k8s/README.k8s.md +++ b/k8s/README.k8s.md @@ -6,8 +6,10 @@ The k8s directory contains Kubernetes configuration for the eShopOnContainers ap * A private Docker registry. Follow Azure Container Registry's [guide](https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-portal) to create one. * Optionally, previous steps can be skipped if you run gen-k8s-env.ps1 script to automatically create the azure environment needed for kubernetes deployment. Azure cli 2.0 must be previously installed [installation guide](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli). For example: + **Important**: Note the parameter "-createAcr true". If you are creating the K8s cluster but you want to re-use and existing ACR, say "-createAcr false". + >``` ->./gen-k8s-env -resourceGroupName k8sGroup -location westeurope -registryName k8sregistry -orchestratorName k8s-cluster -dnsName k8s-dns +>./gen-k8s-env -resourceGroupName k8sGroup -location westeurope -registryName k8sregistry -createAcr true -orchestratorName k8s-cluster -dnsName k8s-dns >``` * A Docker development environment with `docker` and `docker-compose`. diff --git a/k8s/basket-data.yaml b/k8s/basket-data.yaml index b4f84f188..b48e73fed 100644 --- a/k8s/basket-data.yaml +++ b/k8s/basket-data.yaml @@ -25,5 +25,5 @@ spec: spec: containers: - name: basket-data - image: redis:3.2-alpine + image: redis diff --git a/k8s/conf_cloud.yml b/k8s/conf_cloud.yml index ac8fd56fc..0f079fd3f 100644 --- a/k8s/conf_cloud.yml +++ b/k8s/conf_cloud.yml @@ -25,12 +25,10 @@ data: # Ordering.API entries OrderingBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX in case of using Azure) OrderingSqlDb: Ordering SQL SERVER CONNECTION STRING (Server=xxxx;Intial Catalog=yyy;....) + GracePeriodManager_GracePeriodTime: "1" + GracePeriodManager_CheckUpdateTime: "15000" # Payment.API entries PaymentBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX in case of using Azure) -# GracePeriodManager entries - GracePeriodTime: "5" # Grace period duration (time when you can cancel order) in minutes - GracePeriodCheckUpdateTime: "60000" # Interval time to check new Order status (in milliseconds) - GracePeriodManagerBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX in case of using Azure) # Global entries UseAzureServiceBus: "TRUE" IF USE AZURE SB ("FALSE" FOR USING RABBITMQ) keystore: REDIS CONNECTION STRING FOR KEYSTORE \ No newline at end of file diff --git a/k8s/conf_local.yml b/k8s/conf_local.yml index 1ac16bb28..9a2059e63 100644 --- a/k8s/conf_local.yml +++ b/k8s/conf_local.yml @@ -21,8 +21,12 @@ data: OrderingBus: rabbitmq OrderingSqlDb: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word; PaymentBus: rabbitmq - GracePeriodTime: "1" - GracePeriodCheckUpdateTime: "60000" - GracePeriodManagerBus: rabbitmq UseAzureServiceBus: "False" + EnableLoadTest: "False" keystore: keystore-data + GracePeriodManager_GracePeriodTime: "1" + GracePeriodManager_CheckUpdateTime: "15000" + Instrumentation_Key: "" + + + diff --git a/k8s/deploy.ps1 b/k8s/deploy.ps1 index be9424b4f..96afd2cfb 100644 --- a/k8s/deploy.ps1 +++ b/k8s/deploy.ps1 @@ -54,7 +54,6 @@ Write-Host "Docker image Tag: $imageTag" -ForegroundColor Yellow # building and publishing docker images if needed if($buildBits) { Write-Host "Building and publishing eShopOnContainers..." -ForegroundColor Yellow - dotnet restore ../eShopOnContainers-ServicesAndWebApps.sln dotnet publish -c Release -o obj/Docker/publish ../eShopOnContainers-ServicesAndWebApps.sln } if ($buildImages) { @@ -63,7 +62,7 @@ if ($buildImages) { docker-compose -p .. -f ../docker-compose.yml build Write-Host "Pushing images to $registry/$dockerOrg..." -ForegroundColor Yellow - $services = ("basket.api", "catalog.api", "identity.api", "ordering.api", "marketing.api","payment.api","locations.api", "webmvc", "webspa", "webstatus", "graceperiodmanager") + $services = ("basket.api", "catalog.api", "identity.api", "ordering.api", "marketing.api","payment.api","locations.api", "webmvc", "webspa", "webstatus") foreach ($service in $services) { $imageFqdn = if ($useDockerHub) {"$dockerOrg/${service}"} else {"$registry/$dockerOrg/${service}"} @@ -110,11 +109,11 @@ ExecKube -cmd 'create configmap config-files --from-file=nginx-conf=nginx.conf' ExecKube -cmd 'label configmap config-files app=eshop' if ($deployInfrastructure) { - Write-Host 'Deploying infrastructure deployments (databases, redis, ...)' -ForegroundColor Yellow + Write-Host 'Deploying infrastructure deployments (databases, redis, RabbitMQ...)' -ForegroundColor Yellow ExecKube -cmd 'create -f sql-data.yaml -f basket-data.yaml -f keystore-data.yaml -f rabbitmq.yaml -f nosql-data.yaml' } -Write-Host 'Deploying code deployments (databases, redis, ...)' -ForegroundColor Yellow +Write-Host 'Deploying code deployments (Web APIs, Web apps, ...)' -ForegroundColor Yellow ExecKube -cmd 'create -f services.yaml -f frontend.yaml' if ([string]::IsNullOrEmpty($externalDns)) { @@ -148,6 +147,7 @@ ExecKube -cmd 'create configmap urls ` --from-literal=MvcClientCatalogUrl=http://catalog ` --from-literal=MvcClientBasketUrl=http://basket ` --from-literal=MvcClientMarketingUrl=http://marketing ` + --from-literal=MvcClientLocationsUrl=http://locations ` --from-literal=MarketingHealthCheckUrl=http://marketing/hc ` --from-literal=WebSpaHealthCheckUrl=http://webspa/hc ` --from-literal=SpaClientMarketingExternalUrl=http://$($externalDns)/marketing-api ` @@ -155,12 +155,15 @@ ExecKube -cmd 'create configmap urls ` --from-literal=SpaClientCatalogExternalUrl=http://$($externalDns)/catalog-api ` --from-literal=SpaClientBasketExternalUrl=http://$($externalDns)/basket-api ` --from-literal=SpaClientIdentityExternalUrl=http://$($externalDns)/identity ` + --from-literal=SpaClientLocationsUrl=http://$($externalDns)/locations-api ` --from-literal=LocationsHealthCheckUrl=http://locations/hc ` --from-literal=SpaClientExternalUrl=http://$($externalDns) ` --from-literal=LocationApiClient=http://$($externalDns)/locations-api ` --from-literal=MarketingApiClient=http://$($externalDns)/marketing-api ` --from-literal=BasketApiClient=http://$($externalDns)/basket-api ` - --from-literal=OrderingApiClient=http://$($externalDns)/ordering-api' + --from-literal=OrderingApiClient=http://$($externalDns)/ordering-api ` + --from-literal=PaymentHealthCheckUrl=http://payment/hc' + ExecKube -cmd 'label configmap urls app=eshop' @@ -189,7 +192,6 @@ ExecKube -cmd 'set image deployments/payment payment=${registryPath}${dockerOrg} ExecKube -cmd 'set image deployments/webmvc webmvc=${registryPath}${dockerOrg}/webmvc:$imageTag' ExecKube -cmd 'set image deployments/webstatus webstatus=${registryPath}${dockerOrg}/webstatus:$imageTag' ExecKube -cmd 'set image deployments/webspa webspa=${registryPath}${dockerOrg}/webspa:$imageTag' -ExecKube -cmd 'set image deployments/graceperiodmanager graceperiodmanager=${registryPath}${dockerOrg}/graceperiodmanager:$imageTag' Write-Host "Execute rollout..." -ForegroundColor Yellow ExecKube -cmd 'rollout resume deployments/basket' @@ -202,7 +204,6 @@ ExecKube -cmd 'rollout resume deployments/payment' ExecKube -cmd 'rollout resume deployments/webmvc' ExecKube -cmd 'rollout resume deployments/webstatus' ExecKube -cmd 'rollout resume deployments/webspa' -ExecKube -cmd 'rollout resume deployments/graceperiodmanager' Write-Host "WebSPA is exposed at http://$externalDns, WebMVC at http://$externalDns/webmvc, WebStatus at http://$externalDns/webstatus" -ForegroundColor Yellow diff --git a/k8s/deployments.yaml b/k8s/deployments.yaml index 9006c3642..9935b83d7 100644 --- a/k8s/deployments.yaml +++ b/k8s/deployments.yaml @@ -15,8 +15,8 @@ spec: image: eshop/basket.api imagePullPolicy: Always env: - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80/basket-api + - name: PATH_BASE + value: /basket-api - name: ConnectionString valueFrom: configMapKeyRef: @@ -32,13 +32,39 @@ spec: configMapKeyRef: name: externalcfg key: UseAzureServiceBus + - name: ApplicationInsights__InstrumentationKey + valueFrom: + configMapKeyRef: + name: externalcfg + key: Instrumentation_Key - name: IdentityUrl valueFrom: configMapKeyRef: name: urls key: IdentityUrl + - name: UseLoadTest + valueFrom: + configMapKeyRef: + name: externalcfg + key: EnableLoadTest + - name: OrchestratorType + value: 'K8S' ports: - - containerPort: 80 + - containerPort: 80 + readinessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 60 + periodSeconds: 10 imagePullSecrets: - name: registry-key --- @@ -59,8 +85,8 @@ spec: image: eshop/catalog.api imagePullPolicy: Always env: - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80/catalog-api + - name: PATH_BASE + value: /catalog-api - name: ConnectionString valueFrom: configMapKeyRef: @@ -81,8 +107,29 @@ spec: configMapKeyRef: name: externalcfg key: CatalogBus + - name: ApplicationInsights__InstrumentationKey + valueFrom: + configMapKeyRef: + name: externalcfg + key: Instrumentation_Key + - name: OrchestratorType + value: 'K8S' ports: - containerPort: 80 + readinessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 60 + periodSeconds: 10 imagePullSecrets: - name: registry-key --- @@ -103,9 +150,9 @@ spec: image: eshop/identity.api imagePullPolicy: Always env: - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80/identity - - name: ConnectionStrings__DefaultConnection + - name: PATH_BASE + value: /identity + - name: ConnectionString valueFrom: configMapKeyRef: name: externalcfg @@ -146,9 +193,30 @@ spec: valueFrom: configMapKeyRef: name: urls - key: OrderingApiClient + key: OrderingApiClient + - name: ApplicationInsights__InstrumentationKey + valueFrom: + configMapKeyRef: + name: externalcfg + key: Instrumentation_Key + - name: OrchestratorType + value: 'K8S' ports: - containerPort: 80 + readinessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 60 + periodSeconds: 10 imagePullSecrets: - name: registry-key --- @@ -169,8 +237,8 @@ spec: image: eshop/ordering.api imagePullPolicy: Always env: - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80/ordering-api + - name: PATH_BASE + value: /ordering-api - name: ConnectionString valueFrom: configMapKeyRef: @@ -191,55 +259,44 @@ spec: configMapKeyRef: name: urls key: IdentityUrl - ports: - - containerPort: 80 - imagePullSecrets: - - name: registry-key ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: graceperiodmanager -spec: - paused: true - template: - metadata: - labels: - app: eshop - component: graceperiodmanager - spec: - containers: - - name: graceperiodmanager - image: eshop/graceperiodmanager - imagePullPolicy: Always - env: - - name: ConnectionString - valueFrom: - configMapKeyRef: - name: externalcfg - key: OrderingSqlDb - - name: EventBusConnection + - name: CheckUpdateTime valueFrom: configMapKeyRef: name: externalcfg - key: GracePeriodManagerBus + key: GracePeriodManager_CheckUpdateTime - name: GracePeriodTime valueFrom: configMapKeyRef: name: externalcfg - key: GracePeriodTime - - name: CheckUpdateTime + key: GracePeriodManager_GracePeriodTime + - name: ApplicationInsights__InstrumentationKey valueFrom: configMapKeyRef: name: externalcfg - key: GracePeriodCheckUpdateTime - - name: AzureServiceBusEnabled + key: Instrumentation_Key + - name: UseLoadTest valueFrom: configMapKeyRef: name: externalcfg - key: UseAzureServiceBus + key: EnableLoadTest + - name: OrchestratorType + value: 'K8S' ports: - containerPort: 80 + readinessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 60 + periodSeconds: 10 imagePullSecrets: - name: registry-key --- @@ -260,8 +317,8 @@ spec: image: eshop/locations.api imagePullPolicy: Always env: - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80/locations-api + - name: PATH_BASE + value: /locations-api - name: ConnectionString valueFrom: configMapKeyRef: @@ -291,9 +348,35 @@ spec: valueFrom: configMapKeyRef: name: urls - key: IdentityUrl + key: IdentityUrl + - name: ApplicationInsights__InstrumentationKey + valueFrom: + configMapKeyRef: + name: externalcfg + key: Instrumentation_Key + - name: UseLoadTest + valueFrom: + configMapKeyRef: + name: externalcfg + key: EnableLoadTest + - name: OrchestratorType + value: 'K8S' ports: - containerPort: 80 + readinessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 60 + periodSeconds: 10 imagePullSecrets: - name: registry-key --- @@ -314,8 +397,8 @@ spec: image: eshop/marketing.api imagePullPolicy: Always env: - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80/marketing-api + - name: PATH_BASE + value: /marketing-api - name: ConnectionString valueFrom: configMapKeyRef: @@ -355,9 +438,35 @@ spec: valueFrom: configMapKeyRef: name: urls - key: Marketing_PicBaseUrl + key: Marketing_PicBaseUrl + - name: ApplicationInsights__InstrumentationKey + valueFrom: + configMapKeyRef: + name: externalcfg + key: Instrumentation_Key + - name: UseLoadTest + valueFrom: + configMapKeyRef: + name: externalcfg + key: EnableLoadTest + - name: OrchestratorType + value: 'K8S' ports: - containerPort: 80 + readinessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 60 + periodSeconds: 10 imagePullSecrets: - name: registry-key --- @@ -378,8 +487,8 @@ spec: image: eshop/payment.api imagePullPolicy: Always env: - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80/payment-api + - name: PATH_BASE + value: /payment-api - name: AzureServiceBusEnabled valueFrom: configMapKeyRef: @@ -390,8 +499,29 @@ spec: configMapKeyRef: name: externalcfg key: PaymentBus + - name: ApplicationInsights__InstrumentationKey + valueFrom: + configMapKeyRef: + name: externalcfg + key: Instrumentation_Key + - name: OrchestratorType + value: 'K8S' ports: - containerPort: 80 + readinessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 60 + periodSeconds: 10 imagePullSecrets: - name: registry-key --- @@ -412,8 +542,8 @@ spec: image: eshop/webmvc imagePullPolicy: Always env: - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80/webmvc + - name: PATH_BASE + value: /webmvc - name: DPConnectionString valueFrom: configMapKeyRef: @@ -431,6 +561,11 @@ spec: configMapKeyRef: name: urls key: MvcClientExternalUrl + - name: LocationsUrl + valueFrom: + configMapKeyRef: + name: urls + key: MvcClientLocationsUrl - name: CatalogUrl valueFrom: configMapKeyRef: @@ -450,9 +585,65 @@ spec: valueFrom: configMapKeyRef: name: urls - key: MvcClientMarketingUrl + key: MvcClientMarketingUrl + - name: BasketUrlHC + valueFrom: + configMapKeyRef: + name: urls + key: BasketHealthCheckUrl + - name: CatalogUrlHC + valueFrom: + configMapKeyRef: + name: urls + key: CatalogHealthCheckUrl + - name: IdentityUrlHC + valueFrom: + configMapKeyRef: + name: urls + key: IdentityHealthCheckUrl + - name: OrderingUrlHC + valueFrom: + configMapKeyRef: + name: urls + key: OrderingHealthCheckUrl + - name: MarketingUrlHC + valueFrom: + configMapKeyRef: + name: urls + key: MarketingHealthCheckUrl + - name: PaymentUrlHC + valueFrom: + configMapKeyRef: + name: urls + key: PaymentHealthCheckUrl + - name: ApplicationInsights__InstrumentationKey + valueFrom: + configMapKeyRef: + name: externalcfg + key: Instrumentation_Key + - name: UseLoadTest + valueFrom: + configMapKeyRef: + name: externalcfg + key: EnableLoadTest + - name: OrchestratorType + value: 'K8S' ports: - containerPort: 80 + readinessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 60 + periodSeconds: 10 imagePullSecrets: - name: registry-key --- @@ -473,8 +664,8 @@ spec: image: eshop/webstatus imagePullPolicy: Always env: - - name: ASPNETCORE_URLS - value: http://0.0.0.0:80/webstatus + - name: PATH_BASE + value: /webstatus - name: BasketUrl valueFrom: configMapKeyRef: @@ -514,7 +705,19 @@ spec: valueFrom: configMapKeyRef: name: urls - key: WebSpaHealthCheckUrl + key: WebSpaHealthCheckUrl + - name: PaymentUrl + valueFrom: + configMapKeyRef: + name: urls + key: PaymentHealthCheckUrl + - name: ApplicationInsights__InstrumentationKey + valueFrom: + configMapKeyRef: + name: externalcfg + key: Instrumentation_Key + - name: OrchestratorType + value: 'K8S' ports: - containerPort: 80 imagePullSecrets: @@ -575,7 +778,12 @@ spec: valueFrom: configMapKeyRef: name: urls - key: SpaClientMarketingExternalUrl + key: SpaClientMarketingExternalUrl + - name: LocationsUrl + valueFrom: + configMapKeyRef: + name: urls + key: SpaClientLocationsUrl - name: BasketUrlHC valueFrom: configMapKeyRef: @@ -601,7 +809,33 @@ spec: configMapKeyRef: name: urls key: MarketingHealthCheckUrl + - name: PaymentUrlHC + valueFrom: + configMapKeyRef: + name: urls + key: PaymentHealthCheckUrl + - name: ApplicationInsights__InstrumentationKey + valueFrom: + configMapKeyRef: + name: externalcfg + key: Instrumentation_Key + - name: OrchestratorType + value: 'K8S' ports: - containerPort: 80 + readinessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /hc + port: 80 + scheme: HTTP + initialDelaySeconds: 60 + periodSeconds: 10 imagePullSecrets: - name: registry-key diff --git a/k8s/gen-k8s-env.ps1 b/k8s/gen-k8s-env.ps1 index c3b82469c..fffe1546f 100644 --- a/k8s/gen-k8s-env.ps1 +++ b/k8s/gen-k8s-env.ps1 @@ -1,17 +1,20 @@ Param( [parameter(Mandatory=$true)][string]$resourceGroupName, [parameter(Mandatory=$true)][string]$location, - [parameter(Mandatory=$true)][string]$registryName, + [parameter(Mandatory=$false)][string]$registryName, [parameter(Mandatory=$true)][string]$orchestratorName, [parameter(Mandatory=$true)][string]$dnsName, - [parameter(Mandatory=$true)][string]$createAcr=$true + [parameter(Mandatory=$true)][string]$createAcr=$true, + [parameter(Mandatory=$false)][int]$agentCount=2, + [parameter(Mandatory=$false)][string]$agentVMSize="Standard_D2_v2", + [parameter(Mandatory=$false)][int]$masterCount=1 ) # Create resource group Write-Host "Creating resource group..." -ForegroundColor Yellow az group create --name=$resourceGroupName --location=$location -if ($createAcr) { +if ($createAcr -eq $true) { # Create Azure Container Registry Write-Host "Creating Azure Container Registry..." -ForegroundColor Yellow az acr create -n $registryName -g $resourceGroupName -l $location --admin-enabled true --sku Basic @@ -19,10 +22,12 @@ if ($createAcr) { # Create kubernetes orchestrator Write-Host "Creating kubernetes orchestrator..." -ForegroundColor Yellow -az acs create --orchestrator-type=kubernetes --resource-group $resourceGroupName --name=$orchestratorName --dns-prefix=$dnsName --generate-ssh-keys +az acs create --orchestrator-type=kubernetes --resource-group $resourceGroupName --name=$orchestratorName --dns-prefix=$dnsName --generate-ssh-keys --agent-count=$agentCount --agent-vm-size=$agentVMSize --master-count=$masterCount # Retrieve kubernetes cluster configuration and save it under ~/.kube/config az acs kubernetes get-credentials --resource-group=$resourceGroupName --name=$orchestratorName -# Show ACR credentials -az acr credential show -n $registryName \ No newline at end of file +if ($createAcr -eq $true) { + # Show ACR credentials + az acr credential show -n $registryName +} \ No newline at end of file diff --git a/k8s/keystore-data.yaml b/k8s/keystore-data.yaml index 3340cce35..0e2dfa9b9 100644 --- a/k8s/keystore-data.yaml +++ b/k8s/keystore-data.yaml @@ -25,5 +25,5 @@ spec: spec: containers: - name: keystore-data - image: redis:3.2-alpine + image: redis diff --git a/k8s/rabbitmq.yaml b/k8s/rabbitmq.yaml index a0d87549c..d2a7de906 100644 --- a/k8s/rabbitmq.yaml +++ b/k8s/rabbitmq.yaml @@ -25,6 +25,6 @@ spec: spec: containers: - name: rabbitmq - image: rabbitmq:3.6.9-alpine + image: rabbitmq:3-management ports: - containerPort: 5672 diff --git a/k8s/readme.md b/k8s/readme.md index 680652e35..43534d32e 100644 --- a/k8s/readme.md +++ b/k8s/readme.md @@ -9,4 +9,4 @@ Refer to file [README.k8s.md](./README.k8s.md) for detailed information Refer to file [README.CICD.k8s.md](./README.CICD.k8s.md) for information about how to set a VSTS build for deploying on k8s -Refer to file [conf-files.md](./conf-files.md) for a brief descriptio of every YAML file in this folder \ No newline at end of file +Refer to file [conf-files.md](./conf-files.md) for a brief description of every YAML file in this folder \ No newline at end of file diff --git a/k8s/services.yaml b/k8s/services.yaml index d88604e88..02b73448a 100644 --- a/k8s/services.yaml +++ b/k8s/services.yaml @@ -56,20 +56,6 @@ spec: --- apiVersion: v1 kind: Service -metadata: - labels: - app: eshop - component: graceperiodmanager - name: graceperiodmanager -spec: - ports: - - port: 80 - selector: - app: eshop - component: graceperiodmanager ---- -apiVersion: v1 -kind: Service metadata: labels: app: eshop diff --git a/k8s/sql-data.yaml b/k8s/sql-data.yaml index 1e5f1371f..245622e83 100644 --- a/k8s/sql-data.yaml +++ b/k8s/sql-data.yaml @@ -25,9 +25,11 @@ spec: spec: containers: - name: sql-data - image: microsoft/mssql-server-linux:rc2 + image: microsoft/mssql-server-linux:2017-latest env: - name: ACCEPT_EULA value: "Y" - - name: SA_PASSWORD + - name: MSSQL_PID + value: Developer + - name: MSSQL_SA_PASSWORD value: Pass@word diff --git a/src/BuildingBlocks/DataProtection/DataProtection/DataProtection.csproj b/src/BuildingBlocks/DataProtection/DataProtection/DataProtection.csproj index bfe61a85a..93a919894 100644 --- a/src/BuildingBlocks/DataProtection/DataProtection/DataProtection.csproj +++ b/src/BuildingBlocks/DataProtection/DataProtection/DataProtection.csproj @@ -1,13 +1,13 @@  - netcoreapp1.1 + netstandard1.5 Microsoft.eShopOnContainers.BuildingBlocks - + \ No newline at end of file diff --git a/src/BuildingBlocks/DataProtection/DataProtection/DataProtectionBuilderExtensions.cs b/src/BuildingBlocks/DataProtection/DataProtection/DataProtectionBuilderExtensions.cs index 3db776b9a..1f5bffda5 100644 --- a/src/BuildingBlocks/DataProtection/DataProtection/DataProtectionBuilderExtensions.cs +++ b/src/BuildingBlocks/DataProtection/DataProtection/DataProtectionBuilderExtensions.cs @@ -4,6 +4,7 @@ using Microsoft.AspNetCore.DataProtection.Repositories; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; + using StackExchange.Redis; using System; using System.Linq; using System.Net; @@ -45,10 +46,11 @@ throw new ArgumentException("Redis connection string may not be empty.", nameof(redisConnectionString)); } - var ips = Dns.GetHostAddressesAsync(redisConnectionString).Result; + var configuration = ConfigurationOptions.Parse(redisConnectionString, true); + configuration.ResolveDns = true; return builder.Use(ServiceDescriptor.Singleton(services => - new RedisXmlRepository(ips.First().ToString(), services.GetRequiredService>()))); + new RedisXmlRepository(configuration, services.GetRequiredService>()))); } ///

diff --git a/src/BuildingBlocks/DataProtection/DataProtection/RedisXmlRepository.cs b/src/BuildingBlocks/DataProtection/DataProtection/RedisXmlRepository.cs index f5a903b65..d71f9df53 100644 --- a/src/BuildingBlocks/DataProtection/DataProtection/RedisXmlRepository.cs +++ b/src/BuildingBlocks/DataProtection/DataProtection/RedisXmlRepository.cs @@ -65,7 +65,7 @@ /// /// Thrown if or is . /// - public RedisXmlRepository(string connectionString, ILogger logger) + public RedisXmlRepository(ConfigurationOptions connectionString, ILogger logger) : this(ConnectionMultiplexer.Connect(connectionString), logger) { } diff --git a/src/BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj b/src/BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj index 1387a74dd..ce65f7da8 100644 --- a/src/BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj +++ b/src/BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj @@ -1,13 +1,13 @@  - netcoreapp1.1 + netstandard2.0 - - - + + + diff --git a/src/BuildingBlocks/EventBus/EventBus/EventBus.csproj b/src/BuildingBlocks/EventBus/EventBus/EventBus.csproj index fe7e35d98..ac2d3783e 100644 --- a/src/BuildingBlocks/EventBus/EventBus/EventBus.csproj +++ b/src/BuildingBlocks/EventBus/EventBus/EventBus.csproj @@ -1,17 +1,12 @@  - netcoreapp1.1 + netstandard2.0 Microsoft.eShopOnContainers.BuildingBlocks.EventBus - - - - - - + \ No newline at end of file diff --git a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/DefaultRabbitMQPersisterConnection.cs b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/DefaultRabbitMQPersisterConnection.cs index 0aafaf90a..2e0555e61 100644 --- a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/DefaultRabbitMQPersisterConnection.cs +++ b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/DefaultRabbitMQPersisterConnection.cs @@ -15,16 +15,17 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ { private readonly IConnectionFactory _connectionFactory; private readonly ILogger _logger; - + private readonly int _retryCount; IConnection _connection; bool _disposed; object sync_root = new object(); - public DefaultRabbitMQPersistentConnection(IConnectionFactory connectionFactory,ILogger logger) + public DefaultRabbitMQPersistentConnection(IConnectionFactory connectionFactory, ILogger logger, int retryCount = 5) { _connectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); + _retryCount = retryCount; } public bool IsConnected @@ -69,7 +70,7 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ { var policy = RetryPolicy.Handle() .Or() - .WaitAndRetry(5, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)), (ex, time) => + .WaitAndRetry(_retryCount, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)), (ex, time) => { _logger.LogWarning(ex.ToString()); } @@ -88,7 +89,7 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ _connection.ConnectionBlocked += OnConnectionBlocked; _logger.LogInformation($"RabbitMQ persistent connection acquired a connection {_connection.Endpoint.HostName} and is subscribed to failure events"); - + return true; } else diff --git a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs index 07a130f22..2416e1d55 100644 --- a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs +++ b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs @@ -11,10 +11,7 @@ using RabbitMQ.Client; using RabbitMQ.Client.Events; using RabbitMQ.Client.Exceptions; using System; -using System.Collections.Generic; -using System.Linq; using System.Net.Sockets; -using System.Reflection; using System.Text; using System.Threading.Tasks; @@ -29,19 +26,20 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ private readonly IEventBusSubscriptionsManager _subsManager; private readonly ILifetimeScope _autofac; private readonly string AUTOFAC_SCOPE_NAME = "eshop_event_bus"; + private readonly int _retryCount; private IModel _consumerChannel; private string _queueName; public EventBusRabbitMQ(IRabbitMQPersistentConnection persistentConnection, ILogger logger, - ILifetimeScope autofac, IEventBusSubscriptionsManager subsManager) + ILifetimeScope autofac, IEventBusSubscriptionsManager subsManager, int retryCount = 5) { _persistentConnection = persistentConnection ?? throw new ArgumentNullException(nameof(persistentConnection)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _subsManager = subsManager ?? new InMemoryEventBusSubscriptionsManager(); _consumerChannel = CreateConsumerChannel(); _autofac = autofac; - + _retryCount = retryCount; _subsManager.OnEventRemoved += SubsManager_OnEventRemoved; } @@ -75,7 +73,7 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ var policy = RetryPolicy.Handle() .Or() - .WaitAndRetry(5, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)), (ex, time) => + .WaitAndRetry(_retryCount, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)), (ex, time) => { _logger.LogWarning(ex.ToString()); }); @@ -184,7 +182,7 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ }; channel.BasicConsume(queue: _queueName, - noAck: true, + autoAck: false, consumer: consumer); channel.CallbackException += (sender, ea) => diff --git a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj index d7e3a58d8..6966a57f1 100644 --- a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj +++ b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj @@ -1,17 +1,17 @@  - netcoreapp1.1 + netstandard2.0 Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ - - - - - - + + + + + + diff --git a/src/BuildingBlocks/EventBus/EventBusServiceBus/DefaultServiceBusPersisterConnection.cs b/src/BuildingBlocks/EventBus/EventBusServiceBus/DefaultServiceBusPersisterConnection.cs index db1b6b390..a3f563c2f 100644 --- a/src/BuildingBlocks/EventBus/EventBusServiceBus/DefaultServiceBusPersisterConnection.cs +++ b/src/BuildingBlocks/EventBus/EventBusServiceBus/DefaultServiceBusPersisterConnection.cs @@ -1,7 +1,6 @@ using Microsoft.Azure.ServiceBus; using Microsoft.Extensions.Logging; using System; -using System.IO; namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus { diff --git a/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs index 1458b7198..03a3d1139 100644 --- a/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs +++ b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs @@ -9,7 +9,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; - using System.Reflection; using System.Text; using System.Threading.Tasks; diff --git a/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj index b0d6f0cc2..07c7a7607 100644 --- a/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj +++ b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj @@ -1,13 +1,14 @@  - netcoreapp1.1 + netstandard2.0 Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus + - + diff --git a/src/BuildingBlocks/EventBus/EventBusServiceBus/IServiceBusPersisterConnection.cs b/src/BuildingBlocks/EventBus/EventBusServiceBus/IServiceBusPersisterConnection.cs index 283031247..52737cef7 100644 --- a/src/BuildingBlocks/EventBus/EventBusServiceBus/IServiceBusPersisterConnection.cs +++ b/src/BuildingBlocks/EventBus/EventBusServiceBus/IServiceBusPersisterConnection.cs @@ -1,7 +1,7 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus { - using System; using Microsoft.Azure.ServiceBus; + using System; public interface IServiceBusPersisterConnection : IDisposable { diff --git a/src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj b/src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj index cc3d51f6a..8d5c8f0ad 100644 --- a/src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj +++ b/src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj @@ -1,22 +1,21 @@  - netcoreapp1.1 + netstandard2.0 Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF - - - - - - - + + + + + + - + diff --git a/src/BuildingBlocks/EventBus/IntegrationEventLogEF/Services/IntegrationEventLogService.cs b/src/BuildingBlocks/EventBus/IntegrationEventLogEF/Services/IntegrationEventLogService.cs index bef74b452..5ac8bb862 100644 --- a/src/BuildingBlocks/EventBus/IntegrationEventLogEF/Services/IntegrationEventLogService.cs +++ b/src/BuildingBlocks/EventBus/IntegrationEventLogEF/Services/IntegrationEventLogService.cs @@ -6,6 +6,7 @@ using System.Data.Common; using System.Linq; using System.Threading.Tasks; using System; +using Microsoft.EntityFrameworkCore.Diagnostics; namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Services { diff --git a/src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj b/src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj index 023554e60..3c28e8dbc 100644 --- a/src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj +++ b/src/BuildingBlocks/HealthChecks/src/Microsoft.AspNetCore.HealthChecks/Microsoft.AspNetCore.HealthChecks.csproj @@ -1,7 +1,10 @@  - netstandard1.3 + netstandard2.0 + false + false + false @@ -9,8 +12,11 @@ - + + + + \ No newline at end of file diff --git a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Microsoft.Extensions.HealthChecks.AzureStorage.csproj b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Microsoft.Extensions.HealthChecks.AzureStorage.csproj index 24d5ce92b..40db99802 100644 --- a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Microsoft.Extensions.HealthChecks.AzureStorage.csproj +++ b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Microsoft.Extensions.HealthChecks.AzureStorage.csproj @@ -1,8 +1,7 @@  - netstandard1.3 - $(PackageTargetFallback);net46 + netstandard2.0 false false false @@ -17,11 +16,11 @@ - + - - + + diff --git a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj index 35aacef13..a38fa2160 100644 --- a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj +++ b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.SqlServer/Microsoft.Extensions.HealthChecks.SqlServer.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj index c0a9c571a..228c2d79d 100644 --- a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj +++ b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks/Microsoft.Extensions.HealthChecks.csproj @@ -10,11 +10,11 @@ - + - + diff --git a/src/BuildingBlocks/Resilience/Resilience.Http/Resilience.Http.csproj b/src/BuildingBlocks/Resilience/Resilience.Http/Resilience.Http.csproj index e472bb7a5..03f4a0657 100644 --- a/src/BuildingBlocks/Resilience/Resilience.Http/Resilience.Http.csproj +++ b/src/BuildingBlocks/Resilience/Resilience.Http/Resilience.Http.csproj @@ -1,14 +1,15 @@  - netstandard1.4 + netstandard2.0 Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http - - - + + + + \ No newline at end of file diff --git a/src/BuildingBlocks/Resilience/Resilience.Http/ResilientHttpClient.cs b/src/BuildingBlocks/Resilience/Resilience.Http/ResilientHttpClient.cs index d32660005..18051a501 100644 --- a/src/BuildingBlocks/Resilience/Resilience.Http/ResilientHttpClient.cs +++ b/src/BuildingBlocks/Resilience/Resilience.Http/ResilientHttpClient.cs @@ -10,6 +10,7 @@ using System.Net; using System.Net.Http; using System.Net.Http.Headers; using System.Threading.Tasks; +using Microsoft.AspNetCore.Http; namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http { @@ -24,13 +25,15 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http private readonly ILogger _logger; private readonly Func> _policyCreator; private ConcurrentDictionary _policyWrappers; + private readonly IHttpContextAccessor _httpContextAccessor; - public ResilientHttpClient(Func> policyCreator, ILogger logger) + public ResilientHttpClient(Func> policyCreator, ILogger logger, IHttpContextAccessor httpContextAccessor) { _client = new HttpClient(); _logger = logger; _policyCreator = policyCreator; _policyWrappers = new ConcurrentDictionary(); + _httpContextAccessor = httpContextAccessor; } @@ -52,10 +55,12 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http { var requestMessage = new HttpRequestMessage(HttpMethod.Delete, uri); + SetAuthorizationHeader(requestMessage); + if (authorizationToken != null) { requestMessage.Headers.Authorization = new AuthenticationHeaderValue(authorizationMethod, authorizationToken); - } + } if (requestId != null) { @@ -65,6 +70,7 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http return await _client.SendAsync(requestMessage); }); } + public Task GetStringAsync(string uri, string authorizationToken = null, string authorizationMethod = "Bearer") { @@ -74,6 +80,8 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http { var requestMessage = new HttpRequestMessage(HttpMethod.Get, uri); + SetAuthorizationHeader(requestMessage); + if (authorizationToken != null) { requestMessage.Headers.Authorization = new AuthenticationHeaderValue(authorizationMethod, authorizationToken); @@ -108,6 +116,8 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http { var requestMessage = new HttpRequestMessage(method, uri); + SetAuthorizationHeader(requestMessage); + requestMessage.Content = new StringContent(JsonConvert.SerializeObject(item), System.Text.Encoding.UTF8, "application/json"); if (authorizationToken != null) @@ -162,6 +172,15 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http var origin = $"{url.Scheme}://{url.DnsSafeHost}:{url.Port}"; return origin; - } + } + + private void SetAuthorizationHeader(HttpRequestMessage requestMessage) + { + var authorizationHeader = _httpContextAccessor.HttpContext.Request.Headers["Authorization"]; + if (!string.IsNullOrEmpty(authorizationHeader)) + { + requestMessage.Headers.Add("Authorization", new List() { authorizationHeader }); + } + } } } diff --git a/src/BuildingBlocks/Resilience/Resilience.Http/StandardHttpClient.cs b/src/BuildingBlocks/Resilience/Resilience.Http/StandardHttpClient.cs index 6cd378c88..a5f6a63c4 100644 --- a/src/BuildingBlocks/Resilience/Resilience.Http/StandardHttpClient.cs +++ b/src/BuildingBlocks/Resilience/Resilience.Http/StandardHttpClient.cs @@ -1,6 +1,8 @@ -using Microsoft.Extensions.Logging; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.Logging; using Newtonsoft.Json; using System; +using System.Collections.Generic; using System.Net; using System.Net.Http; using System.Net.Http.Headers; @@ -12,17 +14,21 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http { private HttpClient _client; private ILogger _logger; + private readonly IHttpContextAccessor _httpContextAccessor; - public StandardHttpClient(ILogger logger) + public StandardHttpClient(ILogger logger, IHttpContextAccessor httpContextAccessor) { _client = new HttpClient(); _logger = logger; + _httpContextAccessor = httpContextAccessor; } public async Task GetStringAsync(string uri, string authorizationToken = null, string authorizationMethod = "Bearer") { var requestMessage = new HttpRequestMessage(HttpMethod.Get, uri); + SetAuthorizationHeader(requestMessage); + if (authorizationToken != null) { requestMessage.Headers.Authorization = new AuthenticationHeaderValue(authorizationMethod, authorizationToken); @@ -45,6 +51,8 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http var requestMessage = new HttpRequestMessage(method, uri); + SetAuthorizationHeader(requestMessage); + requestMessage.Content = new StringContent(JsonConvert.SerializeObject(item), System.Text.Encoding.UTF8, "application/json"); if (authorizationToken != null) @@ -84,6 +92,8 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http { var requestMessage = new HttpRequestMessage(HttpMethod.Delete, uri); + SetAuthorizationHeader(requestMessage); + if (authorizationToken != null) { requestMessage.Headers.Authorization = new AuthenticationHeaderValue(authorizationMethod, authorizationToken); @@ -96,6 +106,15 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http return await _client.SendAsync(requestMessage); } + + private void SetAuthorizationHeader(HttpRequestMessage requestMessage) + { + var authorizationHeader = _httpContextAccessor.HttpContext.Request.Headers["Authorization"]; + if (!string.IsNullOrEmpty(authorizationHeader)) + { + requestMessage.Headers.Add("Authorization", new List() { authorizationHeader }); + } + } } } diff --git a/src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj b/src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj new file mode 100644 index 000000000..d9ddd56e9 --- /dev/null +++ b/src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj @@ -0,0 +1,11 @@ + + + + netcoreapp2.0 + + + + + + + diff --git a/src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHostExtensions.cs b/src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHostExtensions.cs new file mode 100644 index 000000000..ecaceeab0 --- /dev/null +++ b/src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHostExtensions.cs @@ -0,0 +1,40 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using System; + +namespace Microsoft.AspNetCore.Hosting +{ + public static class IWebHostExtensions + { + public static IWebHost MigrateDbContext(this IWebHost webHost, Action seeder) where TContext : DbContext + { + using (var scope = webHost.Services.CreateScope()) + { + var services = scope.ServiceProvider; + + var logger = services.GetRequiredService>(); + + var context = services.GetService(); + + try + { + logger.LogInformation($"Migrating database associated with context {typeof(TContext).Name}"); + + context.Database + .Migrate(); + + seeder(context,services); + + logger.LogInformation($"Migrated database associated with context {typeof(TContext).Name}"); + } + catch (Exception ex) + { + logger.LogError(ex, $"An error occurred while migrating the database used on context {typeof(TContext).Name}"); + } + } + + return webHost; + } + } +} diff --git a/src/Mobile/README.md b/src/Mobile/README.md index 632593518..4a12698b1 100644 --- a/src/Mobile/README.md +++ b/src/Mobile/README.md @@ -10,7 +10,7 @@ eShopOnContainers is a reference app whose imagined purpose is to serve the mobi 1. A Xamarin.Forms mobile app for iOS, Android and Windows. 2. Several .NET Web API microservices deployed as Docker containers. -##Xamarin.Forms App (eShopOnContainers) +### Xamarin.Forms App (eShopOnContainers) This project exercises the following platforms, frameworks or features: diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Basket/BasketService.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Basket/BasketService.cs index 811c8436f..1d41584c4 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Basket/BasketService.cs +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Basket/BasketService.cs @@ -28,7 +28,7 @@ namespace eShopOnContainers.Core.Services.Basket CustomerBasket basket = await _requestProvider.GetAsync(uri, token); - ServicesHelper.FixBasketItemPictureUri(basket?.Items); + ServicesHelper.FixBasketItemPictureUri(basket?.Items); return basket; } diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Marketing/CampaignMockService.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Marketing/CampaignMockService.cs index 65490db45..c4536ac51 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Marketing/CampaignMockService.cs +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Marketing/CampaignMockService.cs @@ -1,12 +1,12 @@ -namespace eShopOnContainers.Core.Services.Marketing -{ - using System; - using System.Collections.ObjectModel; - using System.Threading.Tasks; - using Models.Marketing; - using Xamarin.Forms; - using System.Linq; +using System; +using System.Collections.ObjectModel; +using System.Threading.Tasks; +using System.Linq; +using Xamarin.Forms; +using eShopOnContainers.Core.Models.Marketing; +namespace eShopOnContainers.Core.Services.Marketing +{ public class CampaignMockService : ICampaignService { private readonly ObservableCollection _mockCampaign = new ObservableCollection @@ -39,12 +39,12 @@ public async Task> GetAllCampaignsAsync(string token) { await Task.Delay(500); - return _mockCampaign; } public async Task GetCampaignByIdAsync(int campaignId, string token) { + await Task.Delay(500); return _mockCampaign.SingleOrDefault(c => c.Id == campaignId); } } diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Marketing/CampaignService.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Marketing/CampaignService.cs index 3d3123c1c..8d6cdeb6b 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Marketing/CampaignService.cs +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Marketing/CampaignService.cs @@ -1,13 +1,13 @@ -namespace eShopOnContainers.Core.Services.Marketing +using System; +using System.Collections.ObjectModel; +using System.Threading.Tasks; +using eShopOnContainers.Core.Models.Marketing; +using eShopOnContainers.Core.Services.RequestProvider; +using eShopOnContainers.Core.Extensions; +using eShopOnContainers.Core.Helpers; + +namespace eShopOnContainers.Core.Services.Marketing { - using System; - using System.Collections.ObjectModel; - using System.Threading.Tasks; - using Models.Marketing; - using RequestProvider; - using Extensions; - using Helpers; - public class CampaignService : ICampaignService { private readonly IRequestProvider _requestProvider; diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Marketing/ICampaignService.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Marketing/ICampaignService.cs index a050153c1..d89ac0616 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Marketing/ICampaignService.cs +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Marketing/ICampaignService.cs @@ -1,13 +1,12 @@ -namespace eShopOnContainers.Core.Services.Marketing -{ - using System.Collections.ObjectModel; - using System.Threading.Tasks; - using Models.Marketing; +using System.Collections.ObjectModel; +using System.Threading.Tasks; +using eShopOnContainers.Core.Models.Marketing; +namespace eShopOnContainers.Core.Services.Marketing +{ public interface ICampaignService { Task> GetAllCampaignsAsync(string token); - Task GetCampaignByIdAsync(int id, string token); } } \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Order/IOrderService.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Order/IOrderService.cs index 59b746917..3503f7c2b 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Order/IOrderService.cs +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Order/IOrderService.cs @@ -7,10 +7,9 @@ namespace eShopOnContainers.Core.Services.Order { public interface IOrderService { - //Task CreateOrderAsync(Models.Orders.Order newOrder, string token); + Task CreateOrderAsync(Models.Orders.Order newOrder, string token); Task> GetOrdersAsync(string token); Task GetOrderAsync(int orderId, string token); - Task> GetCardTypesAsync(string token); Task CancelOrderAsync(int orderId, string token); BasketCheckout MapOrderToBasket(Models.Orders.Order order); } diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Order/OrderMockService.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Order/OrderMockService.cs index c32093203..9d25edc65 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Order/OrderMockService.cs +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Order/OrderMockService.cs @@ -55,15 +55,8 @@ namespace eShopOnContainers.Core.Services.Order private static List MockOrderItems = new List() { - new OrderItem { OrderId = Guid.NewGuid(), ProductId = Common.Common.MockCatalogItemId01, Discount = 15, ProductName = ".NET Bot Blue Sweatshirt (M)", Quantity = 1, UnitPrice = 16.50M, PictureUrl = Device.RuntimePlatform != Device.Windows ? "fake_product_01.png" : "Assets/fake_product_01.png" }, - new OrderItem { OrderId = Guid.NewGuid(), ProductId = Common.Common.MockCatalogItemId03, Discount = 0, ProductName = ".NET Bot Black Sweatshirt (M)", Quantity = 2, UnitPrice = 19.95M, PictureUrl = Device.RuntimePlatform != Device.Windows ? "fake_product_03.png" : "Assets/fake_product_03.png" } - }; - - private static List MockCardTypes = new List() - { - new CardType { Id = 1, Name = "Amex" }, - new CardType { Id = 2, Name = "Visa" }, - new CardType { Id = 3, Name = "MasterCard" }, + new OrderItem { OrderId = Guid.NewGuid(), ProductId = Common.Common.MockCatalogItemId01, Discount = 15, ProductName = ".NET Bot Blue Sweatshirt (M)", Quantity = 1, UnitPrice = 16.50M, PictureUrl = Device.RuntimePlatform != Device.Windows ? "fake_product_01.png" : "Assets/fake_product_01.png" }, + new OrderItem { OrderId = Guid.NewGuid(), ProductId = Common.Common.MockCatalogItemId03, Discount = 0, ProductName = ".NET Bot Black Sweatshirt (M)", Quantity = 2, UnitPrice = 19.95M, PictureUrl = Device.RuntimePlatform != Device.Windows ? "fake_product_03.png" : "Assets/fake_product_03.png" } }; private static BasketCheckout MockBasketCheckout = new BasketCheckout() @@ -104,19 +97,19 @@ namespace eShopOnContainers.Core.Services.Order return new Models.Orders.Order(); } - public async Task> GetCardTypesAsync(string token) + public async Task CreateOrderAsync(Models.Orders.Order newOrder, string token) { await Task.Delay(500); if (!string.IsNullOrEmpty(token)) - return MockCardTypes.ToObservableCollection(); - else - return new ObservableCollection(); + { + MockOrders.Add(newOrder); + } } public BasketCheckout MapOrderToBasket(Models.Orders.Order order) { - return MockBasketCheckout; + return MockBasketCheckout; } public Task CancelOrderAsync(int orderId, string token) diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Order/OrderService.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Order/OrderService.cs index 2d85bef5c..85f8c85a6 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Order/OrderService.cs +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Order/OrderService.cs @@ -17,9 +17,13 @@ namespace eShopOnContainers.Core.Services.Order _requestProvider = requestProvider; } + public Task CreateOrderAsync(Models.Orders.Order newOrder, string token) + { + throw new Exception("Only available in Mock Services!"); + } + public async Task> GetOrdersAsync(string token) { - UriBuilder builder = new UriBuilder(GlobalSetting.Instance.OrdersEndpoint); builder.Path = "api/v1/orders"; @@ -30,7 +34,7 @@ namespace eShopOnContainers.Core.Services.Order await _requestProvider.GetAsync>(uri, token); return orders; - + } public async Task GetOrderAsync(int orderId, string token) @@ -54,27 +58,6 @@ namespace eShopOnContainers.Core.Services.Order } } - public async Task> GetCardTypesAsync(string token) - { - try - { - UriBuilder builder = new UriBuilder(GlobalSetting.Instance.OrdersEndpoint); - - builder.Path = "api/v1/orders/cardtypes"; - - string uri = builder.ToString(); - - ObservableCollection cardTypes = - await _requestProvider.GetAsync>(uri, token); - - return cardTypes; - } - catch - { - return new ObservableCollection(); - } - } - public BasketCheckout MapOrderToBasket(Models.Orders.Order order) { return new BasketCheckout() diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/User/UserService.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/User/UserService.cs index 87d41bd11..d2e9728cc 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/User/UserService.cs +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/User/UserService.cs @@ -16,7 +16,6 @@ namespace eShopOnContainers.Core.Services.User public async Task GetUserInfoAsync(string authToken) { - UriBuilder builder = new UriBuilder(GlobalSetting.Instance.UserInfoEndpoint); string uri = builder.ToString(); @@ -25,7 +24,6 @@ namespace eShopOnContainers.Core.Services.User await _requestProvider.GetAsync(uri, authToken); return userInfo; - } } } \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/CampaignDetailsViewModel.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/CampaignDetailsViewModel.cs index 95e614bc6..4a74187ee 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/CampaignDetailsViewModel.cs +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/CampaignDetailsViewModel.cs @@ -1,13 +1,13 @@ -namespace eShopOnContainers.Core.ViewModels +using System.Threading.Tasks; +using System.Windows.Input; +using Xamarin.Forms; +using eShopOnContainers.Core.ViewModels.Base; +using eShopOnContainers.Core.Helpers; +using eShopOnContainers.Core.Models.Marketing; +using eShopOnContainers.Core.Services.Marketing; + +namespace eShopOnContainers.Core.ViewModels { - using System.Threading.Tasks; - using Helpers; - using Models.Marketing; - using Services.Marketing; - using Base; - using System.Windows.Input; - using Xamarin.Forms; - public class CampaignDetailsViewModel : ViewModelBase { private CampaignItem _campaign; @@ -46,9 +46,9 @@ IsBusy = true; // Get campaign by id - Campaign = await _campaignService.GetCampaignByIdAsync((int) navigationData, Settings.AuthAccessToken); + Campaign = await _campaignService.GetCampaignByIdAsync((int)navigationData, Settings.AuthAccessToken); - IsBusy = false; + IsBusy = false; } } diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/CampaignViewModel.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/CampaignViewModel.cs index 4127213d4..9351ec414 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/CampaignViewModel.cs +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/CampaignViewModel.cs @@ -1,14 +1,14 @@ -namespace eShopOnContainers.Core.ViewModels +using System.Threading.Tasks; +using System.Windows.Input; +using Xamarin.Forms; +using System.Collections.ObjectModel; +using eShopOnContainers.Core.Models.Marketing; +using eShopOnContainers.Core.Services.Marketing; +using eShopOnContainers.Core.ViewModels.Base; +using eShopOnContainers.Core.Helpers; + +namespace eShopOnContainers.Core.ViewModels { - using System.Threading.Tasks; - using System.Windows.Input; - using Xamarin.Forms; - using System.Collections.ObjectModel; - using Models.Marketing; - using Services.Marketing; - using Base; - using Helpers; - public class CampaignViewModel : ViewModelBase { private ObservableCollection _campaigns; @@ -29,7 +29,7 @@ } } - public ICommand GetCampaignDetailsCommand => new Command(async (item) => await GetCampaignDetails(item)); + public ICommand GetCampaignDetailsCommand => new Command(async (item) => await GetCampaignDetailsAsync(item)); public override async Task InitializeAsync(object navigationData) { @@ -41,7 +41,7 @@ IsBusy = false; } - private async Task GetCampaignDetails(CampaignItem campaign) + private async Task GetCampaignDetailsAsync(CampaignItem campaign) { await NavigationService.NavigateToAsync(campaign.Id); } diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/CheckoutViewModel.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/CheckoutViewModel.cs index a358f94d3..700fd8b53 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/CheckoutViewModel.cs +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/CheckoutViewModel.cs @@ -122,6 +122,16 @@ namespace eShopOnContainers.Core.ViewModels Total = CalculateTotal(CreateOrderItems(orderItems)) }; + if (Settings.UseMocks) + { + // Get number of orders + var orders = await _orderService.GetOrdersAsync(authToken); + + // Create the OrderNumber + Order.OrderNumber = orders.Count + 1; + RaisePropertyChanged(() => Order); + } + IsBusy = false; } } @@ -138,6 +148,11 @@ namespace eShopOnContainers.Core.ViewModels // Create basket checkout await _basketService.CheckoutAsync(basket, authToken); + if (Settings.UseMocks) + { + await _orderService.CreateOrderAsync(Order, authToken); + } + // Clean Basket await _basketService.ClearBasketAsync(_shippingAddress.Id.ToString(), authToken); diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/CampaignDetailsView.xaml b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/CampaignDetailsView.xaml index e5e96bbff..5fcf15ddb 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/CampaignDetailsView.xaml +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/CampaignDetailsView.xaml @@ -150,7 +150,7 @@ Style="{StaticResource CampaignAvailabilityDescriptionStyle}"/> - - @@ -234,6 +232,7 @@ + @@ -260,6 +259,12 @@ Designer + + + + + + @@ -273,9 +278,6 @@ - - - @@ -285,15 +287,6 @@ - - - - - - - - - @@ -380,7 +373,7 @@ - {67f9d3a8-f71e-4428-913f-c37ae82cdb24} + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01} eShopOnContainers.Core diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/Resources/Resource.Designer.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/Resources/Resource.Designer.cs index eaa53c623..48bbb9b82 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/Resources/Resource.Designer.cs +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/Resources/Resource.Designer.cs @@ -1,15 +1,15 @@ #pragma warning disable 1591 -// ------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Mono Runtime Version: 4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +// +// Este código fue generado por una herramienta. +// Versión de runtime:4.0.30319.42000 +// +// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si +// se vuelve a generar el código. +// +//------------------------------------------------------------------------------ -[assembly: Android.Runtime.ResourceDesignerAttribute("eShopOnContainers.TestRunner.Droid.Resource", IsApplication=true)] +[assembly: global::Android.Runtime.ResourceDesignerAttribute("eShopOnContainers.TestRunner.Droid.Resource", IsApplication=true)] namespace eShopOnContainers.TestRunner.Droid { @@ -4297,8 +4297,7 @@ namespace eShopOnContainers.TestRunner.Droid public partial class Styleable { - public static int[] ActionBar = new int[] - { + public static int[] ActionBar = new int[] { 2130772007, 2130772009, 2130772010, @@ -4408,15 +4407,13 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 5 public const int ActionBar_titleTextStyle = 5; - public static int[] ActionBarLayout = new int[] - { + public static int[] ActionBarLayout = new int[] { 16842931}; // aapt resource value: 0 public const int ActionBarLayout_android_layout_gravity = 0; - public static int[] ActionMenuItemView = new int[] - { + public static int[] ActionMenuItemView = new int[] { 16843071}; // aapt resource value: 0 @@ -4424,8 +4421,7 @@ namespace eShopOnContainers.TestRunner.Droid public static int[] ActionMenuView; - public static int[] ActionMode = new int[] - { + public static int[] ActionMode = new int[] { 2130772007, 2130772013, 2130772014, @@ -4451,8 +4447,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 1 public const int ActionMode_titleTextStyle = 1; - public static int[] ActivityChooserView = new int[] - { + public static int[] ActivityChooserView = new int[] { 2130772035, 2130772036}; @@ -4462,8 +4457,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 0 public const int ActivityChooserView_initialActivityCount = 0; - public static int[] AlertDialog = new int[] - { + public static int[] AlertDialog = new int[] { 16842994, 2130772037, 2130772038, @@ -4489,8 +4483,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 4 public const int AlertDialog_singleChoiceItemLayout = 4; - public static int[] AppBarLayout = new int[] - { + public static int[] AppBarLayout = new int[] { 16842964, 2130772032, 2130772215}; @@ -4504,8 +4497,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int AppBarLayout_expanded = 2; - public static int[] AppBarLayout_LayoutParams = new int[] - { + public static int[] AppBarLayout_LayoutParams = new int[] { 2130772216, 2130772217}; @@ -4515,8 +4507,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 1 public const int AppBarLayout_LayoutParams_layout_scrollInterpolator = 1; - public static int[] AppCompatImageView = new int[] - { + public static int[] AppCompatImageView = new int[] { 16843033, 2130772042}; @@ -4526,8 +4517,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 1 public const int AppCompatImageView_srcCompat = 1; - public static int[] AppCompatTextView = new int[] - { + public static int[] AppCompatTextView = new int[] { 16842804, 2130772043}; @@ -4537,8 +4527,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 1 public const int AppCompatTextView_textAllCaps = 1; - public static int[] AppCompatTheme = new int[] - { + public static int[] AppCompatTheme = new int[] { 16842839, 16842926, 2130772044, @@ -4988,8 +4977,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 3 public const int AppCompatTheme_windowNoTitle = 3; - public static int[] BottomSheetBehavior_Params = new int[] - { + public static int[] BottomSheetBehavior_Params = new int[] { 2130772218, 2130772219}; @@ -4999,15 +4987,13 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 0 public const int BottomSheetBehavior_Params_behavior_peekHeight = 0; - public static int[] ButtonBarLayout = new int[] - { + public static int[] ButtonBarLayout = new int[] { 2130772154}; // aapt resource value: 0 public const int ButtonBarLayout_allowStacking = 0; - public static int[] CardView = new int[] - { + public static int[] CardView = new int[] { 16843071, 16843072, 2130771995, @@ -5061,8 +5047,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 11 public const int CardView_contentPaddingTop = 11; - public static int[] CollapsingAppBarLayout_LayoutParams = new int[] - { + public static int[] CollapsingAppBarLayout_LayoutParams = new int[] { 2130772220, 2130772221}; @@ -5072,8 +5057,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 1 public const int CollapsingAppBarLayout_LayoutParams_layout_collapseParallaxMultiplier = 1; - public static int[] CollapsingToolbarLayout = new int[] - { + public static int[] CollapsingToolbarLayout = new int[] { 2130772009, 2130772222, 2130772223, @@ -5131,8 +5115,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 10 public const int CollapsingToolbarLayout_toolbarId = 10; - public static int[] CompoundButton = new int[] - { + public static int[] CompoundButton = new int[] { 16843015, 2130772155, 2130772156}; @@ -5146,8 +5129,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int CompoundButton_buttonTintMode = 2; - public static int[] CoordinatorLayout = new int[] - { + public static int[] CoordinatorLayout = new int[] { 2130772235, 2130772236}; @@ -5157,8 +5139,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 1 public const int CoordinatorLayout_statusBarBackground = 1; - public static int[] CoordinatorLayout_LayoutParams = new int[] - { + public static int[] CoordinatorLayout_LayoutParams = new int[] { 16842931, 2130772237, 2130772238, @@ -5180,8 +5161,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 3 public const int CoordinatorLayout_LayoutParams_layout_keyline = 3; - public static int[] DesignTheme = new int[] - { + public static int[] DesignTheme = new int[] { 2130772241, 2130772242, 2130772243}; @@ -5195,8 +5175,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int DesignTheme_textColorError = 2; - public static int[] DrawerArrowToggle = new int[] - { + public static int[] DrawerArrowToggle = new int[] { 2130772157, 2130772158, 2130772159, @@ -5230,8 +5209,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 7 public const int DrawerArrowToggle_thickness = 7; - public static int[] FloatingActionButton = new int[] - { + public static int[] FloatingActionButton = new int[] { 2130772032, 2130772213, 2130772214, @@ -5265,8 +5243,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 7 public const int FloatingActionButton_useCompatPadding = 7; - public static int[] ForegroundLinearLayout = new int[] - { + public static int[] ForegroundLinearLayout = new int[] { 16843017, 16843264, 2130772249}; @@ -5280,8 +5257,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int ForegroundLinearLayout_foregroundInsidePadding = 2; - public static int[] LinearLayoutCompat = new int[] - { + public static int[] LinearLayoutCompat = new int[] { 16842927, 16842948, 16843046, @@ -5319,8 +5295,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 7 public const int LinearLayoutCompat_showDividers = 7; - public static int[] LinearLayoutCompat_Layout = new int[] - { + public static int[] LinearLayoutCompat_Layout = new int[] { 16842931, 16842996, 16842997, @@ -5338,8 +5313,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 1 public const int LinearLayoutCompat_Layout_android_layout_width = 1; - public static int[] ListPopupWindow = new int[] - { + public static int[] ListPopupWindow = new int[] { 16843436, 16843437}; @@ -5349,8 +5323,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 1 public const int ListPopupWindow_android_dropDownVerticalOffset = 1; - public static int[] MediaRouteButton = new int[] - { + public static int[] MediaRouteButton = new int[] { 16843071, 16843072, 2130771994}; @@ -5364,8 +5337,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int MediaRouteButton_externalRouteEnabledDrawable = 2; - public static int[] MenuGroup = new int[] - { + public static int[] MenuGroup = new int[] { 16842766, 16842960, 16843156, @@ -5391,8 +5363,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int MenuGroup_android_visible = 2; - public static int[] MenuItem = new int[] - { + public static int[] MenuItem = new int[] { 16842754, 16842766, 16842960, @@ -5462,8 +5433,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 13 public const int MenuItem_showAsAction = 13; - public static int[] MenuView = new int[] - { + public static int[] MenuView = new int[] { 16842926, 16843052, 16843053, @@ -5497,8 +5467,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 7 public const int MenuView_preserveIconSpacing = 7; - public static int[] NavigationView = new int[] - { + public static int[] NavigationView = new int[] { 16842964, 16842973, 16843039, @@ -5540,8 +5509,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 4 public const int NavigationView_menu = 4; - public static int[] PopupWindow = new int[] - { + public static int[] PopupWindow = new int[] { 16843126, 2130772173}; @@ -5551,15 +5519,13 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 1 public const int PopupWindow_overlapAnchor = 1; - public static int[] PopupWindowBackgroundState = new int[] - { + public static int[] PopupWindowBackgroundState = new int[] { 2130772174}; // aapt resource value: 0 public const int PopupWindowBackgroundState_state_above_anchor = 0; - public static int[] ProgressWheel = new int[] - { + public static int[] ProgressWheel = new int[] { 2130772284, 2130772285, 2130772286, @@ -5609,8 +5575,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int ProgressWheel_ahTextSize = 2; - public static int[] RecyclerView = new int[] - { + public static int[] RecyclerView = new int[] { 16842948, 2130771968, 2130771969, @@ -5632,22 +5597,19 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 4 public const int RecyclerView_stackFromEnd = 4; - public static int[] ScrimInsetsFrameLayout = new int[] - { + public static int[] ScrimInsetsFrameLayout = new int[] { 2130772256}; // aapt resource value: 0 public const int ScrimInsetsFrameLayout_insetForeground = 0; - public static int[] ScrollingViewBehavior_Params = new int[] - { + public static int[] ScrollingViewBehavior_Params = new int[] { 2130772257}; // aapt resource value: 0 public const int ScrollingViewBehavior_Params_behavior_overlapTop = 0; - public static int[] SearchView = new int[] - { + public static int[] SearchView = new int[] { 16842970, 16843039, 16843296, @@ -5717,8 +5679,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 12 public const int SearchView_voiceIcon = 12; - public static int[] SnackbarLayout = new int[] - { + public static int[] SnackbarLayout = new int[] { 16843039, 2130772032, 2130772258}; @@ -5732,8 +5693,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int SnackbarLayout_maxActionInlineWidth = 2; - public static int[] Spinner = new int[] - { + public static int[] Spinner = new int[] { 16842930, 16843126, 16843131, @@ -5755,8 +5715,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 4 public const int Spinner_popupTheme = 4; - public static int[] SwitchCompat = new int[] - { + public static int[] SwitchCompat = new int[] { 16843044, 16843045, 16843074, @@ -5798,8 +5757,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 3 public const int SwitchCompat_track = 3; - public static int[] TabItem = new int[] - { + public static int[] TabItem = new int[] { 16842754, 16842994, 16843087}; @@ -5813,8 +5771,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int TabItem_android_text = 2; - public static int[] TabLayout = new int[] - { + public static int[] TabLayout = new int[] { 2130772259, 2130772260, 2130772261, @@ -5880,8 +5837,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 9 public const int TabLayout_tabTextColor = 9; - public static int[] TextAppearance = new int[] - { + public static int[] TextAppearance = new int[] { 16842901, 16842902, 16842903, @@ -5919,8 +5875,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 8 public const int TextAppearance_textAllCaps = 8; - public static int[] TextInputLayout = new int[] - { + public static int[] TextInputLayout = new int[] { 16842906, 16843088, 2130772275, @@ -5966,8 +5921,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int TextInputLayout_hintTextAppearance = 2; - public static int[] Toolbar = new int[] - { + public static int[] Toolbar = new int[] { 16842927, 16843072, 2130772009, @@ -6069,8 +6023,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 23 public const int Toolbar_titleTextColor = 23; - public static int[] View = new int[] - { + public static int[] View = new int[] { 16842752, 16842970, 2130772210, @@ -6092,8 +6045,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 4 public const int View_theme = 4; - public static int[] ViewBackgroundHelper = new int[] - { + public static int[] ViewBackgroundHelper = new int[] { 16842964, 2130772213, 2130772214}; @@ -6107,8 +6059,7 @@ namespace eShopOnContainers.TestRunner.Droid // aapt resource value: 2 public const int ViewBackgroundHelper_backgroundTintMode = 2; - public static int[] ViewStubCompat = new int[] - { + public static int[] ViewStubCompat = new int[] { 16842960, 16842994, 16842995}; diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Windows/eShopOnContainers.TestRunner.Windows.csproj b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Windows/eShopOnContainers.TestRunner.Windows.csproj index 61229f89a..2496f8b50 100755 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Windows/eShopOnContainers.TestRunner.Windows.csproj +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Windows/eShopOnContainers.TestRunner.Windows.csproj @@ -11,7 +11,7 @@ eShopOnContainers.TestRunner.Windows en-US UAP - 10.0.14393.0 + 10.0.10586.0 10.0.10586.0 14 512 diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Windows/project.json b/src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Windows/project.json old mode 100755 new mode 100644 diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/eShopOnContainers.UnitTests.csproj b/src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/eShopOnContainers.UnitTests.csproj index fd8c23eca..e69a6340b 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/eShopOnContainers.UnitTests.csproj +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/eShopOnContainers.UnitTests.csproj @@ -1,18 +1,14 @@ - - - + + - 10.0 Debug AnyCPU - {F7B6A162-BC4D-4924-B16A-713F9B0344E7} + {6E4285E7-7611-4440-A1B5-3513EBB13807} + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + true Library - Properties eShopOnContainers.UnitTests eShopOnContainers.UnitTests - es-ES - 512 - {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} v4.5 Profile111 @@ -20,52 +16,46 @@ true full false - bin\Debug\ - DEBUG;TRACE + bin\Debug + DEBUG; prompt 4 - pdbonly true - bin\Release\ - TRACE + bin\Release prompt 4 - - - - + + + + - + - + + + + + + - {67f9d3a8-f71e-4428-913f-c37ae82cdb24} + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01} eShopOnContainers.Core - - - \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/LockScreenLogo.scale-200.png b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/LockScreenLogo.scale-200.png index 735f57adb..08838125d 100644 Binary files a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/LockScreenLogo.scale-200.png and b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/LockScreenLogo.scale-200.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/Square44x44Logo.targetsize-24_altform-unplated.png index f6c02ce97..10deee109 100644 Binary files a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/Square44x44Logo.targetsize-24_altform-unplated.png and b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/StoreLogo.png b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/StoreLogo.png index 7385b56c0..fb2f313c1 100644 Binary files a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/StoreLogo.png and b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/StoreLogo.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/menu_campaigns.png b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/menu_campaigns.png new file mode 100644 index 000000000..a4761bd04 Binary files /dev/null and b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/Assets/menu_campaigns.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/eShopOnContainers.Windows.csproj b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/eShopOnContainers.Windows.csproj index 342acf6b2..687999d99 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/eShopOnContainers.Windows.csproj +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/eShopOnContainers.Windows.csproj @@ -141,6 +141,7 @@ + diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Info.plist b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Info.plist index fb995405e..588aafed9 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Info.plist +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Info.plist @@ -20,7 +20,7 @@ UIInterfaceOrientationLandscapeRight MinimumOSVersion - 6.0 + 9.0 CFBundleDisplayName eShopOnContainers CFBundleIdentifier diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/LaunchScreen.storyboard b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/LaunchScreen.storyboard index 2a0cc5633..b071203b7 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/LaunchScreen.storyboard +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/LaunchScreen.storyboard @@ -1,7 +1,8 @@ - - + + - + + @@ -16,12 +17,12 @@ - + - + @@ -34,22 +35,30 @@ + - - + + - + - - + - + + + + + + + + + \ No newline at end of file diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/menu_campaigns.png b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/menu_campaigns.png new file mode 100644 index 000000000..1e21d4fd0 Binary files /dev/null and b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/menu_campaigns.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/menu_campaigns@2x.png b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/menu_campaigns@2x.png new file mode 100644 index 000000000..2f61741a8 Binary files /dev/null and b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/menu_campaigns@2x.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/menu_campaigns@3x.png b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/menu_campaigns@3x.png new file mode 100644 index 000000000..2f37f30de Binary files /dev/null and b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Resources/menu_campaigns@3x.png differ diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/eShopOnContainers.iOS.csproj b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/eShopOnContainers.iOS.csproj index 205112e74..9387a3213 100644 --- a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/eShopOnContainers.iOS.csproj +++ b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/eShopOnContainers.iOS.csproj @@ -124,6 +124,9 @@ + + + @@ -423,7 +426,7 @@ - {67f9d3a8-f71e-4428-913f-c37ae82cdb24} + {BA96A12C-4EE3-46C4-BB3F-F811B554CD01} eShopOnContainers.Core diff --git a/src/Services/Basket/Basket.API/Basket.API.csproj b/src/Services/Basket/Basket.API/Basket.API.csproj index a6b95198a..48d32de2a 100644 --- a/src/Services/Basket/Basket.API/Basket.API.csproj +++ b/src/Services/Basket/Basket.API/Basket.API.csproj @@ -1,10 +1,8 @@  - netcoreapp1.1 - 1.1.2 - Exe - $(PackageTargetFallback);netstandard1.6.1;dnxcore50;portable-net451+win8 + netcoreapp2.0 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; ..\..\..\..\docker-compose.dcproj @@ -18,23 +16,13 @@ - - + + + + + + - - - - - - - - - - - - - - diff --git a/src/Services/Basket/Basket.API/Controllers/BasketController.cs b/src/Services/Basket/Basket.API/Controllers/BasketController.cs index 9219cfad3..18a3b221d 100644 --- a/src/Services/Basket/Basket.API/Controllers/BasketController.cs +++ b/src/Services/Basket/Basket.API/Controllers/BasketController.cs @@ -1,15 +1,13 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.eShopOnContainers.Services.Basket.API.Model; +using Basket.API.IntegrationEvents.Events; +using Basket.API.Model; using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; -using Basket.API.IntegrationEvents.Events; +using Microsoft.eShopOnContainers.Services.Basket.API.Model; using Microsoft.eShopOnContainers.Services.Basket.API.Services; -using Basket.API.Model; +using System; +using System.Net; +using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers { @@ -21,7 +19,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers private readonly IIdentityService _identitySvc; private readonly IEventBus _eventBus; - public BasketController(IBasketRepository repository, + public BasketController(IBasketRepository repository, IIdentityService identityService, IEventBus eventBus) { @@ -29,8 +27,10 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers _identitySvc = identityService; _eventBus = eventBus; } + // GET /id [HttpGet("{id}")] + [ProducesResponseType(typeof(CustomerBasket), (int)HttpStatusCode.OK)] public async Task Get(string id) { var basket = await _repository.GetBasketAsync(id); @@ -40,6 +40,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers // POST /value [HttpPost] + [ProducesResponseType(typeof(CustomerBasket), (int)HttpStatusCode.OK)] public async Task Post([FromBody]CustomerBasket value) { var basket = await _repository.UpdateBasketAsync(value); @@ -49,6 +50,8 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers [Route("checkout")] [HttpPost] + [ProducesResponseType((int)HttpStatusCode.Accepted)] + [ProducesResponseType((int)HttpStatusCode.BadRequest)] public async Task Checkout([FromBody]BasketCheckout basketCheckout, [FromHeader(Name = "x-requestid")] string requestId) { var userId = _identitySvc.GetUserIdentity(); diff --git a/src/Services/Basket/Basket.API/Dockerfile b/src/Services/Basket/Basket.API/Dockerfile index c81c776b0..2e7395520 100644 --- a/src/Services/Basket/Basket.API/Dockerfile +++ b/src/Services/Basket/Basket.API/Dockerfile @@ -1,4 +1,4 @@ -FROM microsoft/aspnetcore:1.1.2 +FROM microsoft/aspnetcore:2.0 ARG source WORKDIR /app EXPOSE 80 diff --git a/src/Services/Basket/Basket.API/Dockerfile.nanowin b/src/Services/Basket/Basket.API/Dockerfile.nanowin deleted file mode 100644 index 9c664f4e4..000000000 --- a/src/Services/Basket/Basket.API/Dockerfile.nanowin +++ /dev/null @@ -1,8 +0,0 @@ -FROM microsoft/dotnet:1.1-runtime-nanoserver -SHELL ["powershell"] -ARG source -WORKDIR /app -RUN set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord -EXPOSE 80 -COPY ${source:-obj/Docker/publish} . -ENTRYPOINT ["dotnet", "Basket.API.dll"] diff --git a/src/Services/Basket/Basket.API/Infrastructure/Exceptions/BasketDomainException.cs b/src/Services/Basket/Basket.API/Infrastructure/Exceptions/BasketDomainException.cs index 199409ecc..e0f2df6fa 100644 --- a/src/Services/Basket/Basket.API/Infrastructure/Exceptions/BasketDomainException.cs +++ b/src/Services/Basket/Basket.API/Infrastructure/Exceptions/BasketDomainException.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Basket.API.Infrastructure.Exceptions { diff --git a/src/Services/Basket/Basket.API/Infrastructure/Exceptions/FailingMiddlewareAppBuilderExtensions.cs b/src/Services/Basket/Basket.API/Infrastructure/Exceptions/FailingMiddlewareAppBuilderExtensions.cs index 935bb79a8..a09f32f76 100644 --- a/src/Services/Basket/Basket.API/Infrastructure/Exceptions/FailingMiddlewareAppBuilderExtensions.cs +++ b/src/Services/Basket/Basket.API/Infrastructure/Exceptions/FailingMiddlewareAppBuilderExtensions.cs @@ -1,8 +1,5 @@ using Microsoft.AspNetCore.Builder; using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Basket.API.Infrastructure.Middlewares { diff --git a/src/Services/Basket/Basket.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs b/src/Services/Basket/Basket.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs index f27a3c209..7caa9740d 100644 --- a/src/Services/Basket/Basket.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs +++ b/src/Services/Basket/Basket.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs @@ -1,10 +1,8 @@ using Microsoft.AspNetCore.Authorization; using Swashbuckle.AspNetCore.Swagger; using Swashbuckle.AspNetCore.SwaggerGen; -using System; using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; namespace Basket.API.Infrastructure.Filters { diff --git a/src/Services/Basket/Basket.API/Infrastructure/Filters/ValidateModelStateFilter.cs b/src/Services/Basket/Basket.API/Infrastructure/Filters/ValidateModelStateFilter.cs index 8ef72edb6..3e4c3e072 100644 --- a/src/Services/Basket/Basket.API/Infrastructure/Filters/ValidateModelStateFilter.cs +++ b/src/Services/Basket/Basket.API/Infrastructure/Filters/ValidateModelStateFilter.cs @@ -1,6 +1,6 @@ -using System.Linq; -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; +using System.Linq; namespace Basket.API.Infrastructure.Filters { diff --git a/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs new file mode 100644 index 000000000..dfe690f6f --- /dev/null +++ b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs @@ -0,0 +1,79 @@ +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.Primitives; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Claims; +using System.Threading.Tasks; + +namespace Basket.API.Infrastructure.Middlewares +{ + class ByPassAuthMiddleware + { + private readonly RequestDelegate _next; + private string _currentUserId; + public ByPassAuthMiddleware(RequestDelegate next) + { + _next = next; + _currentUserId = null; + } + + + public async Task Invoke(HttpContext context) + { + var path = context.Request.Path; + if (path == "/noauth") + { + var userid = context.Request.Query["userid"]; + if (!string.IsNullOrEmpty(userid)) + { + _currentUserId = userid; + } + context.Response.StatusCode = 200; + context.Response.ContentType = "text/string"; + await context.Response.WriteAsync($"User set to {_currentUserId}"); + } + + else if (path == "/noauth/reset") + { + _currentUserId = null; + context.Response.StatusCode = 200; + context.Response.ContentType = "text/string"; + await context.Response.WriteAsync($"User set to none. Token required for protected endpoints."); + } + else + { + var currentUserId = _currentUserId; + + var authHeader = context.Request.Headers["Authorization"]; + if (authHeader != StringValues.Empty) + { + var header = authHeader.FirstOrDefault(); + if (!string.IsNullOrEmpty(header) && header.StartsWith("Email ") && header.Length > "Email ".Length) + { + currentUserId = header.Substring("Email ".Length); + } + } + + + if (!string.IsNullOrEmpty(currentUserId)) + { + var user = new ClaimsIdentity(new[] { + new Claim("emails", currentUserId), + new Claim("name", "Test user"), + new Claim("nonce", Guid.NewGuid().ToString()), + new Claim("ttp://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), + new Claim("nonce", Guid.NewGuid().ToString()), + new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"), + new Claim("sub", "1234"), + new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")} + , "ByPassAuth"); + + context.User = new ClaimsPrincipal(user); + } + + await _next.Invoke(context); + } + } + } +} diff --git a/src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingMiddleware.cs b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingMiddleware.cs index 05acd0d2c..875749b5f 100644 --- a/src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingMiddleware.cs +++ b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingMiddleware.cs @@ -1,6 +1,5 @@ using Microsoft.AspNetCore.Http; using System; -using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; diff --git a/src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingOptions.cs b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingOptions.cs index b31207e00..45989832c 100644 --- a/src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingOptions.cs +++ b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/FailingOptions.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using System.Collections.Generic; namespace Basket.API.Infrastructure.Middlewares { diff --git a/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/OrderStartedIntegrationEventHandler.cs b/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/OrderStartedIntegrationEventHandler.cs index f6e7de1b0..19ae1b594 100644 --- a/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/OrderStartedIntegrationEventHandler.cs +++ b/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/OrderStartedIntegrationEventHandler.cs @@ -1,6 +1,5 @@ using Basket.API.IntegrationEvents.Events; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; -using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; using Microsoft.eShopOnContainers.Services.Basket.API.Model; using System; using System.Threading.Tasks; diff --git a/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs b/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs index 88244404a..76a78bad7 100644 --- a/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs +++ b/src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs @@ -18,7 +18,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.Even public async Task Handle(ProductPriceChangedIntegrationEvent @event) { - var userIds = await _repository.GetUsersAsync(); + var userIds = _repository.GetUsers(); foreach (var id in userIds) { diff --git a/src/Services/Basket/Basket.API/IntegrationEvents/Events/UserCheckoutAcceptedIntegrationEvent.cs b/src/Services/Basket/Basket.API/IntegrationEvents/Events/UserCheckoutAcceptedIntegrationEvent.cs index 4c02612c5..e3665451c 100644 --- a/src/Services/Basket/Basket.API/IntegrationEvents/Events/UserCheckoutAcceptedIntegrationEvent.cs +++ b/src/Services/Basket/Basket.API/IntegrationEvents/Events/UserCheckoutAcceptedIntegrationEvent.cs @@ -1,9 +1,6 @@ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; using Microsoft.eShopOnContainers.Services.Basket.API.Model; using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Basket.API.IntegrationEvents.Events { diff --git a/src/Services/Basket/Basket.API/Model/BasketCheckout.cs b/src/Services/Basket/Basket.API/Model/BasketCheckout.cs index 5241a3672..410700773 100644 --- a/src/Services/Basket/Basket.API/Model/BasketCheckout.cs +++ b/src/Services/Basket/Basket.API/Model/BasketCheckout.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Basket.API.Model { diff --git a/src/Services/Basket/Basket.API/Model/Basket.cs b/src/Services/Basket/Basket.API/Model/CustomerBasket.cs similarity index 100% rename from src/Services/Basket/Basket.API/Model/Basket.cs rename to src/Services/Basket/Basket.API/Model/CustomerBasket.cs diff --git a/src/Services/Basket/Basket.API/Model/IBasketRepository.cs b/src/Services/Basket/Basket.API/Model/IBasketRepository.cs index fcdc69faa..850b5b637 100644 --- a/src/Services/Basket/Basket.API/Model/IBasketRepository.cs +++ b/src/Services/Basket/Basket.API/Model/IBasketRepository.cs @@ -6,7 +6,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Model public interface IBasketRepository { Task GetBasketAsync(string customerId); - Task> GetUsersAsync(); + IEnumerable GetUsers(); Task UpdateBasketAsync(CustomerBasket basket); Task DeleteBasketAsync(string id); } diff --git a/src/Services/Basket/Basket.API/Model/RedisBasketRepository.cs b/src/Services/Basket/Basket.API/Model/RedisBasketRepository.cs index e896c0773..f748d2c25 100644 --- a/src/Services/Basket/Basket.API/Model/RedisBasketRepository.cs +++ b/src/Services/Basket/Basket.API/Model/RedisBasketRepository.cs @@ -1,5 +1,4 @@ using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Options; using Newtonsoft.Json; using StackExchange.Redis; using System.Collections.Generic; @@ -10,40 +9,33 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Model { public class RedisBasketRepository : IBasketRepository { - private ILogger _logger; - private BasketSettings _settings; + private readonly ILogger _logger; - private ConnectionMultiplexer _redis; + private readonly ConnectionMultiplexer _redis; + private readonly IDatabase _database; - public RedisBasketRepository(IOptionsSnapshot options, ILoggerFactory loggerFactory) + public RedisBasketRepository(ILoggerFactory loggerFactory, ConnectionMultiplexer redis) { - _settings = options.Value; _logger = loggerFactory.CreateLogger(); + _redis = redis; + _database = redis.GetDatabase(); } public async Task DeleteBasketAsync(string id) { - var database = await GetDatabase(); - return await database.KeyDeleteAsync(id.ToString()); + return await _database.KeyDeleteAsync(id); } - public async Task> GetUsersAsync() + public IEnumerable GetUsers() { - var server = await GetServer(); - - IEnumerable data = server.Keys(); - if (data == null) - { - return null; - } - return data.Select(k => k.ToString()); + var server = GetServer(); + var data = server.Keys(); + return data?.Select(k => k.ToString()); } public async Task GetBasketAsync(string customerId) { - var database = await GetDatabase(); - - var data = await database.StringGetAsync(customerId.ToString()); + var data = await _database.StringGetAsync(customerId); if (data.IsNullOrEmpty) { return null; @@ -54,9 +46,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Model public async Task UpdateBasketAsync(CustomerBasket basket) { - var database = await GetDatabase(); - - var created = await database.StringSetAsync(basket.BuyerId, JsonConvert.SerializeObject(basket)); + var created = await _database.StringSetAsync(basket.BuyerId, JsonConvert.SerializeObject(basket)); if (!created) { _logger.LogInformation("Problem occur persisting the item."); @@ -68,34 +58,10 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Model return await GetBasketAsync(basket.BuyerId); } - private async Task GetDatabase() - { - if (_redis == null) - { - await ConnectToRedisAsync(); - } - - return _redis.GetDatabase(); - } - - private async Task GetServer() + private IServer GetServer() { - if (_redis == null) - { - await ConnectToRedisAsync(); - } var endpoint = _redis.GetEndPoints(); - return _redis.GetServer(endpoint.First()); } - - private async Task ConnectToRedisAsync() - { - var configuration = ConfigurationOptions.Parse(_settings.ConnectionString, true); - configuration.ResolveDns = true; - - _logger.LogInformation($"Connecting to database {configuration.SslHost}."); - _redis = await ConnectionMultiplexer.ConnectAsync(configuration); - } } } diff --git a/src/Services/Basket/Basket.API/Program.cs b/src/Services/Basket/Basket.API/Program.cs index 7753ef537..19bbf2c24 100644 --- a/src/Services/Basket/Basket.API/Program.cs +++ b/src/Services/Basket/Basket.API/Program.cs @@ -1,7 +1,9 @@ using Basket.API.Infrastructure.Middlewares; +using Microsoft.AspNetCore; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; -using System.Collections.Generic; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; using System.IO; namespace Microsoft.eShopOnContainers.Services.Basket.API @@ -10,19 +12,29 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API { public static void Main(string[] args) { - var host = new WebHostBuilder() - .UseKestrel() + BuildWebHost(args).Run(); + } + + public static IWebHost BuildWebHost(string[] args) => + WebHost.CreateDefaultBuilder(args) .UseFailing(options => { - options.ConfigPath = "/Failing"; + options.ConfigPath = "/Failing"; }) .UseHealthChecks("/hc") .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() .UseStartup() + .ConfigureAppConfiguration((builderContext, config) => + { + config.AddEnvironmentVariables(); + }) + .ConfigureLogging((hostingContext, builder) => + { + builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging")); + builder.AddConsole(); + builder.AddDebug(); + }) + .UseApplicationInsights() .Build(); - - host.Run(); - } } } diff --git a/src/Services/Basket/Basket.API/Services/IIdentityService.cs b/src/Services/Basket/Basket.API/Services/IIdentityService.cs index 8cc7bd848..fe84e23d5 100644 --- a/src/Services/Basket/Basket.API/Services/IIdentityService.cs +++ b/src/Services/Basket/Basket.API/Services/IIdentityService.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Microsoft.eShopOnContainers.Services.Basket.API.Services +namespace Microsoft.eShopOnContainers.Services.Basket.API.Services { public interface IIdentityService { diff --git a/src/Services/Basket/Basket.API/Services/IdentityService.cs b/src/Services/Basket/Basket.API/Services/IdentityService.cs index 08d1ffffa..d187be8d6 100644 --- a/src/Services/Basket/Basket.API/Services/IdentityService.cs +++ b/src/Services/Basket/Basket.API/Services/IdentityService.cs @@ -1,9 +1,6 @@  using Microsoft.AspNetCore.Http; using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.Services.Basket.API.Services { diff --git a/src/Services/Basket/Basket.API/Startup.cs b/src/Services/Basket/Basket.API/Startup.cs index 18e21e209..d1550eec8 100644 --- a/src/Services/Basket/Basket.API/Startup.cs +++ b/src/Services/Basket/Basket.API/Startup.cs @@ -1,15 +1,20 @@ using Autofac; using Autofac.Extensions.DependencyInjection; using Basket.API.Infrastructure.Filters; +using Basket.API.Infrastructure.Middlewares; using Basket.API.IntegrationEvents.EventHandling; using Basket.API.IntegrationEvents.Events; +using Microsoft.ApplicationInsights.Extensibility; +using Microsoft.ApplicationInsights.ServiceFabric; +using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; +using Microsoft.Azure.ServiceBus; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; using Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ; -using Microsoft.eShopOnContainers.Services.Basket.API.Auth.Server; +using Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus; using Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.EventHandling; using Microsoft.eShopOnContainers.Services.Basket.API.IntegrationEvents.Events; using Microsoft.eShopOnContainers.Services.Basket.API.Model; @@ -21,42 +26,39 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using RabbitMQ.Client; using StackExchange.Redis; -using System; -using System.Linq; -using System.Net; -using System.Threading.Tasks; - -using Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus; -using Microsoft.Azure.ServiceBus; using Swashbuckle.AspNetCore.Swagger; +using System; using System.Collections.Generic; +using System.IdentityModel.Tokens.Jwt; +using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.Services.Basket.API { public class Startup { - public Startup(IHostingEnvironment env) + public Startup(IConfiguration configuration) { - var builder = new ConfigurationBuilder() - .SetBasePath(env.ContentRootPath) - .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) - .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) - .AddEnvironmentVariables(); - Configuration = builder.Build(); + Configuration = configuration; } - public IConfigurationRoot Configuration { get; } + public IConfiguration Configuration { get; } + // This method gets called by the runtime. Use this method to add services to the container. public IServiceProvider ConfigureServices(IServiceCollection services) - { + { + RegisterAppInsights(services); + // Add framework services. services.AddMvc(options => { options.Filters.Add(typeof(HttpGlobalExceptionFilter)); options.Filters.Add(typeof(ValidateModelStateFilter)); + }).AddControllersAsServices(); + ConfigureAuthService(services); + services.AddHealthChecks(checks => { checks.AddValueTaskCheck("HTTP Endpoint", () => new ValueTask(HealthCheckResult.Healthy("Ok")), @@ -64,7 +66,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API ); }); - services.Configure(Configuration); + services.Configure(Configuration); //By connecting here we are making sure that our service //cannot start until redis is ready. This might slow down startup, @@ -75,7 +77,8 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API services.AddSingleton(sp => { var settings = sp.GetRequiredService>().Value; - ConfigurationOptions configuration = ConfigurationOptions.Parse(settings.ConnectionString, true); + var configuration = ConfigurationOptions.Parse(settings.ConnectionString, true); + configuration.ResolveDns = true; return ConnectionMultiplexer.Connect(configuration); @@ -105,17 +108,32 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API HostName = Configuration["EventBusConnection"] }; - return new DefaultRabbitMQPersistentConnection(factory, logger); + if (!string.IsNullOrEmpty(Configuration["EventBusUserName"])) + { + factory.UserName = Configuration["EventBusUserName"]; + } + + if (!string.IsNullOrEmpty(Configuration["EventBusPassword"])) + { + factory.Password = Configuration["EventBusPassword"]; + } + + var retryCount = 5; + if (!string.IsNullOrEmpty(Configuration["EventBusRetryCount"])) + { + retryCount = int.Parse(Configuration["EventBusRetryCount"]); + } + + return new DefaultRabbitMQPersistentConnection(factory, logger, retryCount); }); } RegisterEventBus(services); - services.AddSwaggerGen(options => { options.DescribeAllEnumsAsStrings(); - options.SwaggerDoc("v1", new Swashbuckle.AspNetCore.Swagger.Info + options.SwaggerDoc("v1", new Info { Title = "Basket HTTP API", Version = "v1", @@ -154,45 +172,24 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API var container = new ContainerBuilder(); container.Populate(services); - return new AutofacServiceProvider(container.Build()); - } - private void RegisterEventBus(IServiceCollection services) - { - if (Configuration.GetValue("AzureServiceBusEnabled")) - { - services.AddSingleton(sp => - { - var serviceBusPersisterConnection = sp.GetRequiredService(); - var iLifetimeScope = sp.GetRequiredService(); - var logger = sp.GetRequiredService>(); - var eventBusSubcriptionsManager = sp.GetRequiredService(); - var subscriptionClientName = Configuration["SubscriptionClientName"]; - - return new EventBusServiceBus(serviceBusPersisterConnection, logger, - eventBusSubcriptionsManager, subscriptionClientName, iLifetimeScope); - }); - } - else - { - services.AddSingleton(); - } - - services.AddSingleton(); - - services.AddTransient(); - services.AddTransient(); + return new AutofacServiceProvider(container.Build()); } + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { - loggerFactory.AddConsole(Configuration.GetSection("Logging")); - loggerFactory.AddDebug(); - - app.UseStaticFiles(); + loggerFactory.AddAzureWebAppDiagnostics(); + loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace); - // Use frameworks + var pathBase = Configuration["PATH_BASE"]; + if (!string.IsNullOrEmpty(pathBase)) + { + app.UsePathBase(pathBase); + } + + app.UseStaticFiles(); app.UseCors("CorsPolicy"); ConfigureAuth(app); @@ -202,7 +199,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API app.UseSwagger() .UseSwaggerUI(c => { - c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1"); + c.SwaggerEndpoint($"{ (!string.IsNullOrEmpty(pathBase) ? pathBase : string.Empty) }/swagger/v1/swagger.json", "My API V1"); c.ConfigureOAuth2("basketswaggerui", "", "", "Basket Swagger UI"); }); @@ -210,20 +207,99 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API } - protected virtual void ConfigureAuth(IApplicationBuilder app) + private void RegisterAppInsights(IServiceCollection services) + { + services.AddApplicationInsightsTelemetry(Configuration); + var orchestratorType = Configuration.GetValue("OrchestratorType"); + + if (orchestratorType?.ToUpper() == "K8S") + { + // Enable K8s telemetry initializer + services.EnableKubernetes(); + } + if (orchestratorType?.ToUpper() == "SF") + { + // Enable SF telemetry initializer + services.AddSingleton((serviceProvider) => + new FabricTelemetryInitializer()); + } + } + + private void ConfigureAuthService(IServiceCollection services) { - var identityUrl = Configuration.GetValue("IdentityUrl"); - app.UseIdentityServerAuthentication(new IdentityServerAuthenticationOptions + // prevent from mapping "sub" claim to nameidentifier. + JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear(); + + var identityUrl = Configuration.GetValue("IdentityUrl"); + + services.AddAuthentication(options => { - Authority = identityUrl.ToString(), - ApiName = "basket", - RequireHttpsMetadata = false + options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; + options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; + + }).AddJwtBearer(options => + { + options.Authority = identityUrl; + options.RequireHttpsMetadata = false; + options.Audience = "basket"; }); } - protected virtual void ConfigureEventBus(IApplicationBuilder app) + protected virtual void ConfigureAuth(IApplicationBuilder app) + { + if (Configuration.GetValue("UseLoadTest")) + { + app.UseMiddleware(); + } + + app.UseAuthentication(); + } + + private void RegisterEventBus(IServiceCollection services) + { + if (Configuration.GetValue("AzureServiceBusEnabled")) + { + services.AddSingleton(sp => + { + var serviceBusPersisterConnection = sp.GetRequiredService(); + var iLifetimeScope = sp.GetRequiredService(); + var logger = sp.GetRequiredService>(); + var eventBusSubcriptionsManager = sp.GetRequiredService(); + var subscriptionClientName = Configuration["SubscriptionClientName"]; + + return new EventBusServiceBus(serviceBusPersisterConnection, logger, + eventBusSubcriptionsManager, subscriptionClientName, iLifetimeScope); + }); + } + else + { + services.AddSingleton(sp => + { + var rabbitMQPersistentConnection = sp.GetRequiredService(); + var iLifetimeScope = sp.GetRequiredService(); + var logger = sp.GetRequiredService>(); + var eventBusSubcriptionsManager = sp.GetRequiredService(); + + var retryCount = 5; + if (!string.IsNullOrEmpty(Configuration["EventBusRetryCount"])) + { + retryCount = int.Parse(Configuration["EventBusRetryCount"]); + } + + return new EventBusRabbitMQ(rabbitMQPersistentConnection, logger, iLifetimeScope, eventBusSubcriptionsManager, retryCount); + }); + } + + services.AddSingleton(); + + services.AddTransient(); + services.AddTransient(); + } + + private void ConfigureEventBus(IApplicationBuilder app) { var eventBus = app.ApplicationServices.GetRequiredService(); + eventBus.Subscribe(); eventBus.Subscribe(); } diff --git a/src/Services/Basket/Basket.API/appsettings.json b/src/Services/Basket/Basket.API/appsettings.json index f062f76d7..16d56d94d 100644 --- a/src/Services/Basket/Basket.API/appsettings.json +++ b/src/Services/Basket/Basket.API/appsettings.json @@ -10,5 +10,9 @@ "IdentityUrl": "http://localhost:5105", "ConnectionString": "127.0.0.1", "AzureServiceBusEnabled": false, - "SubscriptionClientName": "Basket" + "SubscriptionClientName": "Basket", + "ApplicationInsights": { + "InstrumentationKey": "" + }, + "EventBusRetryCount": 5 } \ No newline at end of file diff --git a/src/Services/Catalog/Catalog.API/Catalog.API.csproj b/src/Services/Catalog/Catalog.API/Catalog.API.csproj index a3c79119a..f5aec67ad 100644 --- a/src/Services/Catalog/Catalog.API/Catalog.API.csproj +++ b/src/Services/Catalog/Catalog.API/Catalog.API.csproj @@ -1,20 +1,20 @@  - netcoreapp1.1 + netcoreapp2.0 portable true Catalog.API - Exe Catalog.API aspnet-Catalog.API-20161122013618 - 1.1.2 - $(PackageTargetFallback);dotnet5.6;portable-net45+win8 ..\..\..\..\docker-compose.dcproj + + Always + PreserveNewest @@ -34,32 +34,18 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + - + @@ -71,6 +57,7 @@ + diff --git a/src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs b/src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs index fe52b9128..1830fd90a 100644 --- a/src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs +++ b/src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs @@ -9,6 +9,7 @@ using Microsoft.Extensions.Options; using System; using System.Collections.Generic; using System.Linq; +using System.Net; using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers @@ -32,6 +33,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers // GET api/v1/[controller]/items[?pageSize=3&pageIndex=10] [HttpGet] [Route("[action]")] + [ProducesResponseType(typeof(PaginatedItemsViewModel), (int)HttpStatusCode.OK)] public async Task Items([FromQuery]int pageSize = 10, [FromQuery]int pageIndex = 0) { @@ -54,6 +56,8 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers [HttpGet] [Route("items/{id:int}")] + [ProducesResponseType((int)HttpStatusCode.NotFound)] + [ProducesResponseType(typeof(CatalogItem),(int)HttpStatusCode.OK)] public async Task GetItemById(int id) { if (id <= 0) @@ -73,6 +77,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers // GET api/v1/[controller]/items/withname/samplename[?pageSize=3&pageIndex=10] [HttpGet] [Route("[action]/withname/{name:minlength(1)}")] + [ProducesResponseType(typeof(PaginatedItemsViewModel), (int)HttpStatusCode.OK)] public async Task Items(string name, [FromQuery]int pageSize = 10, [FromQuery]int pageIndex = 0) { @@ -97,6 +102,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers // GET api/v1/[controller]/items/type/1/brand/null[?pageSize=3&pageIndex=10] [HttpGet] [Route("[action]/type/{catalogTypeId}/brand/{catalogBrandId}")] + [ProducesResponseType(typeof(PaginatedItemsViewModel), (int)HttpStatusCode.OK)] public async Task Items(int? catalogTypeId, int? catalogBrandId, [FromQuery]int pageSize = 10, [FromQuery]int pageIndex = 0) { var root = (IQueryable)_catalogContext.CatalogItems; @@ -130,6 +136,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers // GET api/v1/[controller]/CatalogTypes [HttpGet] [Route("[action]")] + [ProducesResponseType(typeof(List), (int)HttpStatusCode.OK)] public async Task CatalogTypes() { var items = await _catalogContext.CatalogTypes @@ -141,6 +148,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers // GET api/v1/[controller]/CatalogBrands [HttpGet] [Route("[action]")] + [ProducesResponseType(typeof(List), (int)HttpStatusCode.OK)] public async Task CatalogBrands() { var items = await _catalogContext.CatalogBrands @@ -152,6 +160,8 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers //PUT api/v1/[controller]/items [Route("items")] [HttpPut] + [ProducesResponseType((int)HttpStatusCode.NotFound)] + [ProducesResponseType((int)HttpStatusCode.Created)] public async Task UpdateProduct([FromBody]CatalogItem productToUpdate) { var catalogItem = await _catalogContext.CatalogItems @@ -192,6 +202,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers //POST api/v1/[controller]/items [Route("items")] [HttpPost] + [ProducesResponseType((int)HttpStatusCode.Created)] public async Task CreateProduct([FromBody]CatalogItem product) { var item = new CatalogItem @@ -213,6 +224,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers //DELETE api/v1/[controller]/id [Route("{id}")] [HttpDelete] + [ProducesResponseType((int)HttpStatusCode.NoContent)] public async Task DeleteProduct(int id) { var product = _catalogContext.CatalogItems.SingleOrDefault(x => x.Id == id); diff --git a/src/Services/Catalog/Catalog.API/Controllers/PicController.cs b/src/Services/Catalog/Catalog.API/Controllers/PicController.cs index 7043ce9f7..f8e986e50 100644 --- a/src/Services/Catalog/Catalog.API/Controllers/PicController.cs +++ b/src/Services/Catalog/Catalog.API/Controllers/PicController.cs @@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure; using System.IO; +using System.Net; using System.Threading.Tasks; // For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860 @@ -23,6 +24,8 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers [HttpGet] [Route("api/v1/catalog/items/{catalogItemId:int}/pic")] + [ProducesResponseType((int)HttpStatusCode.NotFound)] + [ProducesResponseType((int)HttpStatusCode.BadRequest)] // GET: // public async Task GetImage(int catalogItemId) { diff --git a/src/Services/Catalog/Catalog.API/Dockerfile b/src/Services/Catalog/Catalog.API/Dockerfile index 61c8e8839..0f5d934d2 100644 --- a/src/Services/Catalog/Catalog.API/Dockerfile +++ b/src/Services/Catalog/Catalog.API/Dockerfile @@ -1,4 +1,4 @@ -FROM microsoft/aspnetcore:1.1.2 +FROM microsoft/aspnetcore:2.0 ARG source WORKDIR /app EXPOSE 80 diff --git a/src/Services/Catalog/Catalog.API/Dockerfile.nanowin b/src/Services/Catalog/Catalog.API/Dockerfile.nanowin deleted file mode 100644 index 193ddaef6..000000000 --- a/src/Services/Catalog/Catalog.API/Dockerfile.nanowin +++ /dev/null @@ -1,8 +0,0 @@ -FROM microsoft/dotnet:1.1-runtime-nanoserver -SHELL ["powershell"] -ARG source -WORKDIR /app -RUN set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord -EXPOSE 80 -COPY ${source:-obj/Docker/publish} . -ENTRYPOINT ["dotnet", "Catalog.API.dll"] diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContext.cs b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContext.cs index f58541b62..8cff66b08 100644 --- a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContext.cs +++ b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContext.cs @@ -1,9 +1,9 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure { - using EntityFrameworkCore.Metadata.Builders; using Microsoft.EntityFrameworkCore; + using EntityConfigurations; using Model; - using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF; + using Microsoft.EntityFrameworkCore.Design; public class CatalogContext : DbContext { @@ -16,68 +16,21 @@ protected override void OnModelCreating(ModelBuilder builder) { - builder.Entity(ConfigureCatalogBrand); - builder.Entity(ConfigureCatalogType); - builder.Entity(ConfigureCatalogItem); + builder.ApplyConfiguration(new CatalogBrandEntityTypeConfiguration()); + builder.ApplyConfiguration(new CatalogTypeEntityTypeConfiguration()); + builder.ApplyConfiguration(new CatalogItemEntityTypeConfiguration()); } + } - void ConfigureCatalogItem(EntityTypeBuilder builder) - { - builder.ToTable("Catalog"); - - builder.Property(ci => ci.Id) - .ForSqlServerUseSequenceHiLo("catalog_hilo") - .IsRequired(); - - builder.Property(ci => ci.Name) - .IsRequired(true) - .HasMaxLength(50); - - builder.Property(ci => ci.Price) - .IsRequired(true); - - builder.Property(ci => ci.PictureFileName) - .IsRequired(false); - - builder.Ignore(ci => ci.PictureUri); - - builder.HasOne(ci => ci.CatalogBrand) - .WithMany() - .HasForeignKey(ci => ci.CatalogBrandId); - - builder.HasOne(ci => ci.CatalogType) - .WithMany() - .HasForeignKey(ci => ci.CatalogTypeId); - } - - void ConfigureCatalogBrand(EntityTypeBuilder builder) - { - builder.ToTable("CatalogBrand"); - - builder.HasKey(ci => ci.Id); - - builder.Property(ci => ci.Id) - .ForSqlServerUseSequenceHiLo("catalog_brand_hilo") - .IsRequired(); - builder.Property(cb => cb.Brand) - .IsRequired() - .HasMaxLength(100); - } - - void ConfigureCatalogType(EntityTypeBuilder builder) + public class CatalogContextDesignFactory : IDesignTimeDbContextFactory + { + public CatalogContext CreateDbContext(string[] args) { - builder.ToTable("CatalogType"); - - builder.HasKey(ci => ci.Id); - - builder.Property(ci => ci.Id) - .ForSqlServerUseSequenceHiLo("catalog_type_hilo") - .IsRequired(); + var optionsBuilder = new DbContextOptionsBuilder() + .UseSqlServer("Server=.;Initial Catalog=Microsoft.eShopOnContainers.Services.CatalogDb;Integrated Security=true"); - builder.Property(cb => cb.Type) - .IsRequired() - .HasMaxLength(100); + return new CatalogContext(optionsBuilder.Options); } } } diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs index 6f71bd6cf..42ac7b740 100644 --- a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs +++ b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs @@ -1,15 +1,14 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure { - using EntityFrameworkCore; using Extensions.Logging; using global::Catalog.API.Extensions; - using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; - using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using Model; + using Polly; using System; using System.Collections.Generic; + using System.Data.SqlClient; using System.Globalization; using System.IO; using System.IO.Compression; @@ -19,56 +18,48 @@ public class CatalogContextSeed { - public static async Task SeedAsync(IApplicationBuilder applicationBuilder, IHostingEnvironment env, ILoggerFactory loggerFactory, int? retry = 0) + public async Task SeedAsync(CatalogContext context,IHostingEnvironment env,IOptions settings,ILogger logger) { - var log = loggerFactory.CreateLogger("catalog seed"); + var policy = CreatePolicy(logger, nameof(CatalogContextSeed)); - var context = (CatalogContext)applicationBuilder - .ApplicationServices.GetService(typeof(CatalogContext)); - - context.Database.Migrate(); - - var settings = (CatalogSettings)applicationBuilder - .ApplicationServices.GetRequiredService>().Value; - - var useCustomizationData = settings.UseCustomizationData; - var contentRootPath = env.ContentRootPath; - var picturePath = env.WebRootPath; - - if (!context.CatalogBrands.Any()) + await policy.ExecuteAsync(async () => { - context.CatalogBrands.AddRange(useCustomizationData - ? GetCatalogBrandsFromFile(contentRootPath, log) - : GetPreconfiguredCatalogBrands() - ); + var useCustomizationData = settings.Value.UseCustomizationData; + var contentRootPath = env.ContentRootPath; + var picturePath = env.WebRootPath; - await context.SaveChangesAsync(); - } + if (!context.CatalogBrands.Any()) + { + context.CatalogBrands.AddRange(useCustomizationData + ? GetCatalogBrandsFromFile(contentRootPath, logger) + : GetPreconfiguredCatalogBrands()); - if (!context.CatalogTypes.Any()) - { - context.CatalogTypes.AddRange(useCustomizationData - ? GetCatalogTypesFromFile(contentRootPath, log) - : GetPreconfiguredCatalogTypes() - ); + await context.SaveChangesAsync(); + } - await context.SaveChangesAsync(); - } + if (!context.CatalogTypes.Any()) + { + context.CatalogTypes.AddRange(useCustomizationData + ? GetCatalogTypesFromFile(contentRootPath, logger) + : GetPreconfiguredCatalogTypes()); - if (!context.CatalogItems.Any()) - { - context.CatalogItems.AddRange(useCustomizationData - ? GetCatalogItemsFromFile(contentRootPath, context, log) - : GetPreconfiguredItems() - ); + await context.SaveChangesAsync(); + } - await context.SaveChangesAsync(); + if (!context.CatalogItems.Any()) + { + context.CatalogItems.AddRange(useCustomizationData + ? GetCatalogItemsFromFile(contentRootPath, context, logger) + : GetPreconfiguredItems()); - GetCatalogItemPictures(contentRootPath, picturePath); - } + await context.SaveChangesAsync(); + + GetCatalogItemPictures(contentRootPath, picturePath); + } + }); } - static IEnumerable GetCatalogBrandsFromFile(string contentRootPath, ILogger log) + private IEnumerable GetCatalogBrandsFromFile(string contentRootPath, ILogger logger) { string csvFileCatalogBrands = Path.Combine(contentRootPath, "Setup", "CatalogBrands.csv"); @@ -85,18 +76,18 @@ } catch (Exception ex) { - log.LogError(ex.Message); + logger.LogError(ex.Message); return GetPreconfiguredCatalogBrands(); } return File.ReadAllLines(csvFileCatalogBrands) .Skip(1) // skip header row .SelectTry(x => CreateCatalogBrand(x)) - .OnCaughtException(ex => { log.LogError(ex.Message); return null; }) + .OnCaughtException(ex => { logger.LogError(ex.Message); return null; }) .Where(x => x != null); } - static CatalogBrand CreateCatalogBrand(string brand) + private CatalogBrand CreateCatalogBrand(string brand) { brand = brand.Trim('"').Trim(); @@ -111,7 +102,7 @@ }; } - static IEnumerable GetPreconfiguredCatalogBrands() + private IEnumerable GetPreconfiguredCatalogBrands() { return new List() { @@ -123,7 +114,7 @@ }; } - static IEnumerable GetCatalogTypesFromFile(string contentRootPath, ILogger log) + private IEnumerable GetCatalogTypesFromFile(string contentRootPath, ILogger logger) { string csvFileCatalogTypes = Path.Combine(contentRootPath, "Setup", "CatalogTypes.csv"); @@ -140,18 +131,18 @@ } catch (Exception ex) { - log.LogError(ex.Message); + logger.LogError(ex.Message); return GetPreconfiguredCatalogTypes(); } return File.ReadAllLines(csvFileCatalogTypes) .Skip(1) // skip header row .SelectTry(x => CreateCatalogType(x)) - .OnCaughtException(ex => { log.LogError(ex.Message); return null; }) + .OnCaughtException(ex => { logger.LogError(ex.Message); return null; }) .Where(x => x != null); } - static CatalogType CreateCatalogType(string type) + private CatalogType CreateCatalogType(string type) { type = type.Trim('"').Trim(); @@ -166,7 +157,7 @@ }; } - static IEnumerable GetPreconfiguredCatalogTypes() + private IEnumerable GetPreconfiguredCatalogTypes() { return new List() { @@ -177,7 +168,7 @@ }; } - static IEnumerable GetCatalogItemsFromFile(string contentRootPath, CatalogContext context, ILogger log) + private IEnumerable GetCatalogItemsFromFile(string contentRootPath, CatalogContext context, ILogger logger) { string csvFileCatalogItems = Path.Combine(contentRootPath, "Setup", "CatalogItems.csv"); @@ -195,7 +186,7 @@ } catch (Exception ex) { - log.LogError(ex.Message); + logger.LogError(ex.Message); return GetPreconfiguredItems(); } @@ -206,11 +197,11 @@ .Skip(1) // skip header row .Select(row => Regex.Split(row, ",(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)") ) .SelectTry(column => CreateCatalogItem(column, csvheaders, catalogTypeIdLookup, catalogBrandIdLookup)) - .OnCaughtException(ex => { log.LogError(ex.Message); return null; }) + .OnCaughtException(ex => { logger.LogError(ex.Message); return null; }) .Where(x => x != null); } - static CatalogItem CreateCatalogItem(string[] column, string[] headers, Dictionary catalogTypeIdLookup, Dictionary catalogBrandIdLookup) + private CatalogItem CreateCatalogItem(string[] column, string[] headers, Dictionary catalogTypeIdLookup, Dictionary catalogBrandIdLookup) { if (column.Count() != headers.Count()) { @@ -316,7 +307,7 @@ return catalogItem; } - static IEnumerable GetPreconfiguredItems() + private IEnumerable GetPreconfiguredItems() { return new List() { @@ -335,7 +326,7 @@ }; } - static string[] GetHeaders(string csvfile, string[] requiredHeaders, string[] optionalHeaders = null) + private string[] GetHeaders(string csvfile, string[] requiredHeaders, string[] optionalHeaders = null) { string[] csvheaders = File.ReadLines(csvfile).First().ToLowerInvariant().Split(','); @@ -363,7 +354,7 @@ return csvheaders; } - static void GetCatalogItemPictures(string contentRootPath, string picturePath) + private void GetCatalogItemPictures(string contentRootPath, string picturePath) { DirectoryInfo directory = new DirectoryInfo(picturePath); foreach (FileInfo file in directory.GetFiles()) @@ -374,7 +365,18 @@ string zipFileCatalogItemPictures = Path.Combine(contentRootPath, "Setup", "CatalogItems.zip"); ZipFile.ExtractToDirectory(zipFileCatalogItemPictures, picturePath); } - } - + private Policy CreatePolicy( ILogger logger, string prefix,int retries = 3) + { + return Policy.Handle(). + WaitAndRetryAsync( + retryCount: retries, + sleepDurationProvider: retry => TimeSpan.FromSeconds(5), + onRetry: (exception, timeSpan, retry, ctx) => + { + logger.LogTrace($"[{prefix}] Exception {exception.GetType().Name} with message ${exception.Message} detected on attempt {retry} of {retries}"); + } + ); + } + } } diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/EntityConfigurations/CatalogBrandEntityTypeConfiguration.cs b/src/Services/Catalog/Catalog.API/Infrastructure/EntityConfigurations/CatalogBrandEntityTypeConfiguration.cs new file mode 100644 index 000000000..8312b023d --- /dev/null +++ b/src/Services/Catalog/Catalog.API/Infrastructure/EntityConfigurations/CatalogBrandEntityTypeConfiguration.cs @@ -0,0 +1,25 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; +using Microsoft.eShopOnContainers.Services.Catalog.API.Model; + +namespace Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure.EntityConfigurations +{ + class CatalogBrandEntityTypeConfiguration + : IEntityTypeConfiguration + { + public void Configure(EntityTypeBuilder builder) + { + builder.ToTable("CatalogBrand"); + + builder.HasKey(ci => ci.Id); + + builder.Property(ci => ci.Id) + .ForSqlServerUseSequenceHiLo("catalog_brand_hilo") + .IsRequired(); + + builder.Property(cb => cb.Brand) + .IsRequired() + .HasMaxLength(100); + } + } +} diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/EntityConfigurations/CatalogItemEntityTypeConfiguration.cs b/src/Services/Catalog/Catalog.API/Infrastructure/EntityConfigurations/CatalogItemEntityTypeConfiguration.cs new file mode 100644 index 000000000..f7f093ce8 --- /dev/null +++ b/src/Services/Catalog/Catalog.API/Infrastructure/EntityConfigurations/CatalogItemEntityTypeConfiguration.cs @@ -0,0 +1,39 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; +using Microsoft.eShopOnContainers.Services.Catalog.API.Model; + +namespace Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure.EntityConfigurations +{ + class CatalogItemEntityTypeConfiguration + : IEntityTypeConfiguration + { + public void Configure(EntityTypeBuilder builder) + { + builder.ToTable("Catalog"); + + builder.Property(ci => ci.Id) + .ForSqlServerUseSequenceHiLo("catalog_hilo") + .IsRequired(); + + builder.Property(ci => ci.Name) + .IsRequired(true) + .HasMaxLength(50); + + builder.Property(ci => ci.Price) + .IsRequired(true); + + builder.Property(ci => ci.PictureFileName) + .IsRequired(false); + + builder.Ignore(ci => ci.PictureUri); + + builder.HasOne(ci => ci.CatalogBrand) + .WithMany() + .HasForeignKey(ci => ci.CatalogBrandId); + + builder.HasOne(ci => ci.CatalogType) + .WithMany() + .HasForeignKey(ci => ci.CatalogTypeId); + } + } +} diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/EntityConfigurations/CatalogTypeEntityTypeConfiguration.cs b/src/Services/Catalog/Catalog.API/Infrastructure/EntityConfigurations/CatalogTypeEntityTypeConfiguration.cs new file mode 100644 index 000000000..4c30bb3b6 --- /dev/null +++ b/src/Services/Catalog/Catalog.API/Infrastructure/EntityConfigurations/CatalogTypeEntityTypeConfiguration.cs @@ -0,0 +1,25 @@ +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Metadata.Builders; +using Microsoft.eShopOnContainers.Services.Catalog.API.Model; + +namespace Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure.EntityConfigurations +{ + class CatalogTypeEntityTypeConfiguration + : IEntityTypeConfiguration + { + public void Configure(EntityTypeBuilder builder) + { + builder.ToTable("CatalogType"); + + builder.HasKey(ci => ci.Id); + + builder.Property(ci => ci.Id) + .ForSqlServerUseSequenceHiLo("catalog_type_hilo") + .IsRequired(); + + builder.Property(cb => cb.Type) + .IsRequired() + .HasMaxLength(100); + } + } +} diff --git a/src/Services/Catalog/Catalog.API/Program.cs b/src/Services/Catalog/Catalog.API/Program.cs index 93c151cf2..bef3fa360 100644 --- a/src/Services/Catalog/Catalog.API/Program.cs +++ b/src/Services/Catalog/Catalog.API/Program.cs @@ -1,23 +1,51 @@ -using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; +using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF; +using Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; using System.IO; - namespace Microsoft.eShopOnContainers.Services.Catalog.API { public class Program { public static void Main(string[] args) { - var host = new WebHostBuilder() - .UseKestrel() + BuildWebHost(args) + .MigrateDbContext((context,services)=> + { + var env = services.GetService(); + var settings = services.GetService>(); + var logger = services.GetService>(); + + new CatalogContextSeed() + .SeedAsync(context,env,settings,logger) + .Wait(); + + }) + .MigrateDbContext((_,__)=> { }) + .Run(); + } + + public static IWebHost BuildWebHost(string[] args) => + WebHost.CreateDefaultBuilder(args) + .UseStartup() + .UseApplicationInsights() .UseHealthChecks("/hc") - .UseIISIntegration() .UseContentRoot(Directory.GetCurrentDirectory()) .UseWebRoot("Pics") - .UseStartup() - .Build(); - - host.Run(); - } + .ConfigureAppConfiguration((builderContext, config) => + { + config.AddEnvironmentVariables(); + }) + .ConfigureLogging((hostingContext, builder) => + { + builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging")); + builder.AddConsole(); + builder.AddDebug(); + }) + .Build(); } -} +} \ No newline at end of file diff --git a/src/Services/Catalog/Catalog.API/Startup.cs b/src/Services/Catalog/Catalog.API/Startup.cs index e32b27e53..6037b0eb0 100644 --- a/src/Services/Catalog/Catalog.API/Startup.cs +++ b/src/Services/Catalog/Catalog.API/Startup.cs @@ -4,11 +4,13 @@ using Autofac.Extensions.DependencyInjection; using global::Catalog.API.Infrastructure.Filters; using global::Catalog.API.IntegrationEvents; + using Microsoft.ApplicationInsights.Extensibility; + using Microsoft.ApplicationInsights.ServiceFabric; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.Azure.ServiceBus; using Microsoft.EntityFrameworkCore; - using Microsoft.EntityFrameworkCore.Infrastructure; + using Microsoft.EntityFrameworkCore.Diagnostics; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus; using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; using Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ; @@ -23,41 +25,26 @@ using Microsoft.Extensions.HealthChecks; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; - using Microsoft.WindowsAzure.Storage; - using Microsoft.WindowsAzure.Storage.Auth; - using Polly; using RabbitMQ.Client; using System; using System.Data.Common; - using System.Data.SqlClient; using System.Reflection; - using System.Threading.Tasks; public class Startup { - public IConfigurationRoot Configuration { get; } - - public Startup(IHostingEnvironment env) + public Startup(IConfiguration configuration) { - var builder = new ConfigurationBuilder() - .SetBasePath(env.ContentRootPath) - .AddJsonFile($"settings.json", optional: false, reloadOnChange: true) - .AddJsonFile($"settings.{env.EnvironmentName}.json", optional: true); - - if (env.IsDevelopment()) - { - builder.AddUserSecrets(typeof(Startup).GetTypeInfo().Assembly); - } - - builder.AddEnvironmentVariables(); - - Configuration = builder.Build(); + Configuration = configuration; } + public IConfiguration Configuration { get; } + public IServiceProvider ConfigureServices(IServiceCollection services) { // Add framework services. + RegisterAppInsights(services); + services.AddHealthChecks(checks => { var minutes = 1; @@ -87,7 +74,7 @@ { sqlOptions.MigrationsAssembly(typeof(Startup).GetTypeInfo().Assembly.GetName().Name); //Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency - sqlOptions.EnableRetryOnFailure(maxRetryCount: 5, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null); + sqlOptions.EnableRetryOnFailure(maxRetryCount: 10, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null); }); // Changing default behavior when client evaluation occurs to throw. @@ -96,6 +83,17 @@ //Check Client vs. Server evaluation: https://docs.microsoft.com/en-us/ef/core/querying/client-eval }); + services.AddDbContext(options => + { + options.UseSqlServer(Configuration["ConnectionString"], + sqlServerOptionsAction: sqlOptions => + { + sqlOptions.MigrationsAssembly(typeof(Startup).GetTypeInfo().Assembly.GetName().Name); + //Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency + sqlOptions.EnableRetryOnFailure(maxRetryCount: 10, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null); + }); + }); + services.Configure(Configuration); // Add framework services. @@ -143,12 +141,29 @@ { var settings = sp.GetRequiredService>().Value; var logger = sp.GetRequiredService>(); + var factory = new ConnectionFactory() { - HostName = settings.EventBusConnection + HostName = Configuration["EventBusConnection"] }; - return new DefaultRabbitMQPersistentConnection(factory, logger); + if (!string.IsNullOrEmpty(Configuration["EventBusUserName"])) + { + factory.UserName = Configuration["EventBusUserName"]; + } + + if (!string.IsNullOrEmpty(Configuration["EventBusPassword"])) + { + factory.Password = Configuration["EventBusPassword"]; + } + + var retryCount = 5; + if (!string.IsNullOrEmpty(Configuration["EventBusRetryCount"])) + { + retryCount = int.Parse(Configuration["EventBusRetryCount"]); + } + + return new DefaultRabbitMQPersistentConnection(factory, logger, retryCount); }); } @@ -166,6 +181,15 @@ loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); + loggerFactory.AddAzureWebAppDiagnostics(); + loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace); + + var pathBase = Configuration["PATH_BASE"]; + if (!string.IsNullOrEmpty(pathBase)) + { + loggerFactory.CreateLogger("init").LogDebug($"Using PATH BASE '{pathBase}'"); + app.UsePathBase(pathBase); + } app.UseCors("CorsPolicy"); @@ -177,43 +201,25 @@ c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1"); }); - var context = (CatalogContext)app - .ApplicationServices.GetService(typeof(CatalogContext)); - - WaitForSqlAvailabilityAsync(context, loggerFactory, app, env).Wait(); - ConfigureEventBus(app); - - var integrationEventLogContext = new IntegrationEventLogContext( - new DbContextOptionsBuilder() - .UseSqlServer(Configuration["ConnectionString"], b => b.MigrationsAssembly("Catalog.API")) - .Options); - - integrationEventLogContext.Database.Migrate(); } - private async Task WaitForSqlAvailabilityAsync(CatalogContext ctx, ILoggerFactory loggerFactory, IApplicationBuilder app, IHostingEnvironment env, int retries = 0) + private void RegisterAppInsights(IServiceCollection services) { - var logger = loggerFactory.CreateLogger(nameof(Startup)); - var policy = CreatePolicy(retries, logger, nameof(WaitForSqlAvailabilityAsync)); - await policy.ExecuteAsync(async () => - { - await CatalogContextSeed.SeedAsync(app, env, loggerFactory); - }); - - } + services.AddApplicationInsightsTelemetry(Configuration); + var orchestratorType = Configuration.GetValue("OrchestratorType"); - private Policy CreatePolicy(int retries, ILogger logger, string prefix) - { - return Policy.Handle(). - WaitAndRetryAsync( - retryCount: retries, - sleepDurationProvider: retry => TimeSpan.FromSeconds(5), - onRetry: (exception, timeSpan, retry, ctx) => - { - logger.LogTrace($"[{prefix}] Exception {exception.GetType().Name} with message ${exception.Message} detected on attempt {retry} of {retries}"); - } - ); + if (orchestratorType?.ToUpper() == "K8S") + { + // Enable K8s telemetry initializer + services.EnableKubernetes(); + } + if (orchestratorType?.ToUpper() == "SF") + { + // Enable SF telemetry initializer + services.AddSingleton((serviceProvider) => + new FabricTelemetryInitializer()); + } } private void RegisterEventBus(IServiceCollection services) @@ -235,7 +241,21 @@ } else { - services.AddSingleton(); + services.AddSingleton(sp => + { + var rabbitMQPersistentConnection = sp.GetRequiredService(); + var iLifetimeScope = sp.GetRequiredService(); + var logger = sp.GetRequiredService>(); + var eventBusSubcriptionsManager = sp.GetRequiredService(); + + var retryCount = 5; + if (!string.IsNullOrEmpty(Configuration["EventBusRetryCount"])) + { + retryCount = int.Parse(Configuration["EventBusRetryCount"]); + } + + return new EventBusRabbitMQ(rabbitMQPersistentConnection, logger, iLifetimeScope, eventBusSubcriptionsManager, retryCount); + }); } services.AddSingleton(); diff --git a/src/Services/Catalog/Catalog.API/settings.json b/src/Services/Catalog/Catalog.API/appsettings.json similarity index 79% rename from src/Services/Catalog/Catalog.API/settings.json rename to src/Services/Catalog/Catalog.API/appsettings.json index dafeca845..abaa34316 100644 --- a/src/Services/Catalog/Catalog.API/settings.json +++ b/src/Services/Catalog/Catalog.API/appsettings.json @@ -12,5 +12,9 @@ }, "AzureServiceBusEnabled": false, "AzureStorageEnabled": false, - "SubscriptionClientName": "Catalog" + "SubscriptionClientName": "Catalog", + "ApplicationInsights": { + "InstrumentationKey": "" + }, + "EventBusRetryCount": 5 } diff --git a/src/Services/GracePeriod/GracePeriodManager/.dockerignore b/src/Services/GracePeriod/GracePeriodManager/.dockerignore deleted file mode 100644 index d8f8175f6..000000000 --- a/src/Services/GracePeriod/GracePeriodManager/.dockerignore +++ /dev/null @@ -1,3 +0,0 @@ -* -!obj/Docker/publish/* -!obj/Docker/empty/ diff --git a/src/Services/GracePeriod/GracePeriodManager/Dockerfile b/src/Services/GracePeriod/GracePeriodManager/Dockerfile deleted file mode 100644 index 37971fde2..000000000 --- a/src/Services/GracePeriod/GracePeriodManager/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM microsoft/aspnetcore:1.1.2 -ARG source -WORKDIR /app -COPY ${source:-obj/Docker/publish} . -ENTRYPOINT ["dotnet", "GracePeriodManager.dll"] \ No newline at end of file diff --git a/src/Services/GracePeriod/GracePeriodManager/Dockerfile.nanowin b/src/Services/GracePeriod/GracePeriodManager/Dockerfile.nanowin deleted file mode 100644 index 9c664f4e4..000000000 --- a/src/Services/GracePeriod/GracePeriodManager/Dockerfile.nanowin +++ /dev/null @@ -1,8 +0,0 @@ -FROM microsoft/dotnet:1.1-runtime-nanoserver -SHELL ["powershell"] -ARG source -WORKDIR /app -RUN set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord -EXPOSE 80 -COPY ${source:-obj/Docker/publish} . -ENTRYPOINT ["dotnet", "Basket.API.dll"] diff --git a/src/Services/GracePeriod/GracePeriodManager/GracePeriodManager.csproj b/src/Services/GracePeriod/GracePeriodManager/GracePeriodManager.csproj deleted file mode 100644 index 0fa866642..000000000 --- a/src/Services/GracePeriod/GracePeriodManager/GracePeriodManager.csproj +++ /dev/null @@ -1,37 +0,0 @@ - - - - Exe - netcoreapp1.1 - 1.1.2 - - - - - - - - - - - - - - - - - - - - - - - - - - - Dockerfile - - - - \ No newline at end of file diff --git a/src/Services/GracePeriod/GracePeriodManager/IntegrationEvents/Events/GracePeriodConfirmedIntegrationEvent.cs b/src/Services/GracePeriod/GracePeriodManager/IntegrationEvents/Events/GracePeriodConfirmedIntegrationEvent.cs deleted file mode 100644 index fce04cd24..000000000 --- a/src/Services/GracePeriod/GracePeriodManager/IntegrationEvents/Events/GracePeriodConfirmedIntegrationEvent.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace GracePeriodManager.IntegrationEvents.Events -{ - using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events; - - public class GracePeriodConfirmedIntegrationEvent : IntegrationEvent - { - public int OrderId { get;} - - public GracePeriodConfirmedIntegrationEvent(int orderId) => OrderId = orderId; - } -} \ No newline at end of file diff --git a/src/Services/GracePeriod/GracePeriodManager/ManagerSettings.cs b/src/Services/GracePeriod/GracePeriodManager/ManagerSettings.cs deleted file mode 100644 index 44e0b56f7..000000000 --- a/src/Services/GracePeriod/GracePeriodManager/ManagerSettings.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace GracePeriodManager -{ - public class ManagerSettings - { - public string ConnectionString { get; set; } - - public string EventBusConnection { get; set; } - - public int GracePeriodTime { get; set; } - - public int CheckUpdateTime { get; set; } - } -} \ No newline at end of file diff --git a/src/Services/GracePeriod/GracePeriodManager/Program.cs b/src/Services/GracePeriod/GracePeriodManager/Program.cs deleted file mode 100644 index 88fb1547e..000000000 --- a/src/Services/GracePeriod/GracePeriodManager/Program.cs +++ /dev/null @@ -1,130 +0,0 @@ -namespace GracePeriodManager -{ - using System.IO; - using System; - using System.Threading.Tasks; - using Autofac.Extensions.DependencyInjection; - using Autofac; - using Microsoft.Extensions.Configuration; - using Microsoft.Extensions.DependencyInjection; - using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; - using Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ; - using Microsoft.eShopOnContainers.BuildingBlocks.EventBus; - using Microsoft.Extensions.Logging; - using Microsoft.Extensions.Options; - using RabbitMQ.Client; - using Services; - using Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus; - using Microsoft.Azure.ServiceBus; - - public class Program - { - public static IConfigurationRoot Configuration { get; set; } - - public static void Main(string[] args) => MainAsync().Wait(); - - static async Task MainAsync() - { - StartUp(); - - IServiceCollection services = new ServiceCollection(); - var serviceProvider = ConfigureServices(services); - - var logger = serviceProvider.GetService(); - Configure(logger); - - var gracePeriodManagerService = serviceProvider - .GetRequiredService(); - var checkUpdateTime = serviceProvider - .GetRequiredService>().Value.CheckUpdateTime; - - while (true) - { - gracePeriodManagerService.CheckConfirmedGracePeriodOrders(); - await Task.Delay(checkUpdateTime); - } - } - - public static void StartUp() - { - var builder = new ConfigurationBuilder() - .SetBasePath(Directory.GetCurrentDirectory()) - .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) - .AddEnvironmentVariables(); - - Configuration = builder.Build(); - } - - public static IServiceProvider ConfigureServices(IServiceCollection services) - { - services.AddLogging() - .AddOptions() - .Configure(Configuration) - .AddSingleton(); - - if (Configuration.GetValue("AzureServiceBusEnabled")) - { - services.AddSingleton(sp => - { - var logger = sp.GetRequiredService>(); - - var serviceBusConnectionString = Configuration["EventBusConnection"]; - var serviceBusConnection = new ServiceBusConnectionStringBuilder(serviceBusConnectionString); - - return new DefaultServiceBusPersisterConnection(serviceBusConnection, logger); - }); - } - else - { - services.AddSingleton(sp => - { - var logger = sp.GetRequiredService>(); - - var factory = new ConnectionFactory() - { - HostName = Configuration["EventBusConnection"] - }; - - return new DefaultRabbitMQPersistentConnection(factory, logger); - }); - } - - RegisterEventBus(services); - - var container = new ContainerBuilder(); - container.Populate(services); - return new AutofacServiceProvider(container.Build()); - } - - public static void Configure(ILoggerFactory loggerFactory) - { - loggerFactory - .AddConsole(Configuration.GetSection("Logging")) - .AddConsole(LogLevel.Debug); - } - - private static void RegisterEventBus(IServiceCollection services) - { - if (Configuration.GetValue("AzureServiceBusEnabled")) - { - services.AddSingleton(sp => - { - var serviceBusPersisterConnection = sp.GetRequiredService(); - var iLifetimeScope = sp.GetRequiredService(); - var logger = sp.GetRequiredService>(); - var eventBusSubcriptionsManager = sp.GetRequiredService(); - var subscriptionClientName = Configuration["SubscriptionClientName"]; - - return new EventBusServiceBus(serviceBusPersisterConnection, logger, - eventBusSubcriptionsManager, subscriptionClientName, iLifetimeScope); - }); - } - else - { - services.AddSingleton(); - } - - services.AddSingleton(); - } - } -} \ No newline at end of file diff --git a/src/Services/GracePeriod/GracePeriodManager/Services/IManagerService.cs b/src/Services/GracePeriod/GracePeriodManager/Services/IManagerService.cs deleted file mode 100644 index 2362ccd00..000000000 --- a/src/Services/GracePeriod/GracePeriodManager/Services/IManagerService.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace GracePeriodManager.Services -{ - public interface IManagerService - { - void CheckConfirmedGracePeriodOrders(); - } -} \ No newline at end of file diff --git a/src/Services/GracePeriod/GracePeriodManager/Services/ManagerService.cs b/src/Services/GracePeriod/GracePeriodManager/Services/ManagerService.cs deleted file mode 100644 index 973fda158..000000000 --- a/src/Services/GracePeriod/GracePeriodManager/Services/ManagerService.cs +++ /dev/null @@ -1,61 +0,0 @@ -namespace GracePeriodManager.Services -{ - using Dapper; - using GracePeriodManager.IntegrationEvents.Events; - using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions; - using Microsoft.Extensions.Logging; - using Microsoft.Extensions.Options; - using System.Collections.Generic; - using System.Data.SqlClient; - - public class ManagerService : IManagerService - { - private readonly ManagerSettings _settings; - private readonly IEventBus _eventBus; - private readonly ILogger _logger; - - public ManagerService(IOptions settings, - IEventBus eventBus, - ILogger logger) - { - _settings = settings.Value; - _eventBus = eventBus; - _logger = logger; - } - - public void CheckConfirmedGracePeriodOrders() - { - var orderIds = GetConfirmedGracePeriodOrders(); - - foreach (var orderId in orderIds) - { - var confirmGracePeriodEvent = new GracePeriodConfirmedIntegrationEvent(orderId); - _eventBus.Publish(confirmGracePeriodEvent); - } - } - - private IEnumerable GetConfirmedGracePeriodOrders() - { - IEnumerable orderIds = new List(); - using (var conn = new SqlConnection(_settings.ConnectionString)) - { - try - { - conn.Open(); - orderIds = conn.Query( - @"SELECT Id FROM [Microsoft.eShopOnContainers.Services.OrderingDb].[ordering].[orders] - WHERE DATEDIFF(minute, [OrderDate], GETDATE()) >= @GracePeriodTime - AND [OrderStatusId] = 1", - new { GracePeriodTime = _settings.GracePeriodTime }); - } - catch (SqlException exception) - { - _logger.LogCritical($"FATAL ERROR: Database connections could not be opened: {exception.Message}"); - } - - } - - return orderIds; - } - } -} \ No newline at end of file diff --git a/src/Services/GracePeriod/GracePeriodManager/appsettings.json b/src/Services/GracePeriod/GracePeriodManager/appsettings.json deleted file mode 100644 index 76703a77e..000000000 --- a/src/Services/GracePeriod/GracePeriodManager/appsettings.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "Logging": { - "IncludeScopes": false, - "LogLevel": { - "Default": "Debug", - "System": "Information", - "Microsoft": "Information" - } - }, - "ConnectionString": "Server=tcp:127.0.0.1,5433;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;", - "GracePeriodTime": "1", - "CheckUpdateTime": "30000", - "AzureServiceBusEnabled": false, - "SubscriptionClientName": "GracePeriod" -} diff --git a/src/Services/Identity/Identity.API/AppSettings.cs b/src/Services/Identity/Identity.API/AppSettings.cs index 78d848d41..1f45763fe 100644 --- a/src/Services/Identity/Identity.API/AppSettings.cs +++ b/src/Services/Identity/Identity.API/AppSettings.cs @@ -1,13 +1,9 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace eShopOnContainers.Identity +namespace Microsoft.eShopOnContainers.Services.Identity.API { public class AppSettings { public string MvcClient { get; set; } + public bool UseCustomizationData { get; set; } } } diff --git a/src/Services/Identity/Identity.API/Certificate/Certificate.cs b/src/Services/Identity/Identity.API/Certificate/Certificate.cs index f779017fe..d20726d12 100644 --- a/src/Services/Identity/Identity.API/Certificate/Certificate.cs +++ b/src/Services/Identity/Identity.API/Certificate/Certificate.cs @@ -1,11 +1,8 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. -// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. - -using System.IO; +using System.IO; using System.Reflection; using System.Security.Cryptography.X509Certificates; -namespace Identity.API.Certificate +namespace Microsoft.eShopOnContainers.Services.Identity.API.Certificates { static class Certificate { diff --git a/src/Services/Identity/Identity.API/Configuration/Config.cs b/src/Services/Identity/Identity.API/Configuration/Config.cs index 9bd1dd414..969b86aa1 100644 --- a/src/Services/Identity/Identity.API/Configuration/Config.cs +++ b/src/Services/Identity/Identity.API/Configuration/Config.cs @@ -2,7 +2,7 @@ using IdentityServer4.Models; using System.Collections.Generic; -namespace Identity.API.Configuration +namespace Microsoft.eShopOnContainers.Services.Identity.API.Configuration { public class Config { @@ -97,6 +97,7 @@ namespace Identity.API.Configuration AllowAccessTokensViaBrowser = false, RequireConsent = false, AllowOfflineAccess = true, + AlwaysIncludeUserClaimsInIdToken = true, RedirectUris = new List { $"{clientsUrl["Mvc"]}/signin-oidc" diff --git a/src/Services/Identity/Identity.API/Controllers/AccountController.cs b/src/Services/Identity/Identity.API/Controllers/AccountController.cs index 641f39522..79e9c247e 100644 --- a/src/Services/Identity/Identity.API/Controllers/AccountController.cs +++ b/src/Services/Identity/Identity.API/Controllers/AccountController.cs @@ -1,29 +1,23 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. -// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. - - -using IdentityModel; -using IdentityServer4.Quickstart.UI.Models; +using IdentityModel; +using IdentityServer4; +using IdentityServer4.Models; using IdentityServer4.Services; -using Microsoft.AspNetCore.Http.Authentication; +using IdentityServer4.Stores; +using Microsoft.AspNetCore.Authentication; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; +using Microsoft.eShopOnContainers.Services.Identity.API.Models; +using Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels; +using Microsoft.eShopOnContainers.Services.Identity.API.Services; +using Microsoft.Extensions.Logging; using System; -using System.Collections.Generic; using System.Linq; using System.Security.Claims; using System.Text.Encodings.Web; using System.Threading.Tasks; -using IdentityServer4.Models; -using IdentityServer4.Stores; -using Identity.API.Services; -using Identity.API.Models; -using Microsoft.Extensions.Logging; -using Microsoft.AspNetCore.Authorization; -using Identity.API.Models.AccountViewModels; -using Microsoft.AspNetCore.Identity; -using Microsoft.AspNetCore.Authentication; -namespace IdentityServer4.Quickstart.UI.Controllers +namespace Microsoft.eShopOnContainers.Services.Identity.API.Controllers { /// /// This sample controller implements a typical login/logout/provision workflow for local and external accounts. @@ -36,22 +30,22 @@ namespace IdentityServer4.Quickstart.UI.Controllers private readonly ILoginService _loginService; private readonly IIdentityServerInteractionService _interaction; private readonly IClientStore _clientStore; - private readonly ILogger _logger; + private readonly ILogger _logger; private readonly UserManager _userManager; public AccountController( - + //InMemoryUserLoginService loginService, ILoginService loginService, IIdentityServerInteractionService interaction, IClientStore clientStore, - ILoggerFactory loggerFactory, + ILogger logger, UserManager userManager) { _loginService = loginService; _interaction = interaction; _clientStore = clientStore; - _logger = loggerFactory.CreateLogger(); + _logger = logger; _userManager = userManager; } @@ -69,6 +63,7 @@ namespace IdentityServer4.Quickstart.UI.Controllers } var vm = await BuildLoginViewModelAsync(returnUrl, context); + ViewData["ReturnUrl"] = returnUrl; return View(vm); @@ -86,7 +81,7 @@ namespace IdentityServer4.Quickstart.UI.Controllers var user = await _loginService.FindByUsername(model.Email); if (await _loginService.ValidateCredentials(user, model.Password)) { - AuthenticationProperties props = null; + AuthenticationProperties props = null; if (model.RememberMe) { props = new AuthenticationProperties @@ -97,6 +92,7 @@ namespace IdentityServer4.Quickstart.UI.Controllers }; await _loginService.SignIn(user); + // make sure the returnUrl is still valid, and if yes - redirect back to authorize endpoint if (_interaction.IsValidReturnUrl(model.ReturnUrl)) { @@ -111,7 +107,9 @@ namespace IdentityServer4.Quickstart.UI.Controllers // something went wrong, show form with error var vm = await BuildLoginViewModelAsync(model); + ViewData["ReturnUrl"] = model.ReturnUrl; + return View(vm); } @@ -180,6 +178,7 @@ namespace IdentityServer4.Quickstart.UI.Controllers public async Task Logout(LogoutViewModel model) { var idp = User?.FindFirst(JwtClaimTypes.IdentityProvider)?.Value; + if (idp != null && idp != IdentityServerConstants.LocalIdentityProvider) { if (model.LogoutId == null) @@ -191,19 +190,24 @@ namespace IdentityServer4.Quickstart.UI.Controllers } string url = "/Account/Logout?logoutId=" + model.LogoutId; + try { + // hack: try/catch to handle social providers that throw - await HttpContext.Authentication.SignOutAsync(idp, new AuthenticationProperties { RedirectUri = url }); + await HttpContext.SignOutAsync(idp, new AuthenticationProperties + { + RedirectUri = url + }); } - catch(Exception ex) + catch (Exception ex) { _logger.LogCritical(ex.Message); } } // delete authentication cookie - await HttpContext.Authentication.SignOutAsync(); + await HttpContext.SignOutAsync(); // set this so UI rendering sees an anonymous user HttpContext.User = new ClaimsPrincipal(new ClaimsIdentity()); @@ -217,7 +221,7 @@ namespace IdentityServer4.Quickstart.UI.Controllers public async Task DeviceLogOut(string redirectUrl) { // delete authentication cookie - await HttpContext.Authentication.SignOutAsync(); + await HttpContext.SignOutAsync(); // set this so UI rendering sees an anonymous user HttpContext.User = new ClaimsPrincipal(new ClaimsIdentity()); @@ -240,7 +244,7 @@ namespace IdentityServer4.Quickstart.UI.Controllers // start challenge and roundtrip the return URL var props = new AuthenticationProperties { - RedirectUri = returnUrl, + RedirectUri = returnUrl, Items = { { "scheme", provider } } }; return new ChallengeResult(provider, props); @@ -293,7 +297,8 @@ namespace IdentityServer4.Quickstart.UI.Controllers } } - if (returnUrl != null) { + if (returnUrl != null) + { if (HttpContext.User.Identity.IsAuthenticated) return Redirect(returnUrl); else diff --git a/src/Services/Identity/Identity.API/Controllers/ConsentController.cs b/src/Services/Identity/Identity.API/Controllers/ConsentController.cs index a5687dd31..095440d6b 100644 --- a/src/Services/Identity/Identity.API/Controllers/ConsentController.cs +++ b/src/Services/Identity/Identity.API/Controllers/ConsentController.cs @@ -1,19 +1,13 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. -// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. - - +using IdentityServer4.Models; using IdentityServer4.Services; +using IdentityServer4.Stores; using Microsoft.AspNetCore.Mvc; +using Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels; using Microsoft.Extensions.Logging; using System.Linq; using System.Threading.Tasks; -using IdentityServer4.Models; -using IdentityServer4.Stores; -using IdentityServer4.Quickstart.UI.Models; -using Identity.API.Models.AccountViewModels; -using Identity.API.Services; -namespace IdentityServer4.Quickstart.UI.Controllers +namespace Microsoft.eShopOnContainers.Services.Identity.API.Controllers { /// /// This controller implements the consent logic diff --git a/src/Services/Identity/Identity.API/Controllers/HomeController.cs b/src/Services/Identity/Identity.API/Controllers/HomeController.cs index f21ab65e0..66931b764 100644 --- a/src/Services/Identity/Identity.API/Controllers/HomeController.cs +++ b/src/Services/Identity/Identity.API/Controllers/HomeController.cs @@ -1,16 +1,12 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. -// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. - - -using eShopOnContainers.Identity; -using Identity.API.Services; -using IdentityServer4.Quickstart.UI.Models; + using IdentityServer4.Services; using Microsoft.AspNetCore.Mvc; +using Microsoft.eShopOnContainers.Services.Identity.API.Models; +using Microsoft.eShopOnContainers.Services.Identity.API.Services; using Microsoft.Extensions.Options; using System.Threading.Tasks; -namespace IdentityServer4.Quickstart.UI.Controllers +namespace Microsoft.eShopOnContainers.Services.Identity.API.Controllers { public class HomeController : Controller { diff --git a/src/Services/Identity/Identity.API/Data/ApplicationDbContext.cs b/src/Services/Identity/Identity.API/Data/ApplicationDbContext.cs index ddbe7bbfd..aec67258c 100644 --- a/src/Services/Identity/Identity.API/Data/ApplicationDbContext.cs +++ b/src/Services/Identity/Identity.API/Data/ApplicationDbContext.cs @@ -1,12 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Identity.EntityFrameworkCore; +using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; -using Identity.API.Models; +using Microsoft.eShopOnContainers.Services.Identity.API.Models; -namespace Identity.API.Data +namespace Microsoft.eShopOnContainers.Services.Identity.API.Data { public class ApplicationDbContext : IdentityDbContext { diff --git a/src/Services/Identity/Identity.API/Data/ApplicationContextSeed.cs b/src/Services/Identity/Identity.API/Data/ApplicationDbContextSeed.cs similarity index 76% rename from src/Services/Identity/Identity.API/Data/ApplicationContextSeed.cs rename to src/Services/Identity/Identity.API/Data/ApplicationDbContextSeed.cs index 0f81bcf66..3dbf28171 100644 --- a/src/Services/Identity/Identity.API/Data/ApplicationContextSeed.cs +++ b/src/Services/Identity/Identity.API/Data/ApplicationDbContextSeed.cs @@ -1,57 +1,40 @@ -namespace Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Identity; +using Microsoft.eShopOnContainers.Services.Identity.API.Extensions; +using Microsoft.eShopOnContainers.Services.Identity.API.Models; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; +using System; +using System.Collections.Generic; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Text.RegularExpressions; +using System.Threading.Tasks; + +namespace Microsoft.eShopOnContainers.Services.Identity.API.Data { - using AspNetCore.Identity; - using EntityFrameworkCore; - using Extensions.Logging; - using global::eShopOnContainers.Identity; - using global::Identity.API.Data; - using global::Identity.API.Models; - using Identity.API.Extensions; - using Microsoft.AspNetCore.Builder; - using Microsoft.AspNetCore.Hosting; - using Microsoft.Extensions.DependencyInjection; - using Microsoft.Extensions.Options; - using System; - using System.Collections.Generic; - using System.IO; - using System.IO.Compression; - using System.Linq; - using System.Security.Cryptography; - using System.Text.RegularExpressions; - using System.Threading.Tasks; - - public class ApplicationContextSeed - { - private readonly IPasswordHasher _passwordHasher; - public ApplicationContextSeed(IPasswordHasher passwordHasher) - { - _passwordHasher = passwordHasher; - } - public async Task SeedAsync(IApplicationBuilder applicationBuilder, IHostingEnvironment env, ILoggerFactory loggerFactory, int? retry = 0) + public class ApplicationDbContextSeed + { + private readonly IPasswordHasher _passwordHasher = new PasswordHasher(); + + public async Task SeedAsync(ApplicationDbContext context,IHostingEnvironment env, + ILogger logger, IOptions settings,int? retry = 0) { int retryForAvaiability = retry.Value; + try { - var log = loggerFactory.CreateLogger("application seed"); - - var context = (ApplicationDbContext)applicationBuilder - .ApplicationServices.GetService(typeof(ApplicationDbContext)); - - context.Database.Migrate(); - - var settings = (AppSettings)applicationBuilder - .ApplicationServices.GetRequiredService>().Value; - - var useCustomizationData = settings.UseCustomizationData; + var useCustomizationData = settings.Value.UseCustomizationData; var contentRootPath = env.ContentRootPath; var webroot = env.WebRootPath; if (!context.Users.Any()) { context.Users.AddRange(useCustomizationData - ? GetUsersFromFile(contentRootPath, log) + ? GetUsersFromFile(contentRootPath, logger) : GetDefaultUser()); await context.SaveChangesAsync(); @@ -59,7 +42,7 @@ if (useCustomizationData) { - GetPreconfiguredImages(contentRootPath, webroot, log); + GetPreconfiguredImages(contentRootPath, webroot, logger); } } catch (Exception ex) @@ -67,14 +50,15 @@ if (retryForAvaiability < 10) { retryForAvaiability++; - var log = loggerFactory.CreateLogger("catalog seed"); - log.LogError(ex.Message); - await SeedAsync(applicationBuilder, env, loggerFactory, retryForAvaiability); + + logger.LogError(ex.Message,$"There is an error migrating data for ApplicationDbContext"); + + await SeedAsync(context,env,logger,settings, retryForAvaiability); } } } - private IEnumerable GetUsersFromFile(string contentRootPath, ILogger log) + private IEnumerable GetUsersFromFile(string contentRootPath, ILogger logger) { string csvFileUsers = Path.Combine(contentRootPath, "Setup", "Users.csv"); @@ -96,7 +80,8 @@ } catch (Exception ex) { - log.LogError(ex.Message); + logger.LogError(ex.Message); + return GetDefaultUser(); } @@ -104,7 +89,7 @@ .Skip(1) // skip header column .Select(row => Regex.Split(row, ",(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)") ) .SelectTry(column => CreateApplicationUser(column, csvheaders)) - .OnCaughtException(ex => { log.LogError(ex.Message); return null; }) + .OnCaughtException(ex => { logger.LogError(ex.Message); return null; }) .Where(x => x != null) .ToList(); @@ -207,14 +192,14 @@ return csvheaders; } - static void GetPreconfiguredImages(string contentRootPath, string webroot, ILogger log) + static void GetPreconfiguredImages(string contentRootPath, string webroot, ILogger logger) { try { string imagesZipFile = Path.Combine(contentRootPath, "Setup", "images.zip"); if (!File.Exists(imagesZipFile)) { - log.LogError($" zip file '{imagesZipFile}' does not exists."); + logger.LogError($" zip file '{imagesZipFile}' does not exists."); return; } @@ -236,14 +221,14 @@ } else { - log.LogWarning($"Skip file '{entry.Name}' in zipfile '{imagesZipFile}'"); + logger.LogWarning($"Skip file '{entry.Name}' in zipfile '{imagesZipFile}'"); } } } } catch (Exception ex) { - log.LogError($"Exception in method GetPreconfiguredImages WebMVC. Exception Message={ex.Message}"); + logger.LogError($"Exception in method GetPreconfiguredImages WebMVC. Exception Message={ex.Message}"); } } } diff --git a/src/Services/Identity/Identity.API/Data/ConfigurationDbContextSeed.cs b/src/Services/Identity/Identity.API/Data/ConfigurationDbContextSeed.cs new file mode 100644 index 000000000..bb41f0d0a --- /dev/null +++ b/src/Services/Identity/Identity.API/Data/ConfigurationDbContextSeed.cs @@ -0,0 +1,56 @@ +using IdentityServer4.EntityFramework.DbContexts; +using IdentityServer4.EntityFramework.Mappers; +using Microsoft.eShopOnContainers.Services.Identity.API.Configuration; +using Microsoft.Extensions.Configuration; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Microsoft.eShopOnContainers.Services.Identity.API.Data +{ + public class ConfigurationDbContextSeed + { + public async Task SeedAsync(ConfigurationDbContext context,IConfiguration configuration) + { + + //callbacks urls from config: + var clientUrls = new Dictionary(); + + clientUrls.Add("Mvc", configuration.GetValue("MvcClient")); + clientUrls.Add("Spa", configuration.GetValue("SpaClient")); + clientUrls.Add("Xamarin", configuration.GetValue("XamarinCallback")); + clientUrls.Add("LocationsApi", configuration.GetValue("LocationApiClient")); + clientUrls.Add("MarketingApi", configuration.GetValue("MarketingApiClient")); + clientUrls.Add("BasketApi", configuration.GetValue("BasketApiClient")); + clientUrls.Add("OrderingApi", configuration.GetValue("OrderingApiClient")); + + if (!context.Clients.Any()) + { + foreach (var client in Config.GetClients(clientUrls)) + { + await context.Clients.AddAsync(client.ToEntity()); + } + await context.SaveChangesAsync(); + } + + if (!context.IdentityResources.Any()) + { + foreach (var resource in Config.GetResources()) + { + await context.IdentityResources.AddAsync(resource.ToEntity()); + } + await context.SaveChangesAsync(); + } + + if (!context.ApiResources.Any()) + { + foreach (var api in Config.GetApis()) + { + await context.ApiResources.AddAsync(api.ToEntity()); + } + + await context.SaveChangesAsync(); + } + } + } +} diff --git a/src/Services/Identity/Identity.API/Data/Migrations/20161019122215_Init_Scheme.Designer.cs b/src/Services/Identity/Identity.API/Data/Migrations/20161019122215_Init_Scheme.Designer.cs deleted file mode 100644 index 07e821f4c..000000000 --- a/src/Services/Identity/Identity.API/Data/Migrations/20161019122215_Init_Scheme.Designer.cs +++ /dev/null @@ -1,242 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; -using Identity.API.Data; - -namespace WebMVC.Migrations -{ - [DbContext(typeof(ApplicationDbContext))] - [Migration("20161019122215_Init_Scheme")] - partial class Init_Scheme - { - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { - modelBuilder - .HasAnnotation("ProductVersion", "1.0.0-rtm-21431") - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole", b => - { - b.Property("Id"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Name") - .HasAnnotation("MaxLength", 256); - - b.Property("NormalizedName") - .HasAnnotation("MaxLength", 256); - - b.HasKey("Id"); - - b.HasIndex("NormalizedName") - .HasName("RoleNameIndex"); - - b.ToTable("AspNetRoles"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ClaimType"); - - b.Property("ClaimValue"); - - b.Property("RoleId") - .IsRequired(); - - b.HasKey("Id"); - - b.HasIndex("RoleId"); - - b.ToTable("AspNetRoleClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd(); - - b.Property("ClaimType"); - - b.Property("ClaimValue"); - - b.Property("UserId") - .IsRequired(); - - b.HasKey("Id"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserClaims"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin", b => - { - b.Property("LoginProvider"); - - b.Property("ProviderKey"); - - b.Property("ProviderDisplayName"); - - b.Property("UserId") - .IsRequired(); - - b.HasKey("LoginProvider", "ProviderKey"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserLogins"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole", b => - { - b.Property("UserId"); - - b.Property("RoleId"); - - b.HasKey("UserId", "RoleId"); - - b.HasIndex("RoleId"); - - b.HasIndex("UserId"); - - b.ToTable("AspNetUserRoles"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserToken", b => - { - b.Property("UserId"); - - b.Property("LoginProvider"); - - b.Property("Name"); - - b.Property("Value"); - - b.HasKey("UserId", "LoginProvider", "Name"); - - b.ToTable("AspNetUserTokens"); - }); - - modelBuilder.Entity("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser", b => - { - b.Property("Id"); - - b.Property("AccessFailedCount"); - - b.Property("CardHolderName"); - - b.Property("CardNumber"); - - b.Property("CardType"); - - b.Property("City"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Country"); - - b.Property("CountryCode"); - - b.Property("Email") - .HasAnnotation("MaxLength", 256); - - b.Property("EmailConfirmed"); - - b.Property("Expiration"); - - b.Property("Latitude"); - - b.Property("LockoutEnabled"); - - b.Property("LockoutEnd"); - - b.Property("Longitude"); - - b.Property("NormalizedEmail") - .HasAnnotation("MaxLength", 256); - - b.Property("NormalizedUserName") - .HasAnnotation("MaxLength", 256); - - b.Property("PasswordHash"); - - b.Property("PhoneNumber"); - - b.Property("PhoneNumberConfirmed"); - - b.Property("SecurityNumber"); - - b.Property("SecurityStamp"); - - b.Property("State"); - - b.Property("StateCode"); - - b.Property("Street"); - - b.Property("TwoFactorEnabled"); - - b.Property("UserName") - .HasAnnotation("MaxLength", 256); - - b.Property("ZipCode"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasName("UserNameIndex"); - - b.ToTable("AspNetUsers"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole") - .WithMany("Claims") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim", b => - { - b.HasOne("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser") - .WithMany("Claims") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin", b => - { - b.HasOne("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser") - .WithMany("Logins") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole", b => - { - b.HasOne("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole") - .WithMany("Users") - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade); - - b.HasOne("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser") - .WithMany("Roles") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade); - }); - } - } -} diff --git a/src/Services/Identity/Identity.API/Data/Migrations/20161020101725_extendProfile.cs b/src/Services/Identity/Identity.API/Data/Migrations/20161020101725_extendProfile.cs deleted file mode 100644 index 46dfceb9a..000000000 --- a/src/Services/Identity/Identity.API/Data/Migrations/20161020101725_extendProfile.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace WebMVC.Migrations -{ - public partial class extendProfile : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AddColumn( - name: "LastName", - table: "AspNetUsers", - nullable: true); - - migrationBuilder.AddColumn( - name: "Name", - table: "AspNetUsers", - nullable: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropColumn( - name: "LastName", - table: "AspNetUsers"); - - migrationBuilder.DropColumn( - name: "Name", - table: "AspNetUsers"); - } - } -} diff --git a/src/Services/Identity/Identity.API/Dockerfile b/src/Services/Identity/Identity.API/Dockerfile index bd01695f3..029b5893e 100644 --- a/src/Services/Identity/Identity.API/Dockerfile +++ b/src/Services/Identity/Identity.API/Dockerfile @@ -1,4 +1,4 @@ -FROM microsoft/aspnetcore:1.1.2 +FROM microsoft/aspnetcore:2.0.0 ARG source WORKDIR /app EXPOSE 80 diff --git a/src/Services/Identity/Identity.API/Dockerfile.nanowin b/src/Services/Identity/Identity.API/Dockerfile.nanowin deleted file mode 100644 index 9d24ccf1a..000000000 --- a/src/Services/Identity/Identity.API/Dockerfile.nanowin +++ /dev/null @@ -1,8 +0,0 @@ -FROM microsoft/dotnet:1.1-runtime-nanoserver -SHELL ["powershell"] -ARG source -WORKDIR /app -RUN set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord -EXPOSE 80 -COPY ${source:-obj/Docker/publish} . -ENTRYPOINT ["dotnet", "Identity.API.dll"] diff --git a/src/Services/Identity/Identity.API/Extensions/LinqSelectExtensions.cs b/src/Services/Identity/Identity.API/Extensions/LinqSelectExtensions.cs index e3ff0a3c0..1061881af 100644 --- a/src/Services/Identity/Identity.API/Extensions/LinqSelectExtensions.cs +++ b/src/Services/Identity/Identity.API/Extensions/LinqSelectExtensions.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace Identity.API.Extensions +namespace Microsoft.eShopOnContainers.Services.Identity.API.Extensions { public static class LinqSelectExtensions { diff --git a/src/Services/Identity/Identity.API/Identity.API.csproj b/src/Services/Identity/Identity.API/Identity.API.csproj index 1fd2a7fa8..8d761b9ed 100644 --- a/src/Services/Identity/Identity.API/Identity.API.csproj +++ b/src/Services/Identity/Identity.API/Identity.API.csproj @@ -1,11 +1,10 @@  - netcoreapp1.1 - 1.1.2 - Exe + netcoreapp2.0 + 2.0.0 aspnet-eShopOnContainers.Identity-90487118-103c-4ff0-b9da-e5e26f7ab0c5 - $(PackageTargetFallback);dotnet5.6;portable-net45+win8 + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; ..\..\..\..\docker-compose.dcproj @@ -16,36 +15,14 @@ - - - - - - - - - - - - - All - - - All - - - - - - - - - - - All - - - + + + + + + + + @@ -55,10 +32,10 @@ - - - - + + + + @@ -70,6 +47,7 @@ + @@ -83,7 +61,6 @@ - diff --git a/src/Services/Identity/Identity.API/Migrations/20170604151240_Init-persisted-grant.cs b/src/Services/Identity/Identity.API/Migrations/20170604151240_Init-persisted-grant.cs deleted file mode 100644 index 51c896f5f..000000000 --- a/src/Services/Identity/Identity.API/Migrations/20170604151240_Init-persisted-grant.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore.Migrations; - -namespace Identity.API.Migrations -{ - public partial class Initpersistedgrant : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "PersistedGrants", - columns: table => new - { - Key = table.Column(maxLength: 200, nullable: false), - ClientId = table.Column(maxLength: 200, nullable: false), - CreationTime = table.Column(nullable: false), - Data = table.Column(maxLength: 50000, nullable: false), - Expiration = table.Column(nullable: true), - SubjectId = table.Column(maxLength: 200, nullable: true), - Type = table.Column(maxLength: 50, nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_PersistedGrants", x => x.Key); - }); - - migrationBuilder.CreateIndex( - name: "IX_PersistedGrants_SubjectId_ClientId_Type", - table: "PersistedGrants", - columns: new[] { "SubjectId", "ClientId", "Type" }); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "PersistedGrants"); - } - } -} diff --git a/src/Services/Identity/Identity.API/Data/Migrations/20161020101725_extendProfile.Designer.cs b/src/Services/Identity/Identity.API/Migrations/20170912114036_Initial.Designer.cs similarity index 55% rename from src/Services/Identity/Identity.API/Data/Migrations/20161020101725_extendProfile.Designer.cs rename to src/Services/Identity/Identity.API/Migrations/20170912114036_Initial.Designer.cs index 2d118647d..0850b37b9 100644 --- a/src/Services/Identity/Identity.API/Data/Migrations/20161020101725_extendProfile.Designer.cs +++ b/src/Services/Identity/Identity.API/Migrations/20170912114036_Initial.Designer.cs @@ -1,44 +1,135 @@ -using System; +// using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using Identity.API.Data; +using Microsoft.eShopOnContainers.Services.Identity.API.Data; +using System; -namespace WebMVC.Migrations +namespace Identity.API.Migrations { [DbContext(typeof(ApplicationDbContext))] - [Migration("20161020101725_extendProfile")] - partial class extendProfile + [Migration("20170912114036_Initial")] + partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) { +#pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "1.0.0-rtm-21431") + .HasAnnotation("ProductVersion", "2.0.0-rtm-26452") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole", b => + modelBuilder.Entity("Identity.API.Models.ApplicationUser", b => { - b.Property("Id"); + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AccessFailedCount"); + + b.Property("CardHolderName") + .IsRequired(); + + b.Property("CardNumber") + .IsRequired(); + + b.Property("CardType"); + + b.Property("City") + .IsRequired(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken(); + + b.Property("Country") + .IsRequired(); + + b.Property("Email") + .HasMaxLength(256); + + b.Property("EmailConfirmed"); + + b.Property("Expiration") + .IsRequired(); + + b.Property("LastName") + .IsRequired(); + + b.Property("LockoutEnabled"); + + b.Property("LockoutEnd"); + + b.Property("Name") + .IsRequired(); + + b.Property("NormalizedEmail") + .HasMaxLength(256); + + b.Property("NormalizedUserName") + .HasMaxLength(256); + + b.Property("PasswordHash"); + + b.Property("PhoneNumber"); + + b.Property("PhoneNumberConfirmed"); + + b.Property("SecurityNumber") + .IsRequired(); + + b.Property("SecurityStamp"); + + b.Property("State") + .IsRequired(); + + b.Property("Street") + .IsRequired(); + + b.Property("TwoFactorEnabled"); + + b.Property("UserName") + .HasMaxLength(256); + + b.Property("ZipCode") + .IsRequired(); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasName("UserNameIndex") + .HasFilter("[NormalizedUserName] IS NOT NULL"); + + b.ToTable("AspNetUsers"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); b.Property("ConcurrencyStamp") .IsConcurrencyToken(); b.Property("Name") - .HasAnnotation("MaxLength", 256); + .HasMaxLength(256); b.Property("NormalizedName") - .HasAnnotation("MaxLength", 256); + .HasMaxLength(256); b.HasKey("Id"); b.HasIndex("NormalizedName") - .HasName("RoleNameIndex"); + .IsUnique() + .HasName("RoleNameIndex") + .HasFilter("[NormalizedName] IS NOT NULL"); b.ToTable("AspNetRoles"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -57,7 +148,7 @@ namespace WebMVC.Migrations b.ToTable("AspNetRoleClaims"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -76,7 +167,7 @@ namespace WebMVC.Migrations b.ToTable("AspNetUserClaims"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider"); @@ -94,7 +185,7 @@ namespace WebMVC.Migrations b.ToTable("AspNetUserLogins"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.Property("UserId"); @@ -104,12 +195,10 @@ namespace WebMVC.Migrations b.HasIndex("RoleId"); - b.HasIndex("UserId"); - b.ToTable("AspNetUserRoles"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserToken", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.Property("UserId"); @@ -124,123 +213,51 @@ namespace WebMVC.Migrations b.ToTable("AspNetUserTokens"); }); - modelBuilder.Entity("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser", b => - { - b.Property("Id"); - - b.Property("AccessFailedCount"); - - b.Property("CardHolderName"); - - b.Property("CardNumber"); - - b.Property("CardType"); - - b.Property("City"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Country"); - - b.Property("CountryCode"); - - b.Property("Email") - .HasAnnotation("MaxLength", 256); - - b.Property("EmailConfirmed"); - - b.Property("Expiration"); - - b.Property("LastName"); - - b.Property("Latitude"); - - b.Property("LockoutEnabled"); - - b.Property("LockoutEnd"); - - b.Property("Longitude"); - - b.Property("Name"); - - b.Property("NormalizedEmail") - .HasAnnotation("MaxLength", 256); - - b.Property("NormalizedUserName") - .HasAnnotation("MaxLength", 256); - - b.Property("PasswordHash"); - - b.Property("PhoneNumber"); - - b.Property("PhoneNumberConfirmed"); - - b.Property("SecurityNumber"); - - b.Property("SecurityStamp"); - - b.Property("State"); - - b.Property("StateCode"); - - b.Property("Street"); - - b.Property("TwoFactorEnabled"); - - b.Property("UserName") - .HasAnnotation("MaxLength", 256); - - b.Property("ZipCode"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasName("UserNameIndex"); - - b.ToTable("AspNetUsers"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { - b.HasOne("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole") - .WithMany("Claims") + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole") + .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { - b.HasOne("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser") - .WithMany("Claims") + b.HasOne("Identity.API.Models.ApplicationUser") + .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { - b.HasOne("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser") - .WithMany("Logins") + b.HasOne("Identity.API.Models.ApplicationUser") + .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { - b.HasOne("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole") - .WithMany("Users") + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole") + .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser") - .WithMany("Roles") + b.HasOne("Identity.API.Models.ApplicationUser") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Identity.API.Models.ApplicationUser") + .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); +#pragma warning restore 612, 618 } } } diff --git a/src/Services/Identity/Identity.API/Data/Migrations/20161019122215_Init_Scheme.cs b/src/Services/Identity/Identity.API/Migrations/20170912114036_Initial.cs similarity index 53% rename from src/Services/Identity/Identity.API/Data/Migrations/20161019122215_Init_Scheme.cs rename to src/Services/Identity/Identity.API/Migrations/20170912114036_Initial.cs index 278c3f422..cf771dac8 100644 --- a/src/Services/Identity/Identity.API/Data/Migrations/20161019122215_Init_Scheme.cs +++ b/src/Services/Identity/Identity.API/Migrations/20170912114036_Initial.cs @@ -1,11 +1,11 @@ -using System; -using System.Collections.Generic; +using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Metadata; +using System; +using System.Collections.Generic; -namespace WebMVC.Migrations +namespace Identity.API.Migrations { - public partial class Init_Scheme : Migration + public partial class Initial : Migration { protected override void Up(MigrationBuilder migrationBuilder) { @@ -13,59 +13,47 @@ namespace WebMVC.Migrations name: "AspNetRoles", columns: table => new { - Id = table.Column(nullable: false), - ConcurrencyStamp = table.Column(nullable: true), - Name = table.Column(maxLength: 256, nullable: true), - NormalizedName = table.Column(maxLength: 256, nullable: true) + Id = table.Column(type: "nvarchar(450)", nullable: false), + ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true), + Name = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + NormalizedName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true) }, constraints: table => { table.PrimaryKey("PK_AspNetRoles", x => x.Id); }); - migrationBuilder.CreateTable( - name: "AspNetUserTokens", - columns: table => new - { - UserId = table.Column(nullable: false), - LoginProvider = table.Column(nullable: false), - Name = table.Column(nullable: false), - Value = table.Column(nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); - }); - migrationBuilder.CreateTable( name: "AspNetUsers", columns: table => new { - Id = table.Column(nullable: false), - AccessFailedCount = table.Column(nullable: false), - CardHolderName = table.Column(nullable: true), - CardNumber = table.Column(nullable: true), - CardType = table.Column(nullable: false), - City = table.Column(nullable: true), - ConcurrencyStamp = table.Column(nullable: true), - Country = table.Column(nullable: true), - Email = table.Column(maxLength: 256, nullable: true), - EmailConfirmed = table.Column(nullable: false), - Expiration = table.Column(nullable: true), - LockoutEnabled = table.Column(nullable: false), - LockoutEnd = table.Column(nullable: true), - NormalizedEmail = table.Column(maxLength: 256, nullable: true), - NormalizedUserName = table.Column(maxLength: 256, nullable: true), - PasswordHash = table.Column(nullable: true), - PhoneNumber = table.Column(nullable: true), - PhoneNumberConfirmed = table.Column(nullable: false), - SecurityNumber = table.Column(nullable: true), - SecurityStamp = table.Column(nullable: true), - State = table.Column(nullable: true), - Street = table.Column(nullable: true), - TwoFactorEnabled = table.Column(nullable: false), - UserName = table.Column(maxLength: 256, nullable: true), - ZipCode = table.Column(nullable: true) + Id = table.Column(type: "nvarchar(450)", nullable: false), + AccessFailedCount = table.Column(type: "int", nullable: false), + CardHolderName = table.Column(type: "nvarchar(max)", nullable: false), + CardNumber = table.Column(type: "nvarchar(max)", nullable: false), + CardType = table.Column(type: "int", nullable: false), + City = table.Column(type: "nvarchar(max)", nullable: false), + ConcurrencyStamp = table.Column(type: "nvarchar(max)", nullable: true), + Country = table.Column(type: "nvarchar(max)", nullable: false), + Email = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + EmailConfirmed = table.Column(type: "bit", nullable: false), + Expiration = table.Column(type: "nvarchar(max)", nullable: false), + LastName = table.Column(type: "nvarchar(max)", nullable: false), + LockoutEnabled = table.Column(type: "bit", nullable: false), + LockoutEnd = table.Column(type: "datetimeoffset", nullable: true), + Name = table.Column(type: "nvarchar(max)", nullable: false), + NormalizedEmail = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + NormalizedUserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + PasswordHash = table.Column(type: "nvarchar(max)", nullable: true), + PhoneNumber = table.Column(type: "nvarchar(max)", nullable: true), + PhoneNumberConfirmed = table.Column(type: "bit", nullable: false), + SecurityNumber = table.Column(type: "nvarchar(max)", nullable: false), + SecurityStamp = table.Column(type: "nvarchar(max)", nullable: true), + State = table.Column(type: "nvarchar(max)", nullable: false), + Street = table.Column(type: "nvarchar(max)", nullable: false), + TwoFactorEnabled = table.Column(type: "bit", nullable: false), + UserName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ZipCode = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { @@ -76,11 +64,11 @@ namespace WebMVC.Migrations name: "AspNetRoleClaims", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ClaimType = table.Column(nullable: true), - ClaimValue = table.Column(nullable: true), - RoleId = table.Column(nullable: false) + ClaimType = table.Column(type: "nvarchar(max)", nullable: true), + ClaimValue = table.Column(type: "nvarchar(max)", nullable: true), + RoleId = table.Column(type: "nvarchar(450)", nullable: false) }, constraints: table => { @@ -97,11 +85,11 @@ namespace WebMVC.Migrations name: "AspNetUserClaims", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ClaimType = table.Column(nullable: true), - ClaimValue = table.Column(nullable: true), - UserId = table.Column(nullable: false) + ClaimType = table.Column(type: "nvarchar(max)", nullable: true), + ClaimValue = table.Column(type: "nvarchar(max)", nullable: true), + UserId = table.Column(type: "nvarchar(450)", nullable: false) }, constraints: table => { @@ -118,10 +106,10 @@ namespace WebMVC.Migrations name: "AspNetUserLogins", columns: table => new { - LoginProvider = table.Column(nullable: false), - ProviderKey = table.Column(nullable: false), - ProviderDisplayName = table.Column(nullable: true), - UserId = table.Column(nullable: false) + LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), + ProviderKey = table.Column(type: "nvarchar(450)", nullable: false), + ProviderDisplayName = table.Column(type: "nvarchar(max)", nullable: true), + UserId = table.Column(type: "nvarchar(450)", nullable: false) }, constraints: table => { @@ -138,8 +126,8 @@ namespace WebMVC.Migrations name: "AspNetUserRoles", columns: table => new { - UserId = table.Column(nullable: false), - RoleId = table.Column(nullable: false) + UserId = table.Column(type: "nvarchar(450)", nullable: false), + RoleId = table.Column(type: "nvarchar(450)", nullable: false) }, constraints: table => { @@ -158,16 +146,38 @@ namespace WebMVC.Migrations onDelete: ReferentialAction.Cascade); }); - migrationBuilder.CreateIndex( - name: "RoleNameIndex", - table: "AspNetRoles", - column: "NormalizedName"); + migrationBuilder.CreateTable( + name: "AspNetUserTokens", + columns: table => new + { + UserId = table.Column(type: "nvarchar(450)", nullable: false), + LoginProvider = table.Column(type: "nvarchar(450)", nullable: false), + Name = table.Column(type: "nvarchar(450)", nullable: false), + Value = table.Column(type: "nvarchar(max)", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); + table.ForeignKey( + name: "FK_AspNetUserTokens_AspNetUsers_UserId", + column: x => x.UserId, + principalTable: "AspNetUsers", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); migrationBuilder.CreateIndex( name: "IX_AspNetRoleClaims_RoleId", table: "AspNetRoleClaims", column: "RoleId"); + migrationBuilder.CreateIndex( + name: "RoleNameIndex", + table: "AspNetRoles", + column: "NormalizedName", + unique: true, + filter: "[NormalizedName] IS NOT NULL"); + migrationBuilder.CreateIndex( name: "IX_AspNetUserClaims_UserId", table: "AspNetUserClaims", @@ -183,11 +193,6 @@ namespace WebMVC.Migrations table: "AspNetUserRoles", column: "RoleId"); - migrationBuilder.CreateIndex( - name: "IX_AspNetUserRoles_UserId", - table: "AspNetUserRoles", - column: "UserId"); - migrationBuilder.CreateIndex( name: "EmailIndex", table: "AspNetUsers", @@ -197,7 +202,8 @@ namespace WebMVC.Migrations name: "UserNameIndex", table: "AspNetUsers", column: "NormalizedUserName", - unique: true); + unique: true, + filter: "[NormalizedUserName] IS NOT NULL"); } protected override void Down(MigrationBuilder migrationBuilder) diff --git a/src/Services/Identity/Identity.API/Data/Migrations/ApplicationDbContextModelSnapshot.cs b/src/Services/Identity/Identity.API/Migrations/ApplicationDbContextModelSnapshot.cs similarity index 55% rename from src/Services/Identity/Identity.API/Data/Migrations/ApplicationDbContextModelSnapshot.cs rename to src/Services/Identity/Identity.API/Migrations/ApplicationDbContextModelSnapshot.cs index 1f14e2321..dcc87bc73 100644 --- a/src/Services/Identity/Identity.API/Data/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/src/Services/Identity/Identity.API/Migrations/ApplicationDbContextModelSnapshot.cs @@ -1,42 +1,133 @@ -using System; +// using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; -using Identity.API.Data; +using Microsoft.eShopOnContainers.Services.Identity.API.Data; +using System; -namespace WebMVC.Migrations +namespace Identity.API.Migrations { [DbContext(typeof(ApplicationDbContext))] partial class ApplicationDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { +#pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "1.0.0-rtm-21431") + .HasAnnotation("ProductVersion", "2.0.0-rtm-26452") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole", b => + modelBuilder.Entity("Identity.API.Models.ApplicationUser", b => { - b.Property("Id"); + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("AccessFailedCount"); + + b.Property("CardHolderName") + .IsRequired(); + + b.Property("CardNumber") + .IsRequired(); + + b.Property("CardType"); + + b.Property("City") + .IsRequired(); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken(); + + b.Property("Country") + .IsRequired(); + + b.Property("Email") + .HasMaxLength(256); + + b.Property("EmailConfirmed"); + + b.Property("Expiration") + .IsRequired(); + + b.Property("LastName") + .IsRequired(); + + b.Property("LockoutEnabled"); + + b.Property("LockoutEnd"); + + b.Property("Name") + .IsRequired(); + + b.Property("NormalizedEmail") + .HasMaxLength(256); + + b.Property("NormalizedUserName") + .HasMaxLength(256); + + b.Property("PasswordHash"); + + b.Property("PhoneNumber"); + + b.Property("PhoneNumberConfirmed"); + + b.Property("SecurityNumber") + .IsRequired(); + + b.Property("SecurityStamp"); + + b.Property("State") + .IsRequired(); + + b.Property("Street") + .IsRequired(); + + b.Property("TwoFactorEnabled"); + + b.Property("UserName") + .HasMaxLength(256); + + b.Property("ZipCode") + .IsRequired(); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasName("UserNameIndex") + .HasFilter("[NormalizedUserName] IS NOT NULL"); + + b.ToTable("AspNetUsers"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); b.Property("ConcurrencyStamp") .IsConcurrencyToken(); b.Property("Name") - .HasAnnotation("MaxLength", 256); + .HasMaxLength(256); b.Property("NormalizedName") - .HasAnnotation("MaxLength", 256); + .HasMaxLength(256); b.HasKey("Id"); b.HasIndex("NormalizedName") - .HasName("RoleNameIndex"); + .IsUnique() + .HasName("RoleNameIndex") + .HasFilter("[NormalizedName] IS NOT NULL"); b.ToTable("AspNetRoles"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -55,7 +146,7 @@ namespace WebMVC.Migrations b.ToTable("AspNetRoleClaims"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.Property("Id") .ValueGeneratedOnAdd(); @@ -74,7 +165,7 @@ namespace WebMVC.Migrations b.ToTable("AspNetUserClaims"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider"); @@ -92,7 +183,7 @@ namespace WebMVC.Migrations b.ToTable("AspNetUserLogins"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.Property("UserId"); @@ -102,12 +193,10 @@ namespace WebMVC.Migrations b.HasIndex("RoleId"); - b.HasIndex("UserId"); - b.ToTable("AspNetUserRoles"); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserToken", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.Property("UserId"); @@ -122,123 +211,51 @@ namespace WebMVC.Migrations b.ToTable("AspNetUserTokens"); }); - modelBuilder.Entity("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser", b => - { - b.Property("Id"); - - b.Property("AccessFailedCount"); - - b.Property("CardHolderName"); - - b.Property("CardNumber"); - - b.Property("CardType"); - - b.Property("City"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken(); - - b.Property("Country"); - - b.Property("CountryCode"); - - b.Property("Email") - .HasAnnotation("MaxLength", 256); - - b.Property("EmailConfirmed"); - - b.Property("Expiration"); - - b.Property("LastName"); - - b.Property("Latitude"); - - b.Property("LockoutEnabled"); - - b.Property("LockoutEnd"); - - b.Property("Longitude"); - - b.Property("Name"); - - b.Property("NormalizedEmail") - .HasAnnotation("MaxLength", 256); - - b.Property("NormalizedUserName") - .HasAnnotation("MaxLength", 256); - - b.Property("PasswordHash"); - - b.Property("PhoneNumber"); - - b.Property("PhoneNumberConfirmed"); - - b.Property("SecurityNumber"); - - b.Property("SecurityStamp"); - - b.Property("State"); - - b.Property("StateCode"); - - b.Property("Street"); - - b.Property("TwoFactorEnabled"); - - b.Property("UserName") - .HasAnnotation("MaxLength", 256); - - b.Property("ZipCode"); - - b.HasKey("Id"); - - b.HasIndex("NormalizedEmail") - .HasName("EmailIndex"); - - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasName("UserNameIndex"); - - b.ToTable("AspNetUsers"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { - b.HasOne("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole") - .WithMany("Claims") + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole") + .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { - b.HasOne("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser") - .WithMany("Claims") + b.HasOne("Identity.API.Models.ApplicationUser") + .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { - b.HasOne("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser") - .WithMany("Logins") + b.HasOne("Identity.API.Models.ApplicationUser") + .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole", b => + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { - b.HasOne("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole") - .WithMany("Users") + b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole") + .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade); - b.HasOne("Microsoft.eShopOnContainers.WebMVC.ViewModels.ApplicationUser") - .WithMany("Roles") + b.HasOne("Identity.API.Models.ApplicationUser") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Identity.API.Models.ApplicationUser") + .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); +#pragma warning restore 612, 618 } } } diff --git a/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170604151338_Init-configuration.Designer.cs b/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170927170433_Config.Designer.cs similarity index 88% rename from src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170604151338_Init-configuration.Designer.cs rename to src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170927170433_Config.Designer.cs index 9e6eb2500..327d2fee0 100644 --- a/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170604151338_Init-configuration.Designer.cs +++ b/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170927170433_Config.Designer.cs @@ -1,20 +1,24 @@ -using System; +// +using IdentityServer4.EntityFramework.DbContexts; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using IdentityServer4.EntityFramework.DbContexts; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.EntityFrameworkCore.Storage.Internal; +using System; namespace Identity.API.Migrations.ConfigurationDb { [DbContext(typeof(ConfigurationDbContext))] - [Migration("20170604151338_Init-configuration")] - partial class Initconfiguration + [Migration("20170927170433_Config")] + partial class Config { protected override void BuildTargetModel(ModelBuilder modelBuilder) { +#pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "1.1.2") + .HasAnnotation("ProductVersion", "2.0.0-rtm-26452") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiResource", b => @@ -165,6 +169,14 @@ namespace Identity.API.Migrations.ConfigurationDb b.Property("AuthorizationCodeLifetime"); + b.Property("BackChannelLogoutSessionRequired"); + + b.Property("BackChannelLogoutUri") + .HasMaxLength(2000); + + b.Property("ClientClaimsPrefix") + .HasMaxLength(200); + b.Property("ClientId") .IsRequired() .HasMaxLength(200); @@ -175,21 +187,29 @@ namespace Identity.API.Migrations.ConfigurationDb b.Property("ClientUri") .HasMaxLength(2000); + b.Property("ConsentLifetime"); + + b.Property("Description") + .HasMaxLength(1000); + b.Property("EnableLocalLogin"); b.Property("Enabled"); - b.Property("IdentityTokenLifetime"); + b.Property("FrontChannelLogoutSessionRequired"); - b.Property("IncludeJwtId"); + b.Property("FrontChannelLogoutUri") + .HasMaxLength(2000); - b.Property("LogoUri"); + b.Property("IdentityTokenLifetime"); - b.Property("LogoutSessionRequired"); + b.Property("IncludeJwtId"); - b.Property("LogoutUri"); + b.Property("LogoUri") + .HasMaxLength(2000); - b.Property("PrefixClientClaims"); + b.Property("PairWiseSubjectSalt") + .HasMaxLength(200); b.Property("ProtocolType") .IsRequired() @@ -316,6 +336,29 @@ namespace Identity.API.Migrations.ConfigurationDb b.ToTable("ClientPostLogoutRedirectUris"); }); + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientProperty", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ClientId") + .IsRequired(); + + b.Property("Key") + .IsRequired() + .HasMaxLength(250); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2000); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("ClientProperties"); + }); + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientRedirectUri", b => { b.Property("Id") @@ -503,6 +546,14 @@ namespace Identity.API.Migrations.ConfigurationDb .OnDelete(DeleteBehavior.Cascade); }); + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientProperty", b => + { + b.HasOne("IdentityServer4.EntityFramework.Entities.Client", "Client") + .WithMany("Properties") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade); + }); + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientRedirectUri", b => { b.HasOne("IdentityServer4.EntityFramework.Entities.Client", "Client") @@ -534,6 +585,7 @@ namespace Identity.API.Migrations.ConfigurationDb .HasForeignKey("IdentityResourceId") .OnDelete(DeleteBehavior.Cascade); }); +#pragma warning restore 612, 618 } } } diff --git a/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170604151338_Init-configuration.cs b/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170927170433_Config.cs similarity index 62% rename from src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170604151338_Init-configuration.cs rename to src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170927170433_Config.cs index 8cf20e865..754c75486 100644 --- a/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170604151338_Init-configuration.cs +++ b/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/20170927170433_Config.cs @@ -1,11 +1,10 @@ -using System; -using System.Collections.Generic; +using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Metadata; +using System; namespace Identity.API.Migrations.ConfigurationDb { - public partial class Initconfiguration : Migration + public partial class Config : Migration { protected override void Up(MigrationBuilder migrationBuilder) { @@ -13,12 +12,12 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ApiResources", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - Description = table.Column(maxLength: 1000, nullable: true), - DisplayName = table.Column(maxLength: 200, nullable: true), - Enabled = table.Column(nullable: false), - Name = table.Column(maxLength: 200, nullable: false) + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Enabled = table.Column(type: "bit", nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) }, constraints: table => { @@ -29,37 +28,42 @@ namespace Identity.API.Migrations.ConfigurationDb name: "Clients", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - AbsoluteRefreshTokenLifetime = table.Column(nullable: false), - AccessTokenLifetime = table.Column(nullable: false), - AccessTokenType = table.Column(nullable: false), - AllowAccessTokensViaBrowser = table.Column(nullable: false), - AllowOfflineAccess = table.Column(nullable: false), - AllowPlainTextPkce = table.Column(nullable: false), - AllowRememberConsent = table.Column(nullable: false), - AlwaysIncludeUserClaimsInIdToken = table.Column(nullable: false), - AlwaysSendClientClaims = table.Column(nullable: false), - AuthorizationCodeLifetime = table.Column(nullable: false), - ClientId = table.Column(maxLength: 200, nullable: false), - ClientName = table.Column(maxLength: 200, nullable: true), - ClientUri = table.Column(maxLength: 2000, nullable: true), - EnableLocalLogin = table.Column(nullable: false), - Enabled = table.Column(nullable: false), - IdentityTokenLifetime = table.Column(nullable: false), - IncludeJwtId = table.Column(nullable: false), - LogoUri = table.Column(nullable: true), - LogoutSessionRequired = table.Column(nullable: false), - LogoutUri = table.Column(nullable: true), - PrefixClientClaims = table.Column(nullable: false), - ProtocolType = table.Column(maxLength: 200, nullable: false), - RefreshTokenExpiration = table.Column(nullable: false), - RefreshTokenUsage = table.Column(nullable: false), - RequireClientSecret = table.Column(nullable: false), - RequireConsent = table.Column(nullable: false), - RequirePkce = table.Column(nullable: false), - SlidingRefreshTokenLifetime = table.Column(nullable: false), - UpdateAccessTokenClaimsOnRefresh = table.Column(nullable: false) + AbsoluteRefreshTokenLifetime = table.Column(type: "int", nullable: false), + AccessTokenLifetime = table.Column(type: "int", nullable: false), + AccessTokenType = table.Column(type: "int", nullable: false), + AllowAccessTokensViaBrowser = table.Column(type: "bit", nullable: false), + AllowOfflineAccess = table.Column(type: "bit", nullable: false), + AllowPlainTextPkce = table.Column(type: "bit", nullable: false), + AllowRememberConsent = table.Column(type: "bit", nullable: false), + AlwaysIncludeUserClaimsInIdToken = table.Column(type: "bit", nullable: false), + AlwaysSendClientClaims = table.Column(type: "bit", nullable: false), + AuthorizationCodeLifetime = table.Column(type: "int", nullable: false), + BackChannelLogoutSessionRequired = table.Column(type: "bit", nullable: false), + BackChannelLogoutUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + ClientClaimsPrefix = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + ClientName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + ClientUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + ConsentLifetime = table.Column(type: "int", nullable: true), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + EnableLocalLogin = table.Column(type: "bit", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + FrontChannelLogoutSessionRequired = table.Column(type: "bit", nullable: false), + FrontChannelLogoutUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + IdentityTokenLifetime = table.Column(type: "int", nullable: false), + IncludeJwtId = table.Column(type: "bit", nullable: false), + LogoUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + PairWiseSubjectSalt = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + ProtocolType = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + RefreshTokenExpiration = table.Column(type: "int", nullable: false), + RefreshTokenUsage = table.Column(type: "int", nullable: false), + RequireClientSecret = table.Column(type: "bit", nullable: false), + RequireConsent = table.Column(type: "bit", nullable: false), + RequirePkce = table.Column(type: "bit", nullable: false), + SlidingRefreshTokenLifetime = table.Column(type: "int", nullable: false), + UpdateAccessTokenClaimsOnRefresh = table.Column(type: "bit", nullable: false) }, constraints: table => { @@ -70,15 +74,15 @@ namespace Identity.API.Migrations.ConfigurationDb name: "IdentityResources", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - Description = table.Column(maxLength: 1000, nullable: true), - DisplayName = table.Column(maxLength: 200, nullable: true), - Emphasize = table.Column(nullable: false), - Enabled = table.Column(nullable: false), - Name = table.Column(maxLength: 200, nullable: false), - Required = table.Column(nullable: false), - ShowInDiscoveryDocument = table.Column(nullable: false) + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Emphasize = table.Column(type: "bit", nullable: false), + Enabled = table.Column(type: "bit", nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Required = table.Column(type: "bit", nullable: false), + ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false) }, constraints: table => { @@ -89,10 +93,10 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ApiClaims", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ApiResourceId = table.Column(nullable: false), - Type = table.Column(maxLength: 200, nullable: false) + ApiResourceId = table.Column(type: "int", nullable: false), + Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) }, constraints: table => { @@ -109,15 +113,15 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ApiScopes", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ApiResourceId = table.Column(nullable: false), - Description = table.Column(maxLength: 1000, nullable: true), - DisplayName = table.Column(maxLength: 200, nullable: true), - Emphasize = table.Column(nullable: false), - Name = table.Column(maxLength: 200, nullable: false), - Required = table.Column(nullable: false), - ShowInDiscoveryDocument = table.Column(nullable: false) + ApiResourceId = table.Column(type: "int", nullable: false), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + DisplayName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Emphasize = table.Column(type: "bit", nullable: false), + Name = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + Required = table.Column(type: "bit", nullable: false), + ShowInDiscoveryDocument = table.Column(type: "bit", nullable: false) }, constraints: table => { @@ -134,13 +138,13 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ApiSecrets", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ApiResourceId = table.Column(nullable: false), - Description = table.Column(maxLength: 1000, nullable: true), - Expiration = table.Column(nullable: true), - Type = table.Column(maxLength: 250, nullable: true), - Value = table.Column(maxLength: 2000, nullable: true) + ApiResourceId = table.Column(type: "int", nullable: false), + Description = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: true), + Expiration = table.Column(type: "datetime2", nullable: true), + Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: true), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true) }, constraints: table => { @@ -157,11 +161,11 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ClientClaims", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ClientId = table.Column(nullable: false), - Type = table.Column(maxLength: 250, nullable: false), - Value = table.Column(maxLength: 250, nullable: false) + ClientId = table.Column(type: "int", nullable: false), + Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false) }, constraints: table => { @@ -178,10 +182,10 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ClientCorsOrigins", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ClientId = table.Column(nullable: false), - Origin = table.Column(maxLength: 150, nullable: false) + ClientId = table.Column(type: "int", nullable: false), + Origin = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false) }, constraints: table => { @@ -198,10 +202,10 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ClientGrantTypes", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ClientId = table.Column(nullable: false), - GrantType = table.Column(maxLength: 250, nullable: false) + ClientId = table.Column(type: "int", nullable: false), + GrantType = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false) }, constraints: table => { @@ -218,10 +222,10 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ClientIdPRestrictions", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ClientId = table.Column(nullable: false), - Provider = table.Column(maxLength: 200, nullable: false) + ClientId = table.Column(type: "int", nullable: false), + Provider = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) }, constraints: table => { @@ -238,10 +242,10 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ClientPostLogoutRedirectUris", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ClientId = table.Column(nullable: false), - PostLogoutRedirectUri = table.Column(maxLength: 2000, nullable: false) + ClientId = table.Column(type: "int", nullable: false), + PostLogoutRedirectUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { @@ -254,14 +258,35 @@ namespace Identity.API.Migrations.ConfigurationDb onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateTable( + name: "ClientProperties", + columns: table => new + { + Id = table.Column(type: "int", nullable: false) + .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), + ClientId = table.Column(type: "int", nullable: false), + Key = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: false), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ClientProperties", x => x.Id); + table.ForeignKey( + name: "FK_ClientProperties_Clients_ClientId", + column: x => x.ClientId, + principalTable: "Clients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + migrationBuilder.CreateTable( name: "ClientRedirectUris", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ClientId = table.Column(nullable: false), - RedirectUri = table.Column(maxLength: 2000, nullable: false) + ClientId = table.Column(type: "int", nullable: false), + RedirectUri = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { @@ -278,10 +303,10 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ClientScopes", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ClientId = table.Column(nullable: false), - Scope = table.Column(maxLength: 200, nullable: false) + ClientId = table.Column(type: "int", nullable: false), + Scope = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) }, constraints: table => { @@ -298,13 +323,13 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ClientSecrets", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ClientId = table.Column(nullable: false), - Description = table.Column(maxLength: 2000, nullable: true), - Expiration = table.Column(nullable: true), - Type = table.Column(maxLength: 250, nullable: true), - Value = table.Column(maxLength: 2000, nullable: false) + ClientId = table.Column(type: "int", nullable: false), + Description = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: true), + Expiration = table.Column(type: "datetime2", nullable: true), + Type = table.Column(type: "nvarchar(250)", maxLength: 250, nullable: true), + Value = table.Column(type: "nvarchar(2000)", maxLength: 2000, nullable: false) }, constraints: table => { @@ -321,10 +346,10 @@ namespace Identity.API.Migrations.ConfigurationDb name: "IdentityClaims", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - IdentityResourceId = table.Column(nullable: false), - Type = table.Column(maxLength: 200, nullable: false) + IdentityResourceId = table.Column(type: "int", nullable: false), + Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) }, constraints: table => { @@ -341,10 +366,10 @@ namespace Identity.API.Migrations.ConfigurationDb name: "ApiScopeClaims", columns: table => new { - Id = table.Column(nullable: false) + Id = table.Column(type: "int", nullable: false) .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), - ApiScopeId = table.Column(nullable: false), - Type = table.Column(maxLength: 200, nullable: false) + ApiScopeId = table.Column(type: "int", nullable: false), + Type = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false) }, constraints: table => { @@ -357,6 +382,11 @@ namespace Identity.API.Migrations.ConfigurationDb onDelete: ReferentialAction.Cascade); }); + migrationBuilder.CreateIndex( + name: "IX_ApiClaims_ApiResourceId", + table: "ApiClaims", + column: "ApiResourceId"); + migrationBuilder.CreateIndex( name: "IX_ApiResources_Name", table: "ApiResources", @@ -364,9 +394,9 @@ namespace Identity.API.Migrations.ConfigurationDb unique: true); migrationBuilder.CreateIndex( - name: "IX_ApiClaims_ApiResourceId", - table: "ApiClaims", - column: "ApiResourceId"); + name: "IX_ApiScopeClaims_ApiScopeId", + table: "ApiScopeClaims", + column: "ApiScopeId"); migrationBuilder.CreateIndex( name: "IX_ApiScopes_ApiResourceId", @@ -379,22 +409,11 @@ namespace Identity.API.Migrations.ConfigurationDb column: "Name", unique: true); - migrationBuilder.CreateIndex( - name: "IX_ApiScopeClaims_ApiScopeId", - table: "ApiScopeClaims", - column: "ApiScopeId"); - migrationBuilder.CreateIndex( name: "IX_ApiSecrets_ApiResourceId", table: "ApiSecrets", column: "ApiResourceId"); - migrationBuilder.CreateIndex( - name: "IX_Clients_ClientId", - table: "Clients", - column: "ClientId", - unique: true); - migrationBuilder.CreateIndex( name: "IX_ClientClaims_ClientId", table: "ClientClaims", @@ -420,11 +439,22 @@ namespace Identity.API.Migrations.ConfigurationDb table: "ClientPostLogoutRedirectUris", column: "ClientId"); + migrationBuilder.CreateIndex( + name: "IX_ClientProperties_ClientId", + table: "ClientProperties", + column: "ClientId"); + migrationBuilder.CreateIndex( name: "IX_ClientRedirectUris_ClientId", table: "ClientRedirectUris", column: "ClientId"); + migrationBuilder.CreateIndex( + name: "IX_Clients_ClientId", + table: "Clients", + column: "ClientId", + unique: true); + migrationBuilder.CreateIndex( name: "IX_ClientScopes_ClientId", table: "ClientScopes", @@ -473,6 +503,9 @@ namespace Identity.API.Migrations.ConfigurationDb migrationBuilder.DropTable( name: "ClientPostLogoutRedirectUris"); + migrationBuilder.DropTable( + name: "ClientProperties"); + migrationBuilder.DropTable( name: "ClientRedirectUris"); diff --git a/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs b/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs index 7c725f5ae..88d9baba3 100644 --- a/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs +++ b/src/Services/Identity/Identity.API/Migrations/ConfigurationDb/ConfigurationDbContextModelSnapshot.cs @@ -1,9 +1,12 @@ -using System; +// +using IdentityServer4.EntityFramework.DbContexts; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using IdentityServer4.EntityFramework.DbContexts; +using Microsoft.EntityFrameworkCore.Storage; +using Microsoft.EntityFrameworkCore.Storage.Internal; +using System; namespace Identity.API.Migrations.ConfigurationDb { @@ -12,8 +15,9 @@ namespace Identity.API.Migrations.ConfigurationDb { protected override void BuildModel(ModelBuilder modelBuilder) { +#pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "1.1.2") + .HasAnnotation("ProductVersion", "2.0.0-rtm-26452") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ApiResource", b => @@ -164,6 +168,14 @@ namespace Identity.API.Migrations.ConfigurationDb b.Property("AuthorizationCodeLifetime"); + b.Property("BackChannelLogoutSessionRequired"); + + b.Property("BackChannelLogoutUri") + .HasMaxLength(2000); + + b.Property("ClientClaimsPrefix") + .HasMaxLength(200); + b.Property("ClientId") .IsRequired() .HasMaxLength(200); @@ -174,21 +186,29 @@ namespace Identity.API.Migrations.ConfigurationDb b.Property("ClientUri") .HasMaxLength(2000); + b.Property("ConsentLifetime"); + + b.Property("Description") + .HasMaxLength(1000); + b.Property("EnableLocalLogin"); b.Property("Enabled"); - b.Property("IdentityTokenLifetime"); + b.Property("FrontChannelLogoutSessionRequired"); - b.Property("IncludeJwtId"); + b.Property("FrontChannelLogoutUri") + .HasMaxLength(2000); - b.Property("LogoUri"); + b.Property("IdentityTokenLifetime"); - b.Property("LogoutSessionRequired"); + b.Property("IncludeJwtId"); - b.Property("LogoutUri"); + b.Property("LogoUri") + .HasMaxLength(2000); - b.Property("PrefixClientClaims"); + b.Property("PairWiseSubjectSalt") + .HasMaxLength(200); b.Property("ProtocolType") .IsRequired() @@ -315,6 +335,29 @@ namespace Identity.API.Migrations.ConfigurationDb b.ToTable("ClientPostLogoutRedirectUris"); }); + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientProperty", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("ClientId") + .IsRequired(); + + b.Property("Key") + .IsRequired() + .HasMaxLength(250); + + b.Property("Value") + .IsRequired() + .HasMaxLength(2000); + + b.HasKey("Id"); + + b.HasIndex("ClientId"); + + b.ToTable("ClientProperties"); + }); + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientRedirectUri", b => { b.Property("Id") @@ -502,6 +545,14 @@ namespace Identity.API.Migrations.ConfigurationDb .OnDelete(DeleteBehavior.Cascade); }); + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientProperty", b => + { + b.HasOne("IdentityServer4.EntityFramework.Entities.Client", "Client") + .WithMany("Properties") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade); + }); + modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.ClientRedirectUri", b => { b.HasOne("IdentityServer4.EntityFramework.Entities.Client", "Client") @@ -533,6 +584,7 @@ namespace Identity.API.Migrations.ConfigurationDb .HasForeignKey("IdentityResourceId") .OnDelete(DeleteBehavior.Cascade); }); +#pragma warning restore 612, 618 } } } diff --git a/src/Services/Identity/Identity.API/Migrations/20170604151240_Init-persisted-grant.Designer.cs b/src/Services/Identity/Identity.API/Migrations/PersistedGrantDb/20170927170423_Grants.Designer.cs similarity index 81% rename from src/Services/Identity/Identity.API/Migrations/20170604151240_Init-persisted-grant.Designer.cs rename to src/Services/Identity/Identity.API/Migrations/PersistedGrantDb/20170927170423_Grants.Designer.cs index a2b93219b..aaf24d10c 100644 --- a/src/Services/Identity/Identity.API/Migrations/20170604151240_Init-persisted-grant.Designer.cs +++ b/src/Services/Identity/Identity.API/Migrations/PersistedGrantDb/20170927170423_Grants.Designer.cs @@ -1,20 +1,23 @@ -using System; +// +using IdentityServer4.EntityFramework.DbContexts; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using IdentityServer4.EntityFramework.DbContexts; +using Microsoft.EntityFrameworkCore.Storage.Internal; +using System; -namespace Identity.API.Migrations +namespace Identity.API.Migrations.PersistedGrantDb { [DbContext(typeof(PersistedGrantDbContext))] - [Migration("20170604151240_Init-persisted-grant")] - partial class Initpersistedgrant + [Migration("20170927170423_Grants")] + partial class Grants { protected override void BuildTargetModel(ModelBuilder modelBuilder) { +#pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "1.1.2") + .HasAnnotation("ProductVersion", "2.0.0-rtm-26452") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b => @@ -47,6 +50,7 @@ namespace Identity.API.Migrations b.ToTable("PersistedGrants"); }); +#pragma warning restore 612, 618 } } } diff --git a/src/Services/Identity/Identity.API/Migrations/PersistedGrantDb/20170927170423_Grants.cs b/src/Services/Identity/Identity.API/Migrations/PersistedGrantDb/20170927170423_Grants.cs new file mode 100644 index 000000000..4017f8bf0 --- /dev/null +++ b/src/Services/Identity/Identity.API/Migrations/PersistedGrantDb/20170927170423_Grants.cs @@ -0,0 +1,39 @@ +using Microsoft.EntityFrameworkCore.Migrations; +using System; + +namespace Identity.API.Migrations.PersistedGrantDb +{ + public partial class Grants : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "PersistedGrants", + columns: table => new + { + Key = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + ClientId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false), + CreationTime = table.Column(type: "datetime2", nullable: false), + Data = table.Column(type: "nvarchar(max)", maxLength: 50000, nullable: false), + Expiration = table.Column(type: "datetime2", nullable: true), + SubjectId = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: true), + Type = table.Column(type: "nvarchar(50)", maxLength: 50, nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_PersistedGrants", x => x.Key); + }); + + migrationBuilder.CreateIndex( + name: "IX_PersistedGrants_SubjectId_ClientId_Type", + table: "PersistedGrants", + columns: new[] { "SubjectId", "ClientId", "Type" }); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "PersistedGrants"); + } + } +} diff --git a/src/Services/Identity/Identity.API/Migrations/PersistedGrantDbContextModelSnapshot.cs b/src/Services/Identity/Identity.API/Migrations/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs similarity index 85% rename from src/Services/Identity/Identity.API/Migrations/PersistedGrantDbContextModelSnapshot.cs rename to src/Services/Identity/Identity.API/Migrations/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs index ffe6bc35a..7989f0586 100644 --- a/src/Services/Identity/Identity.API/Migrations/PersistedGrantDbContextModelSnapshot.cs +++ b/src/Services/Identity/Identity.API/Migrations/PersistedGrantDb/PersistedGrantDbContextModelSnapshot.cs @@ -1,19 +1,22 @@ -using System; +// +using IdentityServer4.EntityFramework.DbContexts; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; -using IdentityServer4.EntityFramework.DbContexts; +using Microsoft.EntityFrameworkCore.Storage.Internal; +using System; -namespace Identity.API.Migrations +namespace Identity.API.Migrations.PersistedGrantDb { [DbContext(typeof(PersistedGrantDbContext))] partial class PersistedGrantDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { +#pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "1.1.2") + .HasAnnotation("ProductVersion", "2.0.0-rtm-26452") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("IdentityServer4.EntityFramework.Entities.PersistedGrant", b => @@ -46,6 +49,7 @@ namespace Identity.API.Migrations b.ToTable("PersistedGrants"); }); +#pragma warning restore 612, 618 } } } diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/ConsentInputModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/ConsentInputModel.cs index 89a2d90e7..633f37b89 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/ConsentInputModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/ConsentInputModel.cs @@ -1,10 +1,6 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. -// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. +using System.Collections.Generic; - -using System.Collections.Generic; - -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class ConsentInputModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/ConsentViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/ConsentViewModel.cs index e0df65555..c010f636f 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/ConsentViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/ConsentViewModel.cs @@ -1,12 +1,10 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. -// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. - + using System.Collections.Generic; using System.Linq; using IdentityServer4.Models; -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class ConsentViewModel : ConsentInputModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/ExternalLoginConfirmationViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/ExternalLoginConfirmationViewModel.cs index 526f320ba..5d4f597a2 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/ExternalLoginConfirmationViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/ExternalLoginConfirmationViewModel.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class ExternalLoginConfirmationViewModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/ForgotPasswordViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/ForgotPasswordViewModel.cs index fd00ca55f..f5dd3ab61 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/ForgotPasswordViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/ForgotPasswordViewModel.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class ForgotPasswordViewModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/LoggedOutViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/LoggedOutViewModel.cs index d78c9e984..bd7f7c7bb 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/LoggedOutViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/LoggedOutViewModel.cs @@ -1,8 +1,4 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. -// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. - - -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class LoggedOutViewModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/LoginViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/LoginViewModel.cs index edb29a8d2..3b1926cc2 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/LoginViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/LoginViewModel.cs @@ -1,10 +1,6 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. -// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. +using System.ComponentModel.DataAnnotations; - -using System.ComponentModel.DataAnnotations; - -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class LoginViewModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/LogoutViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/LogoutViewModel.cs index fd5153288..d81dcd6ac 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/LogoutViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/LogoutViewModel.cs @@ -1,8 +1,4 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. -// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. - - -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class LogoutViewModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/RegisterViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/RegisterViewModel.cs index c84c1478d..df97bb965 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/RegisterViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/RegisterViewModel.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class RegisterViewModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/ResetPasswordViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/ResetPasswordViewModel.cs index a90c4ca64..57edc44c3 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/ResetPasswordViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/ResetPasswordViewModel.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class ResetPasswordViewModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/SendCodeViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/SendCodeViewModel.cs index b5efaed34..a6f316c48 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/SendCodeViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/SendCodeViewModel.cs @@ -1,10 +1,7 @@ -using System; +using Microsoft.AspNetCore.Mvc.Rendering; using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Rendering; -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class SendCodeViewModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/VerifyCodeViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/VerifyCodeViewModel.cs index f0a18d663..83d075f9c 100644 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/VerifyCodeViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/AccountViewModels/VerifyCodeViewModel.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; -namespace Identity.API.Models.AccountViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels { public class VerifyCodeViewModel { diff --git a/src/Services/Identity/Identity.API/Models/AccountViewModels/_LoginViewModel.cs b/src/Services/Identity/Identity.API/Models/AccountViewModels/_LoginViewModel.cs deleted file mode 100644 index 63290cb8a..000000000 --- a/src/Services/Identity/Identity.API/Models/AccountViewModels/_LoginViewModel.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. -// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. - - -using System.Collections.Generic; - -namespace Identity.API.Models.AccountViewModels -{ - //public class _LoginViewModel : LoginViewModel - //{ - // public bool EnableLocalLogin { get; set; } - // public IEnumerable ExternalProviders { get; set; } - //} - - //public class ExternalProvider - //{ - // public string DisplayName { get; set; } - // public string AuthenticationScheme { get; set; } - //} -} \ No newline at end of file diff --git a/src/Services/Identity/Identity.API/Models/ApplicationUser.cs b/src/Services/Identity/Identity.API/Models/ApplicationUser.cs index b520c333b..fa43017fc 100644 --- a/src/Services/Identity/Identity.API/Models/ApplicationUser.cs +++ b/src/Services/Identity/Identity.API/Models/ApplicationUser.cs @@ -1,11 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Identity.EntityFrameworkCore; +using Microsoft.AspNetCore.Identity; using System.ComponentModel.DataAnnotations; -namespace Identity.API.Models +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models { // Add profile data for application users by adding properties to the ApplicationUser class public class ApplicationUser : IdentityUser diff --git a/src/Services/Identity/Identity.API/Models/ErrorViewModel.cs b/src/Services/Identity/Identity.API/Models/ErrorViewModel.cs index 379377aec..b101bca7a 100644 --- a/src/Services/Identity/Identity.API/Models/ErrorViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/ErrorViewModel.cs @@ -4,7 +4,7 @@ using IdentityServer4.Models; -namespace IdentityServer4.Quickstart.UI.Models +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models { public class ErrorViewModel { diff --git a/src/Services/Identity/Identity.API/Models/ManageViewModels/AddPhoneNumberViewModel.cs b/src/Services/Identity/Identity.API/Models/ManageViewModels/AddPhoneNumberViewModel.cs index ada4b8a03..2a1cc49d0 100644 --- a/src/Services/Identity/Identity.API/Models/ManageViewModels/AddPhoneNumberViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/ManageViewModels/AddPhoneNumberViewModel.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; -namespace Identity.API.Models.ManageViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels { public class AddPhoneNumberViewModel { diff --git a/src/Services/Identity/Identity.API/Models/ManageViewModels/ChangePasswordViewModel.cs b/src/Services/Identity/Identity.API/Models/ManageViewModels/ChangePasswordViewModel.cs index b0df1b2af..fa9193c38 100644 --- a/src/Services/Identity/Identity.API/Models/ManageViewModels/ChangePasswordViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/ManageViewModels/ChangePasswordViewModel.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; -namespace Identity.API.Models.ManageViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels { public class ChangePasswordViewModel { diff --git a/src/Services/Identity/Identity.API/Models/ManageViewModels/ConfigureTwoFactorViewModel.cs b/src/Services/Identity/Identity.API/Models/ManageViewModels/ConfigureTwoFactorViewModel.cs index 5ed3b2925..15cf719fa 100644 --- a/src/Services/Identity/Identity.API/Models/ManageViewModels/ConfigureTwoFactorViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/ManageViewModels/ConfigureTwoFactorViewModel.cs @@ -1,10 +1,7 @@ -using System; +using Microsoft.AspNetCore.Mvc.Rendering; using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc.Rendering; -namespace Identity.API.Models.ManageViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels { public class ConfigureTwoFactorViewModel { diff --git a/src/Services/Identity/Identity.API/Models/ManageViewModels/FactorViewModel.cs b/src/Services/Identity/Identity.API/Models/ManageViewModels/FactorViewModel.cs index 92eccf504..4a6d4497f 100644 --- a/src/Services/Identity/Identity.API/Models/ManageViewModels/FactorViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/ManageViewModels/FactorViewModel.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Identity.API.Models.ManageViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels { public class FactorViewModel { diff --git a/src/Services/Identity/Identity.API/Models/ManageViewModels/IndexViewModel.cs b/src/Services/Identity/Identity.API/Models/ManageViewModels/IndexViewModel.cs index f6e5b6874..b13bc18e3 100644 --- a/src/Services/Identity/Identity.API/Models/ManageViewModels/IndexViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/ManageViewModels/IndexViewModel.cs @@ -1,10 +1,7 @@ -using System; +using Microsoft.AspNetCore.Identity; using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Identity; -namespace Identity.API.Models.ManageViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels { public class IndexViewModel { diff --git a/src/Services/Identity/Identity.API/Models/ManageViewModels/ManageLoginsViewModel.cs b/src/Services/Identity/Identity.API/Models/ManageViewModels/ManageLoginsViewModel.cs index 1238585cd..0b24c3b7c 100644 --- a/src/Services/Identity/Identity.API/Models/ManageViewModels/ManageLoginsViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/ManageViewModels/ManageLoginsViewModel.cs @@ -1,11 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Http.Authentication; +using Microsoft.AspNetCore.Http.Authentication; using Microsoft.AspNetCore.Identity; +using System.Collections.Generic; -namespace Identity.API.Models.ManageViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels { public class ManageLoginsViewModel { diff --git a/src/Services/Identity/Identity.API/Models/ManageViewModels/RemoveLoginViewModel.cs b/src/Services/Identity/Identity.API/Models/ManageViewModels/RemoveLoginViewModel.cs index 546f0b1e8..c9171fcf3 100644 --- a/src/Services/Identity/Identity.API/Models/ManageViewModels/RemoveLoginViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/ManageViewModels/RemoveLoginViewModel.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; - -namespace Identity.API.Models.ManageViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels { public class RemoveLoginViewModel { diff --git a/src/Services/Identity/Identity.API/Models/ManageViewModels/SetPasswordViewModel.cs b/src/Services/Identity/Identity.API/Models/ManageViewModels/SetPasswordViewModel.cs index d824afc94..9d0711b08 100644 --- a/src/Services/Identity/Identity.API/Models/ManageViewModels/SetPasswordViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/ManageViewModels/SetPasswordViewModel.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; -namespace Identity.API.Models.ManageViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels { public class SetPasswordViewModel { diff --git a/src/Services/Identity/Identity.API/Models/ManageViewModels/VerifyPhoneNumberViewModel.cs b/src/Services/Identity/Identity.API/Models/ManageViewModels/VerifyPhoneNumberViewModel.cs index af7105a2e..fccf56e4e 100644 --- a/src/Services/Identity/Identity.API/Models/ManageViewModels/VerifyPhoneNumberViewModel.cs +++ b/src/Services/Identity/Identity.API/Models/ManageViewModels/VerifyPhoneNumberViewModel.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Threading.Tasks; +using System.ComponentModel.DataAnnotations; -namespace Identity.API.Models.ManageViewModels +namespace Microsoft.eShopOnContainers.Services.Identity.API.Models.ManageViewModels { public class VerifyPhoneNumberViewModel { diff --git a/src/Services/Identity/Identity.API/Program.cs b/src/Services/Identity/Identity.API/Program.cs index 2f731c045..7b73838e6 100644 --- a/src/Services/Identity/Identity.API/Program.cs +++ b/src/Services/Identity/Identity.API/Program.cs @@ -1,21 +1,60 @@ -using Microsoft.AspNetCore.Hosting; +using IdentityServer4.EntityFramework.DbContexts; +using Microsoft.AspNetCore; +using Microsoft.AspNetCore.Hosting; +using Microsoft.eShopOnContainers.Services.Identity.API.Data; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; using System.IO; -namespace eShopOnContainers.Identity +namespace Microsoft.eShopOnContainers.Services.Identity.API { public class Program { public static void Main(string[] args) { - var host = new WebHostBuilder() + BuildWebHost(args) + .MigrateDbContext((_, __) => { }) + .MigrateDbContext((context, services) => + { + var env = services.GetService(); + var logger = services.GetService>(); + var settings = services.GetService>(); + + new ApplicationDbContextSeed() + .SeedAsync(context, env, logger, settings) + .Wait(); + }) + .MigrateDbContext((context,services)=> + { + var configuration = services.GetService(); + + new ConfigurationDbContextSeed() + .SeedAsync(context, configuration) + .Wait(); + }).Run(); + } + + public static IWebHost BuildWebHost(string[] args) => + WebHost.CreateDefaultBuilder(args) .UseKestrel() .UseHealthChecks("/hc") .UseContentRoot(Directory.GetCurrentDirectory()) .UseIISIntegration() .UseStartup() + .ConfigureAppConfiguration((builderContext, config) => + { + config.AddEnvironmentVariables(); + }) + .ConfigureLogging((hostingContext, builder) => + { + builder.AddConfiguration(hostingContext.Configuration.GetSection("Logging")); + builder.AddConsole(); + builder.AddDebug(); + }) + .UseApplicationInsights() .Build(); - - host.Run(); - } } } + diff --git a/src/Services/Identity/Identity.API/Services/EFLoginService.cs b/src/Services/Identity/Identity.API/Services/EFLoginService.cs index e1c2fe52e..63c4d4b7e 100644 --- a/src/Services/Identity/Identity.API/Services/EFLoginService.cs +++ b/src/Services/Identity/Identity.API/Services/EFLoginService.cs @@ -1,11 +1,8 @@ -using Identity.API.Models; -using Microsoft.AspNetCore.Identity; -using System; -using System.Collections.Generic; -using System.Linq; +using Microsoft.AspNetCore.Identity; +using Microsoft.eShopOnContainers.Services.Identity.API.Models; using System.Threading.Tasks; -namespace Identity.API.Services +namespace Microsoft.eShopOnContainers.Services.Identity.API.Services { public class EFLoginService : ILoginService { diff --git a/src/Services/Identity/Identity.API/Services/IEmailSender.cs b/src/Services/Identity/Identity.API/Services/IEmailSender.cs index 2259641f8..95a4f99ee 100644 --- a/src/Services/Identity/Identity.API/Services/IEmailSender.cs +++ b/src/Services/Identity/Identity.API/Services/IEmailSender.cs @@ -1,9 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using System.Threading.Tasks; -namespace Identity.API.Services +namespace Microsoft.eShopOnContainers.Services.Identity.API.Services { public interface IEmailSender { diff --git a/src/Services/Identity/Identity.API/Services/ILoginService.cs b/src/Services/Identity/Identity.API/Services/ILoginService.cs index 5915b42ee..7bff7f272 100644 --- a/src/Services/Identity/Identity.API/Services/ILoginService.cs +++ b/src/Services/Identity/Identity.API/Services/ILoginService.cs @@ -1,9 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using System.Threading.Tasks; -namespace Identity.API.Services +namespace Microsoft.eShopOnContainers.Services.Identity.API.Services { public interface ILoginService { diff --git a/src/Services/Identity/Identity.API/Services/IRedirectService.cs b/src/Services/Identity/Identity.API/Services/IRedirectService.cs index 9dd277e2d..4ec8ea1fc 100644 --- a/src/Services/Identity/Identity.API/Services/IRedirectService.cs +++ b/src/Services/Identity/Identity.API/Services/IRedirectService.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Identity.API.Services +namespace Microsoft.eShopOnContainers.Services.Identity.API.Services { public interface IRedirectService { diff --git a/src/Services/Identity/Identity.API/Services/ISmsSender.cs b/src/Services/Identity/Identity.API/Services/ISmsSender.cs index 5c6bd2aae..f842e7ae9 100644 --- a/src/Services/Identity/Identity.API/Services/ISmsSender.cs +++ b/src/Services/Identity/Identity.API/Services/ISmsSender.cs @@ -1,9 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using System.Threading.Tasks; -namespace Identity.API.Services +namespace Microsoft.eShopOnContainers.Services.Identity.API.Services { public interface ISmsSender { diff --git a/src/Services/Identity/Identity.API/Services/MessageServices.cs b/src/Services/Identity/Identity.API/Services/MessageServices.cs index d9898cba4..18ab35a7c 100644 --- a/src/Services/Identity/Identity.API/Services/MessageServices.cs +++ b/src/Services/Identity/Identity.API/Services/MessageServices.cs @@ -1,9 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +using System.Threading.Tasks; -namespace Identity.API.Services +namespace Microsoft.eShopOnContainers.Services.Identity.API.Services { // This class is used by the application to send Email and SMS // when you turn on two-factor authentication in ASP.NET Identity. diff --git a/src/Services/Identity/Identity.API/Services/ProfileService.cs b/src/Services/Identity/Identity.API/Services/ProfileService.cs index 71d10a777..204ac3119 100644 --- a/src/Services/Identity/Identity.API/Services/ProfileService.cs +++ b/src/Services/Identity/Identity.API/Services/ProfileService.cs @@ -1,15 +1,15 @@ -using IdentityServer4.Services; +using IdentityModel; +using IdentityServer4.Models; +using IdentityServer4.Services; +using Microsoft.AspNetCore.Identity; +using Microsoft.eShopOnContainers.Services.Identity.API.Models; using System; using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; -using IdentityServer4.Models; -using Microsoft.AspNetCore.Identity; -using Identity.API.Models; using System.Security.Claims; -using IdentityModel; +using System.Threading.Tasks; -namespace Identity.API.Services +namespace Microsoft.eShopOnContainers.Services.Identity.API.Services { public class ProfileService : IProfileService { diff --git a/src/Services/Identity/Identity.API/Services/RedirectService.cs b/src/Services/Identity/Identity.API/Services/RedirectService.cs index 440272d39..bbe0ae976 100644 --- a/src/Services/Identity/Identity.API/Services/RedirectService.cs +++ b/src/Services/Identity/Identity.API/Services/RedirectService.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text.RegularExpressions; -using System.Threading.Tasks; +using System.Text.RegularExpressions; -namespace Identity.API.Services +namespace Microsoft.eShopOnContainers.Services.Identity.API.Services { public class RedirectService : IRedirectService { diff --git a/src/Services/Identity/Identity.API/Startup.cs b/src/Services/Identity/Identity.API/Startup.cs index 5b0a216de..6ac0815fd 100644 --- a/src/Services/Identity/Identity.API/Startup.cs +++ b/src/Services/Identity/Identity.API/Startup.cs @@ -1,61 +1,49 @@ -using Identity.API.Certificate; -using Identity.API.Configuration; -using Identity.API.Data; -using Identity.API.Models; -using Identity.API.Services; -using IdentityServer4.EntityFramework.DbContexts; -using IdentityServer4.EntityFramework.Mappers; +using Autofac; +using Autofac.Extensions.DependencyInjection; using IdentityServer4.Services; +using Microsoft.ApplicationInsights.Extensibility; +using Microsoft.ApplicationInsights.ServiceFabric; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Identity; -using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; using Microsoft.eShopOnContainers.BuildingBlocks; -using Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure; +using Microsoft.eShopOnContainers.Services.Identity.API.Certificates; +using Microsoft.eShopOnContainers.Services.Identity.API.Data; +using Microsoft.eShopOnContainers.Services.Identity.API.Models; +using Microsoft.eShopOnContainers.Services.Identity.API.Services; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.HealthChecks; -using Identity.API.Certificate; -using Autofac.Extensions.DependencyInjection; -using Autofac; using Microsoft.Extensions.Logging; using System; -using System.Collections.Generic; -using System.Linq; using System.Reflection; -using System.Threading.Tasks; -namespace eShopOnContainers.Identity +namespace Microsoft.eShopOnContainers.Services.Identity.API { public class Startup { - public Startup(IHostingEnvironment env) + public Startup(IConfiguration configuration) { - var builder = new ConfigurationBuilder() - .SetBasePath(env.ContentRootPath) - .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) - .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true); - - if (env.IsDevelopment()) - { - // For more details on using the user secret store see http://go.microsoft.com/fwlink/?LinkID=532709 - builder.AddUserSecrets(); - } - - builder.AddEnvironmentVariables(); - Configuration = builder.Build(); + Configuration = configuration; } - public IConfigurationRoot Configuration { get; } + public IConfiguration Configuration { get; } // This method gets called by the runtime. Use this method to add services to the container. public IServiceProvider ConfigureServices(IServiceCollection services) - { + { + RegisterAppInsights(services); // Add framework services. services.AddDbContext(options => - options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection"))); + options.UseSqlServer(Configuration["ConnectionString"], + sqlServerOptionsAction: sqlOptions => + { + sqlOptions.MigrationsAssembly(typeof(Startup).GetTypeInfo().Assembly.GetName().Name); + //Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency + sqlOptions.EnableRetryOnFailure(maxRetryCount: 15, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null); + })); services.AddIdentity() .AddEntityFrameworkStores() @@ -81,7 +69,7 @@ namespace eShopOnContainers.Identity { minutes = minutesParsed; } - checks.AddSqlCheck("Identity_Db", Configuration.GetConnectionString("DefaultConnection"), TimeSpan.FromMinutes(minutes)); + checks.AddSqlCheck("Identity_Db", Configuration["ConnectionString"], TimeSpan.FromMinutes(minutes)); }); services.AddTransient(); @@ -89,23 +77,38 @@ namespace eShopOnContainers.Identity services.AddTransient, EFLoginService>(); services.AddTransient(); - var connectionString = Configuration.GetConnectionString("DefaultConnection"); + var connectionString = Configuration["ConnectionString"]; var migrationsAssembly = typeof(Startup).GetTypeInfo().Assembly.GetName().Name; // Adds IdentityServer services.AddIdentityServer(x => x.IssuerUri = "null") - .AddSigningCredential(Certificate.Get()) + .AddSigningCredential(Certificate.Get()) .AddAspNetIdentity() - .AddConfigurationStore(builder => - builder.UseSqlServer(connectionString, options => - options.MigrationsAssembly(migrationsAssembly))) - .AddOperationalStore(builder => - builder.UseSqlServer(connectionString, options => - options.MigrationsAssembly(migrationsAssembly))) + .AddConfigurationStore(options => + { + options.ConfigureDbContext = builder => builder.UseSqlServer(connectionString, + sqlServerOptionsAction: sqlOptions => + { + sqlOptions.MigrationsAssembly(migrationsAssembly); + //Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency + sqlOptions.EnableRetryOnFailure(maxRetryCount: 15, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null); + }); + }) + .AddOperationalStore(options => + { + options.ConfigureDbContext = builder => builder.UseSqlServer(connectionString, + sqlServerOptionsAction: sqlOptions => + { + sqlOptions.MigrationsAssembly(migrationsAssembly); + //Configuring Connection Resiliency: https://docs.microsoft.com/en-us/ef/core/miscellaneous/connection-resiliency + sqlOptions.EnableRetryOnFailure(maxRetryCount: 15, maxRetryDelay: TimeSpan.FromSeconds(30), errorNumbersToAdd: null); + }); + }) .Services.AddTransient(); var container = new ContainerBuilder(); container.Populate(services); + return new AutofacServiceProvider(container.Build()); } @@ -114,18 +117,26 @@ namespace eShopOnContainers.Identity { loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); + loggerFactory.AddAzureWebAppDiagnostics(); + loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Trace); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseDatabaseErrorPage(); - app.UseBrowserLink(); } else { app.UseExceptionHandler("/Home/Error"); } + var pathBase = Configuration["PATH_BASE"]; + if (!string.IsNullOrEmpty(pathBase)) + { + loggerFactory.CreateLogger("init").LogDebug($"Using PATH BASE '{pathBase}'"); + app.UsePathBase(pathBase); + } + app.UseStaticFiles(); @@ -136,7 +147,7 @@ namespace eShopOnContainers.Identity await next(); }); - app.UseIdentity(); + app.UseAuthentication(); // Adds IdentityServer app.UseIdentityServer(); @@ -147,59 +158,23 @@ namespace eShopOnContainers.Identity name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); - - // Store idsrv grant config into db - InitializeGrantStoreAndConfiguration(app).Wait(); - - //Seed Data - var hasher = new PasswordHasher(); - new ApplicationContextSeed(hasher).SeedAsync(app, env, loggerFactory).Wait(); } - private async Task InitializeGrantStoreAndConfiguration(IApplicationBuilder app) + private void RegisterAppInsights(IServiceCollection services) { - //callbacks urls from config: - Dictionary clientUrls = new Dictionary(); - clientUrls.Add("Mvc", Configuration.GetValue("MvcClient")); - clientUrls.Add("Spa", Configuration.GetValue("SpaClient")); - clientUrls.Add("Xamarin", Configuration.GetValue("XamarinCallback")); - clientUrls.Add("LocationsApi", Configuration.GetValue("LocationApiClient")); - clientUrls.Add("MarketingApi", Configuration.GetValue("MarketingApiClient")); - clientUrls.Add("BasketApi", Configuration.GetValue("BasketApiClient")); - clientUrls.Add("OrderingApi", Configuration.GetValue("OrderingApiClient")); - - using (var serviceScope = app.ApplicationServices.GetService().CreateScope()) - { - serviceScope.ServiceProvider.GetRequiredService().Database.Migrate(); - var context = serviceScope.ServiceProvider.GetRequiredService(); - context.Database.Migrate(); + services.AddApplicationInsightsTelemetry(Configuration); + var orchestratorType = Configuration.GetValue("OrchestratorType"); - if (!context.Clients.Any()) - { - foreach (var client in Config.GetClients(clientUrls)) - { - await context.Clients.AddAsync(client.ToEntity()); - } - await context.SaveChangesAsync(); - } - - if (!context.IdentityResources.Any()) - { - foreach (var resource in Config.GetResources()) - { - await context.IdentityResources.AddAsync(resource.ToEntity()); - } - await context.SaveChangesAsync(); - } - - if (!context.ApiResources.Any()) - { - foreach (var api in Config.GetApis()) - { - await context.ApiResources.AddAsync(api.ToEntity()); - } - await context.SaveChangesAsync(); - } + if (orchestratorType?.ToUpper() == "K8S") + { + // Enable K8s telemetry initializer + services.EnableKubernetes(); + } + if (orchestratorType?.ToUpper() == "SF") + { + // Enable SF telemetry initializer + services.AddSingleton((serviceProvider) => + new FabricTelemetryInitializer()); } } } diff --git a/src/Services/Identity/Identity.API/Views/Account/LoggedOut.cshtml b/src/Services/Identity/Identity.API/Views/Account/LoggedOut.cshtml index ea6fdbfbc..f843973f8 100644 --- a/src/Services/Identity/Identity.API/Views/Account/LoggedOut.cshtml +++ b/src/Services/Identity/Identity.API/Views/Account/LoggedOut.cshtml @@ -1,4 +1,4 @@ -@model Identity.API.Models.AccountViewModels.LoggedOutViewModel +@model Microsoft.eShopOnContainers.Services.Identity.API.Models.AccountViewModels.LoggedOutViewModel