From 3f0651cb876f85fd93caee18a3c5fa27bf338837 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh <13281246+sughosneo@users.noreply.github.com> Date: Wed, 22 Jul 2020 11:42:25 +0530 Subject: [PATCH 01/44] Updated readme with new book cover icon --- README.md | 4 ++-- img/architecture-book-cover-large-we.png | Bin 0 -> 14093 bytes img/devops-book-cover-large-we.png | Bin 0 -> 9978 bytes ...enterprise-patterns-ebook-cover-large-we.png | Bin 0 -> 44407 bytes 4 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 img/architecture-book-cover-large-we.png create mode 100644 img/devops-book-cover-large-we.png create mode 100644 img/xamarin-enterprise-patterns-ebook-cover-large-we.png diff --git a/README.md b/README.md index 6f3c1f5b7..634d87908 100644 --- a/README.md +++ b/README.md @@ -82,8 +82,8 @@ You can download them and start reviewing these Guides/eBooks here: | Architecting & Developing | Containers Lifecycle & CI/CD | App patterns with Xamarin.Forms | | ------------ | ------------| ------------| -| [![](img/Microservices-cover-small.png)](https://aka.ms/microservicesebook) | [![](img/DevOps-Cover-small.png)](https://aka.ms/dockerlifecycleebook) | [![](img/xamarin-enterprise-patterns-ebook-cover-small.png)](https://aka.ms/xamarinpatternsebook) | -| **Download .PDF** | **Download** | **Download** | +| [![](img/architecture-book-cover-large-we.png)](https://aka.ms/microservicesebook) | [![](img/devops-book-cover-large-we.png)](https://aka.ms/dockerlifecycleebook) | [![](img/xamarin-enterprise-patterns-ebook-cover-large-we.png)](https://aka.ms/xamarinpatternsebook) | +| **Download PDF** | **Download PDF** | **Download PDF** | For more free e-Books check out [.NET Architecture center](https://dot.net/architecture). If you have an e-book feedback, let us know by creating a new issue here: diff --git a/img/architecture-book-cover-large-we.png b/img/architecture-book-cover-large-we.png new file mode 100644 index 0000000000000000000000000000000000000000..23c8de23199c1ffb8c1155ab5a3a6d5ffcbd1464 GIT binary patch literal 14093 zcmYLw1yCGK*Y)BKf#B{z77eb!o!~6a;_j}&6WlGh%L0pgkVS$8Cpf`^yZe{tt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w_g?ZEI~a zYfGW^fq4sMu!%?`l6HNy@TU@cETee`r82Qx-;Dbv;oqq$PNWmkWrjm55`zsW|P}TRX$9Dn^A&|R)7}~A4kPN{j1ap z=4}CTTGP9b1JkK@hBjrNgaz=kWlU{!&i?*!nxclfM7p3-kkW^Dqmt|}C~f3AFii3A zNM(#Y$@>KdZQPNa!Vqk6f6aBOjk-jttER#>T?ELnqyAUDaiEV2&n}U!S6oiE93!;4 z`M%Dl=`M@okjx3x8F%movwGi2H4a+VjOnweNy5#>lyO$j53)uvm3@!=oQ>{lB;I5s zmE4uwXJ-b_Wp`N{q!;~@!&QYv;$k`CmXkT;9r?qEhMD8$0idgtfXR5Y zZq;a{&ZW=G+F;>KOtG(pJ)e7OBX%i%rT+LRPVqBW`L@5Gyi`V@7R%8z$8J5hB((aw zj)zP>_cU3#QQ)7m1Ao7K*zYN*BV+Z3>Mz6Aqa6XBfQi{YNgi~Vly93^Jsm8{D{ng(3eq^HH?n*LEf?x=R7Ol z6>sk@`g=77`BhYViasjb#l9;m#_$xqzP`6|xZ`<7GOFrHpP!Ei%lsCG5D&HUTjHz7 z_-UeXVv6MC>mEI3wM;S&w{pEx_*MC+m{7Tp%&Z(=^2=4_)V3HZ6an z?jRnqkRJ)Dm!n%|KQG)CAHbejFb$fLtKPQ?wL{O*=H|q)2sc<=mIJ33Y>7vyv0?Q!d_6} zE<*z&4bPA3hq=ir;6s<*oD{+APi@-E$)aXrY`=p1$K!b0^1RsJVqlJpb%|=5fr=q2c?u%o{}c89@%3zMLmfpQ?9Exh@Zb401sPT8 JT1nH;{{zZ(b;bYy literal 0 HcmV?d00001 diff --git a/img/devops-book-cover-large-we.png b/img/devops-book-cover-large-we.png new file mode 100644 index 0000000000000000000000000000000000000000..10c30876b1d569df1454bd4933f89cae4c145cac GIT binary patch literal 9978 zcma)ig;!Kx)b`LriV{*1(lB(VlnRm(!_W*vcL|7s#Lyk0G>D+U05i074$?hzcY{bs ze*E6|{R6(W&OK}IXFu!SbI;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50tQ!5cnx`Euqo|u*n+;y&akdtQ}x`V`qg@ zWLZM7F)rIuE(!n!V5!dce*0%%O9M~hNbP*~!-^pe4VPnFG(uP9fF(yFR;DF0*Qc1w zfKU0HPD?>YH%O|Z0Jvn13sd6=4NedF5syJ%Rt2y$7G>dBTPk=MD{eJrz~v>5?7)+J zqL8G+uZG{shv4Nm`(XBYv|Fh#J|=U#IrHzH zxaS^Ts8{lzv;5co|399y5x7~dr@be8Lt)|_umQX>wRpI%22gvcrBbeB8S?)CT^tO{ literal 0 HcmV?d00001 diff --git a/img/xamarin-enterprise-patterns-ebook-cover-large-we.png b/img/xamarin-enterprise-patterns-ebook-cover-large-we.png new file mode 100644 index 0000000000000000000000000000000000000000..28fdcc390353c1517cf1926ae1e2e21988f651fc GIT binary patch literal 44407 zcmX_HWl$VV*WJb4-CY*9Ai>?;U4uIW_r;x{3GQyegG+Gt-~P zNoZ(jWM~9-Zg%z$Fe%caE&Q4cvjEu4%x@*Yf_A;eEXJs5Sb$0gt_?BEN*n-CogybG zrs-{bW&~@hDTAHcMvMsKVS) zqN-tWW~Q7jCN`FlhbP?7$dk*C;V5NkrX11G&=MP)Si-5+>Dr*^tpHI$q6iLPB-SXe zEMFSh4|Ss)?;Aq_B|6B2hX(96LQingyW6&igTPZhn5Kl=d8r=nhUvmx!o2xY1~6 zX!y&IA3t7~%0+DY=Vr=TGRxJ~Q!3iZ+rIwvlC{94?Oh5?%f|li%80z$u=Dft47_Zu zL|`rXr;^%K9dqidH}iwyT_}9eF1SYi#MydL@NR(wHC{keO$>NP%pTm~bw)>anO3A3 zWgBcw=F^t0F1PAkL|8i^J$&6YQbnwbJUPGHrofnn_e0f}dz`3*RWa#jAbrTcRSSr^ zs$qsV+lW!i#D6+2yKWC>CRdY8re|^d{^ghN9v6L%Dd{VenGnfVn0}Y0Y^~41UnJHE z4cJxIrsq4+3>Yz^l^WlH;=}7vFP>-w-CXy41+q_0W!y^A7N3%t*r*6@f}j$H>GK8<9w$jBn%t{9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5fab77be23f5a70d525 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2020 15:08:48 +0530 Subject: [PATCH 02/44] Bump npm-registry-fetch from 4.0.2 to 4.0.5 in /src/Web/WebSPA (#1361) Bumps [npm-registry-fetch](https://github.com/npm/registry-fetch) from 4.0.2 to 4.0.5. - [Release notes](https://github.com/npm/registry-fetch/releases) - [Changelog](https://github.com/npm/npm-registry-fetch/blob/latest/CHANGELOG.md) - [Commits](https://github.com/npm/registry-fetch/commits) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/Web/WebSPA/package-lock.json | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json index b6669ee0f..a04640254 100644 --- a/src/Web/WebSPA/package-lock.json +++ b/src/Web/WebSPA/package-lock.json @@ -1219,7 +1219,8 @@ }, "minimist": { "version": "1.2.0", - "resolved": "", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, "negotiator": { @@ -1914,7 +1915,8 @@ }, "minimist": { "version": "1.2.0", - "resolved": "", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, "source-map": { @@ -6199,7 +6201,8 @@ }, "minimist": { "version": "1.2.0", - "resolved": "", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, "normalize-path": { @@ -6348,7 +6351,8 @@ }, "minimist": { "version": "1.2.0", - "resolved": "", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, "schema-utils": { @@ -11181,9 +11185,9 @@ } }, "npm-registry-fetch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-4.0.2.tgz", - "integrity": "sha512-Z0IFtPEozNdeZRPh3aHHxdG+ZRpzcbQaJLthsm3VhNf6DScicTFRHZzK82u8RsJUsUHkX+QH/zcB/5pmd20H4A==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-4.0.5.tgz", + "integrity": "sha512-yQ0/U4fYpCCqmueB2g8sc+89ckQ3eXpmU4+Yi2j5o/r0WkKvE2+Y0tK3DEILAtn2UaQTkjTHxIXe2/CSdit+/Q==", "dev": true, "requires": { "JSONStream": "^1.3.4", @@ -11205,9 +11209,9 @@ } }, "safe-buffer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, "yallist": { @@ -14166,7 +14170,8 @@ }, "minimist": { "version": "1.2.0", - "resolved": "", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, "schema-utils": { From 6bd3301cb5ef4cbf70a6e144009089ff6419ed75 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2020 15:09:15 +0530 Subject: [PATCH 03/44] Bump lodash from 4.17.15 to 4.17.19 in /src/Web/WebSPA (#1365) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/Web/WebSPA/package-lock.json | 6 +++--- src/Web/WebSPA/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json index a04640254..8b39dd48b 100644 --- a/src/Web/WebSPA/package-lock.json +++ b/src/Web/WebSPA/package-lock.json @@ -9827,9 +9827,9 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" }, "lodash.capitalize": { "version": "4.2.1", diff --git a/src/Web/WebSPA/package.json b/src/Web/WebSPA/package.json index 63b43bcd2..35eb95fa1 100644 --- a/src/Web/WebSPA/package.json +++ b/src/Web/WebSPA/package.json @@ -76,7 +76,7 @@ "karma-cli": "^2.0.0", "karma-jasmine": "^2.0.1", "karma-jasmine-html-reporter": "^1.5.3", - "lodash": "^4.17.15", + "lodash": "^4.17.19", "merge": "1.2.1", "npm-watch": "0.5.0", "protractor": "^5.4.3", From 058790471f84b0328623ff0a79dab3ac13cc6d5b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2020 15:10:00 +0530 Subject: [PATCH 04/44] Bump jquery from 3.4.1 to 3.5.0 in /src/Web/WebSPA (#1313) Bumps [jquery](https://github.com/jquery/jquery) from 3.4.1 to 3.5.0. - [Release notes](https://github.com/jquery/jquery/releases) - [Commits](https://github.com/jquery/jquery/compare/3.4.1...3.5.0) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/Web/WebSPA/package-lock.json | 6 +++--- src/Web/WebSPA/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json index 8b39dd48b..513ac97be 100644 --- a/src/Web/WebSPA/package-lock.json +++ b/src/Web/WebSPA/package-lock.json @@ -9415,9 +9415,9 @@ } }, "jquery": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.4.1.tgz", - "integrity": "sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw==" + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.0.tgz", + "integrity": "sha512-Xb7SVYMvygPxbFMpTFQiHh1J7HClEaThguL15N/Gg37Lri/qKyhRGZYzHRyLH8Stq3Aow0LsHO2O2ci86fCrNQ==" }, "js-levenshtein": { "version": "1.1.6", diff --git a/src/Web/WebSPA/package.json b/src/Web/WebSPA/package.json index 35eb95fa1..cc60ba65f 100644 --- a/src/Web/WebSPA/package.json +++ b/src/Web/WebSPA/package.json @@ -46,7 +46,7 @@ "file-loader": "2.0.0", "font-awesome": "4.7.0", "isomorphic-fetch": "2.2.1", - "jquery": "3.4.1", + "jquery": "3.5.0", "ngx-toastr": "10.1.0", "normalize.css": "8.0.0", "popper.js": "1.16.1", From 99bbbfb5c9dd2dde76443a108110bdc932937333 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 22 Jul 2020 15:11:01 +0530 Subject: [PATCH 05/44] Bump websocket-extensions from 0.1.3 to 0.1.4 in /src/Web/WebSPA (#1336) Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4. - [Release notes](https://github.com/faye/websocket-extensions-node/releases) - [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md) - [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/Web/WebSPA/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json index 513ac97be..eba515ab7 100644 --- a/src/Web/WebSPA/package-lock.json +++ b/src/Web/WebSPA/package-lock.json @@ -16888,9 +16888,9 @@ } }, "websocket-extensions": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz", - "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==" + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz", + "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==" }, "whatwg-fetch": { "version": "2.0.4", From edf539457932ebc1485ab5f64be30eff2d4eb6f0 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh <13281246+sughosneo@users.noreply.github.com> Date: Wed, 22 Jul 2020 20:51:09 +0530 Subject: [PATCH 06/44] Updated readme.md with mslearn link --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 634d87908..3e7e7851e 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,8 @@ You can download them and start reviewing these Guides/eBooks here: For more free e-Books check out [.NET Architecture center](https://dot.net/architecture). If you have an e-book feedback, let us know by creating a new issue here: +If you are looking for a more hands-on experience where you build one of such service of your own then check out [Create and deploy a cloud-native ASP.NET Core microservice](https://docs.microsoft.com/en-us/learn/modules/microservices-aspnet-core/) + ## Read further - [Explore the application](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Explore-the-application) From eece98132de288b29f9efb1b97891cfb471456e7 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh <13281246+sughosneo@users.noreply.github.com> Date: Fri, 24 Jul 2020 11:00:11 +0530 Subject: [PATCH 07/44] Moved mslearn section on top --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3e7e7851e..da20b01b8 100644 --- a/README.md +++ b/README.md @@ -25,11 +25,13 @@ _**Dev** branch contains the latest **beta** code and their images are tagged wi ## Getting Started -eShopOnContainers is provided in two flavors: Basic and Advanced. +Are you new to **microservices** and **cloud-native concepts** ? Then checkout [Create and deploy a cloud-native ASP.NET Core microservice](https://docs.microsoft.com/en-us/learn/modules/microservices-aspnet-core/). It's an hour of content designed for beginners with hands-on exercise. It would be a good place to start before exploring more on `eShopOnContainers`. + +*eShopOnContainers* is provided in two flavors: Basic and Advanced. ### Basic scenario -The basic scenario can be run locally using docker compose, and also deployed to a local Kubernetes cluster. Refer these Wiki pages to Get Started: +The basic scenario can be run locally using docker-compose, and also deployed to a local Kubernetes cluster. Refer these Wiki pages to Get Started: - [CLI or Visual Studio Code](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Windows-setup) - [Visual Studio (F5 experience)](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Windows-setup#optional---use-visual-studio) @@ -44,6 +46,7 @@ The Advanced scenario can be run only in a Kubernetes cluster. Currently this sc In the future more features will be implemented in the advanced scenario. + ## IMPORTANT NOTES! **You can use either the latest version of Visual Studio or simply Docker CLI and .NET CLI for Windows, Mac and Linux**. @@ -87,7 +90,6 @@ You can download them and start reviewing these Guides/eBooks here: For more free e-Books check out [.NET Architecture center](https://dot.net/architecture). If you have an e-book feedback, let us know by creating a new issue here: -If you are looking for a more hands-on experience where you build one of such service of your own then check out [Create and deploy a cloud-native ASP.NET Core microservice](https://docs.microsoft.com/en-us/learn/modules/microservices-aspnet-core/) ## Read further From 35bd66e9a98a2a4be5e60e871162378aebc689c9 Mon Sep 17 00:00:00 2001 From: Sander Holvoet Date: Tue, 28 Jul 2020 09:13:18 +0200 Subject: [PATCH 08/44] Fixed typo in README (#1375) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 634d87908..9c1a53bf5 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ eShopOnContainers is provided in two flavors: Basic and Advanced. ### Basic scenario -The basic scenario can be run locally using docker compose, and also deployed to a local Kubernetes cluster. Refer these Wiki pages to Get Started: +The basic scenario can be run locally using docker compose, and also deployed to a local Kubernetes cluster. Refer to these Wiki pages to Get Started: - [CLI or Visual Studio Code](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Windows-setup) - [Visual Studio (F5 experience)](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Windows-setup#optional---use-visual-studio) From 75fdb3dd608303ea6a16ac2452df5cb9433f4928 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh <13281246+sughosneo@users.noreply.github.com> Date: Tue, 28 Jul 2020 14:41:05 +0530 Subject: [PATCH 09/44] Shifting MS learn section on top. --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index da20b01b8..c6f869f1e 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,12 @@ Sample .NET Core reference application, powered by Microsoft, based on a simplif | Ordering API | [![Ordering API](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/ordering?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=198&branchName=dev) | Webhooks Client | [![Webhooks demo client](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/webhooks-client?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=208&branchName=dev) | | Payment API | [![Payment API](https://msftdevtools.visualstudio.com/eShopOnContainers/_apis/build/status/microservices/payment?branchName=dev)](https://msftdevtools.visualstudio.com/eShopOnContainers/_build/latest?definitionId=205&branchName=dev) | | | -_**Dev** branch contains the latest **beta** code and their images are tagged with `:dev` in our [Docker Hub](https://hub.docker.com/u/eshop)_ +_**Dev** branch contains the latest **beta** code and their images are tagged with `:linux-dev` in our [Docker Hub](https://hub.docker.com/u/eshop)_ -## Getting Started +## New to **microservices** and **cloud-native development** !! +Please take a look at this free course : [Create and deploy a cloud-native ASP.NET Core microservice](https://docs.microsoft.com/en-us/learn/modules/microservices-aspnet-core/). This MS Learn module will explain microservices concepts, cloud-native technologies, and reduce the friction in getting started with `eShopOnContainers`. -Are you new to **microservices** and **cloud-native concepts** ? Then checkout [Create and deploy a cloud-native ASP.NET Core microservice](https://docs.microsoft.com/en-us/learn/modules/microservices-aspnet-core/). It's an hour of content designed for beginners with hands-on exercise. It would be a good place to start before exploring more on `eShopOnContainers`. +## Getting Started *eShopOnContainers* is provided in two flavors: Basic and Advanced. From bbccef746600c2b7c0191ea713e123feaff85664 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Tue, 28 Jul 2020 17:36:43 +0530 Subject: [PATCH 10/44] Fix/1370 - Updated script related changes for helm 3.x and k8s 1.16.x (#1378) * Fix for helm 3 and k8s 1.16 * Inclusion of archived directory under k8s * separate deploy-all powershell script for local Mac OS deployment. --- deploy/k8s/archived/README.md | 8 + deploy/k8s/archived/create-aks.ps1 | 50 ++++ deploy/k8s/archived/dashboard-adminuser.yaml | 18 ++ deploy/k8s/archived/enable-tls.ps1 | 20 ++ deploy/k8s/archived/helm-rbac.yaml | 18 ++ .../k8s/archived/helm/aks-httpaddon-cfg.yaml | 12 + deploy/k8s/archived/helm/apigwmm/.helmignore | 21 ++ deploy/k8s/archived/helm/apigwmm/Chart.yaml | 5 + deploy/k8s/archived/helm/apigwmm/envoy.yaml | 75 ++++++ .../archived/helm/apigwmm/templates/NOTES.txt | 2 + .../helm/apigwmm/templates/_helpers.tpl | 32 +++ .../helm/apigwmm/templates/_names.tpl | 52 ++++ .../helm/apigwmm/templates/deployment.yaml | 110 ++++++++ .../helm/apigwmm/templates/envoy-cm.yaml | 14 ++ .../helm/apigwmm/templates/ingress.yaml | 46 ++++ .../helm/apigwmm/templates/service.yaml | 23 ++ deploy/k8s/archived/helm/apigwmm/values.yaml | 45 ++++ deploy/k8s/archived/helm/apigwms/.helmignore | 21 ++ deploy/k8s/archived/helm/apigwms/Chart.yaml | 5 + deploy/k8s/archived/helm/apigwms/envoy.yaml | 139 ++++++++++ .../archived/helm/apigwms/templates/NOTES.txt | 2 + .../helm/apigwms/templates/_helpers.tpl | 32 +++ .../helm/apigwms/templates/_names.tpl | 52 ++++ .../helm/apigwms/templates/deployment.yaml | 110 ++++++++ .../helm/apigwms/templates/envoy-cm.yaml | 14 ++ .../helm/apigwms/templates/ingress.yaml | 47 ++++ .../helm/apigwms/templates/service.yaml | 23 ++ deploy/k8s/archived/helm/apigwms/values.yaml | 45 ++++ deploy/k8s/archived/helm/apigwwm/.helmignore | 21 ++ deploy/k8s/archived/helm/apigwwm/Chart.yaml | 5 + deploy/k8s/archived/helm/apigwwm/envoy.yaml | 75 ++++++ .../archived/helm/apigwwm/templates/NOTES.txt | 2 + .../helm/apigwwm/templates/_helpers.tpl | 32 +++ .../helm/apigwwm/templates/_names.tpl | 52 ++++ .../helm/apigwwm/templates/deployment.yaml | 110 ++++++++ .../helm/apigwwm/templates/envoy-cm.yaml | 14 ++ .../helm/apigwwm/templates/ingress.yaml | 47 ++++ .../helm/apigwwm/templates/service.yaml | 23 ++ deploy/k8s/archived/helm/apigwwm/values.yaml | 46 ++++ deploy/k8s/archived/helm/apigwws/.helmignore | 21 ++ deploy/k8s/archived/helm/apigwws/Chart.yaml | 5 + deploy/k8s/archived/helm/apigwws/envoy.yaml | 139 ++++++++++ .../archived/helm/apigwws/templates/NOTES.txt | 2 + .../helm/apigwws/templates/_helpers.tpl | 32 +++ .../helm/apigwws/templates/_names.tpl | 52 ++++ .../helm/apigwws/templates/deployment.yaml | 109 ++++++++ .../helm/apigwws/templates/envoy-cm.yaml | 14 ++ .../helm/apigwws/templates/ingress.yaml | 46 ++++ .../helm/apigwws/templates/service.yaml | 23 ++ deploy/k8s/archived/helm/apigwws/values.yaml | 46 ++++ deploy/k8s/archived/helm/app.yaml | 46 ++++ .../k8s/archived/helm/basket-api/.helmignore | 21 ++ .../k8s/archived/helm/basket-api/Chart.yaml | 5 + .../helm/basket-api/templates/NOTES.txt | 8 + .../helm/basket-api/templates/_helpers.tpl | 32 +++ .../helm/basket-api/templates/_names.tpl | 52 ++++ .../helm/basket-api/templates/configmap.yaml | 18 ++ .../helm/basket-api/templates/deployment.yaml | 99 ++++++++ .../helm/basket-api/templates/service.yaml | 23 ++ .../k8s/archived/helm/basket-api/values.yaml | 63 +++++ .../k8s/archived/helm/basket-data/.helmignore | 21 ++ .../k8s/archived/helm/basket-data/Chart.yaml | 5 + .../helm/basket-data/templates/NOTES.txt | 8 + .../helm/basket-data/templates/_helpers.tpl | 32 +++ .../basket-data/templates/deployment.yaml | 43 ++++ .../helm/basket-data/templates/service.yaml | 19 ++ .../k8s/archived/helm/basket-data/values.yaml | 19 ++ .../k8s/archived/helm/catalog-api/.helmignore | 21 ++ .../k8s/archived/helm/catalog-api/Chart.yaml | 5 + .../helm/catalog-api/templates/NOTES.txt | 9 + .../helm/catalog-api/templates/_helpers.tpl | 32 +++ .../helm/catalog-api/templates/_names.tpl | 60 +++++ .../helm/catalog-api/templates/configmap.yaml | 21 ++ .../catalog-api/templates/deployment.yaml | 99 ++++++++ .../helm/catalog-api/templates/service.yaml | 23 ++ .../k8s/archived/helm/catalog-api/values.yaml | 63 +++++ deploy/k8s/archived/helm/deploy-all.ps1 | 149 +++++++++++ deploy/k8s/archived/helm/deploy-all.sh | 232 +++++++++++++++++ .../archived/helm/eshop-common/.helmignore | 21 ++ .../k8s/archived/helm/eshop-common/Chart.yaml | 5 + .../helm/eshop-common/templates/NOTES.txt | 7 + .../helm/eshop-common/templates/_helpers.tpl | 32 +++ .../helm/eshop-common/templates/_names.tpl | 3 + .../helm/eshop-common/templates/secret.yaml | 9 + .../archived/helm/eshop-common/values.yaml | 0 .../archived/helm/identity-api/.helmignore | 21 ++ .../k8s/archived/helm/identity-api/Chart.yaml | 5 + .../helm/identity-api/templates/NOTES.txt | 4 + .../helm/identity-api/templates/_helpers.tpl | 32 +++ .../helm/identity-api/templates/_names.tpl | 51 ++++ .../identity-api/templates/configmap.yaml | 39 +++ .../identity-api/templates/deployment.yaml | 96 +++++++ .../templates/ingress-dockerk8s.yaml | 33 +++ .../helm/identity-api/templates/ingress.yaml | 46 ++++ .../helm/identity-api/templates/service.yaml | 19 ++ .../archived/helm/identity-api/values.yaml | 84 +++++++ deploy/k8s/archived/helm/inf.yaml | 56 +++++ deploy/k8s/archived/helm/ingress_values.yaml | 8 + .../helm/ingress_values_dockerk8s.yaml | 7 + .../archived/helm/ingress_values_linkerd.yaml | 16 ++ .../archived/helm/keystore-data/.helmignore | 21 ++ .../archived/helm/keystore-data/Chart.yaml | 5 + .../helm/keystore-data/templates/NOTES.txt | 8 + .../helm/keystore-data/templates/_helpers.tpl | 32 +++ .../keystore-data/templates/deployment.yaml | 43 ++++ .../helm/keystore-data/templates/service.yaml | 19 ++ .../archived/helm/keystore-data/values.yaml | 19 ++ .../archived/helm/locations-api/.helmignore | 21 ++ .../archived/helm/locations-api/Chart.yaml | 5 + .../helm/locations-api/templates/NOTES.txt | 9 + .../helm/locations-api/templates/_helpers.tpl | 32 +++ .../helm/locations-api/templates/_names.tpl | 52 ++++ .../locations-api/templates/configmap.yaml | 22 ++ .../locations-api/templates/deployment.yaml | 96 +++++++ .../helm/locations-api/templates/service.yaml | 19 ++ .../archived/helm/locations-api/values.yaml | 66 +++++ .../archived/helm/marketing-api/.helmignore | 21 ++ .../archived/helm/marketing-api/Chart.yaml | 5 + .../helm/marketing-api/templates/NOTES.txt | 9 + .../helm/marketing-api/templates/_helpers.tpl | 32 +++ .../helm/marketing-api/templates/_names.tpl | 60 +++++ .../marketing-api/templates/configmap.yaml | 27 ++ .../marketing-api/templates/deployment.yaml | 96 +++++++ .../helm/marketing-api/templates/service.yaml | 19 ++ .../archived/helm/marketing-api/values.yaml | 70 ++++++ .../helm/mobileshoppingagg/.helmignore | 21 ++ .../helm/mobileshoppingagg/Chart.yaml | 5 + .../mobileshoppingagg/templates/NOTES.txt | 8 + .../mobileshoppingagg/templates/_helpers.tpl | 32 +++ .../mobileshoppingagg/templates/_names.tpl | 52 ++++ .../templates/configmap.yaml | 29 +++ .../templates/deployment.yaml | 96 +++++++ .../mobileshoppingagg/templates/service.yaml | 19 ++ .../helm/mobileshoppingagg/values.yaml | 85 +++++++ .../k8s/archived/helm/nosql-data/.helmignore | 21 ++ .../k8s/archived/helm/nosql-data/Chart.yaml | 5 + .../helm/nosql-data/templates/NOTES.txt | 8 + .../helm/nosql-data/templates/_helpers.tpl | 32 +++ .../helm/nosql-data/templates/_names.tpl | 8 + .../helm/nosql-data/templates/deployment.yaml | 43 ++++ .../helm/nosql-data/templates/service.yaml | 19 ++ .../k8s/archived/helm/nosql-data/values.yaml | 19 ++ .../archived/helm/ordering-api/.helmignore | 21 ++ .../k8s/archived/helm/ordering-api/Chart.yaml | 5 + .../helm/ordering-api/templates/NOTES.txt | 8 + .../helm/ordering-api/templates/_helpers.tpl | 32 +++ .../helm/ordering-api/templates/_names.tpl | 51 ++++ .../ordering-api/templates/configmap.yaml | 19 ++ .../ordering-api/templates/deployment.yaml | 99 ++++++++ .../helm/ordering-api/templates/service.yaml | 23 ++ .../archived/helm/ordering-api/values.yaml | 69 +++++ .../helm/ordering-backgroundtasks/.helmignore | 21 ++ .../helm/ordering-backgroundtasks/Chart.yaml | 5 + .../templates/NOTES.txt | 3 + .../templates/_helpers.tpl | 32 +++ .../templates/_names.tpl | 51 ++++ .../templates/configmap.yaml | 21 ++ .../templates/deployment.yaml | 92 +++++++ .../templates/service.yaml | 19 ++ .../helm/ordering-backgroundtasks/values.yaml | 70 ++++++ .../helm/ordering-signalrhub/.helmignore | 21 ++ .../helm/ordering-signalrhub/Chart.yaml | 5 + .../ordering-signalrhub/templates/NOTES.txt | 8 + .../templates/_helpers.tpl | 32 +++ .../ordering-signalrhub/templates/_names.tpl | 51 ++++ .../templates/configmap.yaml | 18 ++ .../templates/deployment.yaml | 70 ++++++ .../templates/service.yaml | 19 ++ .../helm/ordering-signalrhub/values.yaml | 57 +++++ .../k8s/archived/helm/payment-api/.helmignore | 21 ++ .../k8s/archived/helm/payment-api/Chart.yaml | 5 + .../helm/payment-api/templates/NOTES.txt | 9 + .../helm/payment-api/templates/_helpers.tpl | 32 +++ .../helm/payment-api/templates/_names.tpl | 51 ++++ .../helm/payment-api/templates/configmap.yaml | 15 ++ .../payment-api/templates/deployment.yaml | 96 +++++++ .../helm/payment-api/templates/service.yaml | 19 ++ .../k8s/archived/helm/payment-api/values.yaml | 56 +++++ deploy/k8s/archived/helm/rabbitmq/.helmignore | 21 ++ deploy/k8s/archived/helm/rabbitmq/Chart.yaml | 5 + .../helm/rabbitmq/templates/NOTES.txt | 8 + .../helm/rabbitmq/templates/_helpers.tpl | 32 +++ .../helm/rabbitmq/templates/_names.tpl | 8 + .../helm/rabbitmq/templates/deployment.yaml | 43 ++++ .../helm/rabbitmq/templates/service.yaml | 19 ++ deploy/k8s/archived/helm/rabbitmq/values.yaml | 19 ++ deploy/k8s/archived/helm/sql-data/.helmignore | 21 ++ deploy/k8s/archived/helm/sql-data/Chart.yaml | 5 + .../helm/sql-data/templates/NOTES.txt | 8 + .../helm/sql-data/templates/_helpers.tpl | 32 +++ .../helm/sql-data/templates/_names.tpl | 8 + .../helm/sql-data/templates/deployment.yaml | 50 ++++ .../helm/sql-data/templates/service.yaml | 19 ++ deploy/k8s/archived/helm/sql-data/values.yaml | 19 ++ .../k8s/archived/helm/tls-support/.helmignore | 21 ++ .../k8s/archived/helm/tls-support/Chart.yaml | 5 + .../helm/tls-support/templates/_helpers.tpl | 32 +++ .../helm/tls-support/templates/issuer.yaml | 17 ++ .../helm/tls-support/values-prod.yaml | 8 + .../helm/tls-support/values-staging.yaml | 8 + .../archived/helm/webhooks-api/.helmignore | 21 ++ .../k8s/archived/helm/webhooks-api/Chart.yaml | 5 + .../helm/webhooks-api/templates/NOTES.txt | 8 + .../helm/webhooks-api/templates/_helpers.tpl | 32 +++ .../helm/webhooks-api/templates/_names.tpl | 60 +++++ .../webhooks-api/templates/configmap.yaml | 21 ++ .../webhooks-api/templates/deployment.yaml | 75 ++++++ .../helm/webhooks-api/templates/ingress.yaml | 46 ++++ .../helm/webhooks-api/templates/service.yaml | 19 ++ .../archived/helm/webhooks-api/values.yaml | 53 ++++ .../archived/helm/webhooks-web/.helmignore | 21 ++ .../k8s/archived/helm/webhooks-web/Chart.yaml | 5 + .../helm/webhooks-web/templates/NOTES.txt | 8 + .../helm/webhooks-web/templates/_helpers.tpl | 32 +++ .../helm/webhooks-web/templates/_names.tpl | 60 +++++ .../webhooks-web/templates/configmap.yaml | 20 ++ .../webhooks-web/templates/deployment.yaml | 75 ++++++ .../helm/webhooks-web/templates/ingress.yaml | 45 ++++ .../helm/webhooks-web/templates/service.yaml | 19 ++ .../archived/helm/webhooks-web/values.yaml | 52 ++++ deploy/k8s/archived/helm/webmvc/.helmignore | 21 ++ deploy/k8s/archived/helm/webmvc/Chart.yaml | 5 + .../archived/helm/webmvc/templates/NOTES.txt | 2 + .../helm/webmvc/templates/_helpers.tpl | 32 +++ .../archived/helm/webmvc/templates/_names.tpl | 60 +++++ .../helm/webmvc/templates/configmap.yaml | 26 ++ .../helm/webmvc/templates/deployment.yaml | 75 ++++++ .../webmvc/templates/ingress-dockerk8s.yaml | 33 +++ .../helm/webmvc/templates/ingress.yaml | 46 ++++ .../helm/webmvc/templates/service.yaml | 19 ++ deploy/k8s/archived/helm/webmvc/values.yaml | 61 +++++ .../archived/helm/webshoppingagg/.helmignore | 21 ++ .../archived/helm/webshoppingagg/Chart.yaml | 5 + .../helm/webshoppingagg/templates/NOTES.txt | 8 + .../webshoppingagg/templates/_helpers.tpl | 32 +++ .../helm/webshoppingagg/templates/_names.tpl | 52 ++++ .../webshoppingagg/templates/configmap.yaml | 29 +++ .../webshoppingagg/templates/deployment.yaml | 95 +++++++ .../webshoppingagg/templates/service.yaml | 19 ++ .../archived/helm/webshoppingagg/values.yaml | 87 +++++++ deploy/k8s/archived/helm/webspa/.helmignore | 21 ++ deploy/k8s/archived/helm/webspa/Chart.yaml | 5 + .../archived/helm/webspa/templates/NOTES.txt | 2 + .../helm/webspa/templates/_helpers.tpl | 32 +++ .../archived/helm/webspa/templates/_names.tpl | 60 +++++ .../helm/webspa/templates/configmap.yaml | 27 ++ .../helm/webspa/templates/deployment.yaml | 75 ++++++ .../helm/webspa/templates/ingress.yaml | 45 ++++ .../helm/webspa/templates/service.yaml | 19 ++ deploy/k8s/archived/helm/webspa/values.yaml | 61 +++++ .../k8s/archived/helm/webstatus/.helmignore | 21 ++ deploy/k8s/archived/helm/webstatus/Chart.yaml | 5 + .../helm/webstatus/templates/NOTES.txt | 2 + .../helm/webstatus/templates/_helpers.tpl | 32 +++ .../helm/webstatus/templates/_names.tpl | 50 ++++ .../helm/webstatus/templates/configmap.yaml | 54 ++++ .../helm/webstatus/templates/deployment.yaml | 75 ++++++ .../helm/webstatus/templates/ingress.yaml | 46 ++++ .../helm/webstatus/templates/service.yaml | 19 ++ .../k8s/archived/helm/webstatus/values.yaml | 95 +++++++ .../k8s/archived/linkerd/basket-api-sp.yaml | 42 ++++ .../k8s/archived/linkerd/catalog-api-sp.yaml | 47 ++++ .../k8s/archived/nginx-ingress/local-cm.yaml | 11 + .../local-dockerk8s/identityapi-cm-fix.yaml | 3 + .../local-dockerk8s/mvc-cm-fix.yaml | 3 + .../local-dockerk8s/mvc-fix.yaml | 39 +++ .../k8s/archived/nginx-ingress/local-svc.yaml | 21 ++ .../k8s/archived/nginx-ingress/mandatory.yaml | 238 ++++++++++++++++++ .../nginx-ingress/service-nodeport.yaml | 22 ++ .../archived/nodeports/rabbitmq-admin.yaml | 12 + .../k8s/archived/nodeports/sql-service.yaml | 12 + .../helm/apigwmm/templates/deployment.yaml | 2 +- .../helm/apigwms/templates/deployment.yaml | 2 +- .../helm/apigwwm/templates/deployment.yaml | 2 +- .../helm/apigwws/templates/deployment.yaml | 2 +- .../helm/basket-api/templates/deployment.yaml | 2 +- .../basket-data/templates/deployment.yaml | 2 +- .../catalog-api/templates/deployment.yaml | 2 +- deploy/k8s/helm/deploy-all-mac.ps1 | 156 ++++++++++++ deploy/k8s/helm/deploy-all.ps1 | 18 +- deploy/k8s/helm/deploy-all.sh | 8 +- .../identity-api/templates/deployment.yaml | 2 +- .../keystore-data/templates/deployment.yaml | 2 +- .../locations-api/templates/deployment.yaml | 2 +- .../marketing-api/templates/deployment.yaml | 2 +- .../templates/deployment.yaml | 2 +- .../helm/nosql-data/templates/deployment.yaml | 2 +- .../ordering-api/templates/deployment.yaml | 2 +- .../templates/deployment.yaml | 2 +- .../templates/deployment.yaml | 2 +- .../payment-api/templates/deployment.yaml | 2 +- .../helm/rabbitmq/templates/deployment.yaml | 2 +- .../helm/sql-data/templates/deployment.yaml | 2 +- .../webhooks-api/templates/deployment.yaml | 2 +- .../webhooks-web/templates/deployment.yaml | 2 +- .../k8s/helm/webmvc/templates/deployment.yaml | 2 +- .../webshoppingagg/templates/deployment.yaml | 2 +- .../k8s/helm/webspa/templates/deployment.yaml | 2 +- .../helm/webstatus/templates/deployment.yaml | 2 +- deploy/k8s/nginx-ingress/mandatory.yaml | 2 +- 300 files changed, 9522 insertions(+), 36 deletions(-) create mode 100644 deploy/k8s/archived/README.md create mode 100644 deploy/k8s/archived/create-aks.ps1 create mode 100644 deploy/k8s/archived/dashboard-adminuser.yaml create mode 100644 deploy/k8s/archived/enable-tls.ps1 create mode 100644 deploy/k8s/archived/helm-rbac.yaml create mode 100644 deploy/k8s/archived/helm/aks-httpaddon-cfg.yaml create mode 100644 deploy/k8s/archived/helm/apigwmm/.helmignore create mode 100644 deploy/k8s/archived/helm/apigwmm/Chart.yaml create mode 100644 deploy/k8s/archived/helm/apigwmm/envoy.yaml create mode 100644 deploy/k8s/archived/helm/apigwmm/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/apigwmm/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/apigwmm/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/apigwmm/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/apigwmm/templates/envoy-cm.yaml create mode 100644 deploy/k8s/archived/helm/apigwmm/templates/ingress.yaml create mode 100644 deploy/k8s/archived/helm/apigwmm/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/apigwmm/values.yaml create mode 100644 deploy/k8s/archived/helm/apigwms/.helmignore create mode 100644 deploy/k8s/archived/helm/apigwms/Chart.yaml create mode 100644 deploy/k8s/archived/helm/apigwms/envoy.yaml create mode 100644 deploy/k8s/archived/helm/apigwms/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/apigwms/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/apigwms/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/apigwms/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/apigwms/templates/envoy-cm.yaml create mode 100644 deploy/k8s/archived/helm/apigwms/templates/ingress.yaml create mode 100644 deploy/k8s/archived/helm/apigwms/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/apigwms/values.yaml create mode 100644 deploy/k8s/archived/helm/apigwwm/.helmignore create mode 100644 deploy/k8s/archived/helm/apigwwm/Chart.yaml create mode 100644 deploy/k8s/archived/helm/apigwwm/envoy.yaml create mode 100644 deploy/k8s/archived/helm/apigwwm/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/apigwwm/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/apigwwm/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/apigwwm/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/apigwwm/templates/envoy-cm.yaml create mode 100644 deploy/k8s/archived/helm/apigwwm/templates/ingress.yaml create mode 100644 deploy/k8s/archived/helm/apigwwm/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/apigwwm/values.yaml create mode 100644 deploy/k8s/archived/helm/apigwws/.helmignore create mode 100644 deploy/k8s/archived/helm/apigwws/Chart.yaml create mode 100644 deploy/k8s/archived/helm/apigwws/envoy.yaml create mode 100644 deploy/k8s/archived/helm/apigwws/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/apigwws/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/apigwws/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/apigwws/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/apigwws/templates/envoy-cm.yaml create mode 100644 deploy/k8s/archived/helm/apigwws/templates/ingress.yaml create mode 100644 deploy/k8s/archived/helm/apigwws/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/apigwws/values.yaml create mode 100644 deploy/k8s/archived/helm/app.yaml create mode 100644 deploy/k8s/archived/helm/basket-api/.helmignore create mode 100644 deploy/k8s/archived/helm/basket-api/Chart.yaml create mode 100644 deploy/k8s/archived/helm/basket-api/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/basket-api/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/basket-api/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/basket-api/templates/configmap.yaml create mode 100644 deploy/k8s/archived/helm/basket-api/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/basket-api/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/basket-api/values.yaml create mode 100644 deploy/k8s/archived/helm/basket-data/.helmignore create mode 100644 deploy/k8s/archived/helm/basket-data/Chart.yaml create mode 100644 deploy/k8s/archived/helm/basket-data/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/basket-data/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/basket-data/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/basket-data/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/basket-data/values.yaml create mode 100644 deploy/k8s/archived/helm/catalog-api/.helmignore create mode 100644 deploy/k8s/archived/helm/catalog-api/Chart.yaml create mode 100644 deploy/k8s/archived/helm/catalog-api/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/catalog-api/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/catalog-api/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/catalog-api/templates/configmap.yaml create mode 100644 deploy/k8s/archived/helm/catalog-api/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/catalog-api/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/catalog-api/values.yaml create mode 100644 deploy/k8s/archived/helm/deploy-all.ps1 create mode 100644 deploy/k8s/archived/helm/deploy-all.sh create mode 100644 deploy/k8s/archived/helm/eshop-common/.helmignore create mode 100644 deploy/k8s/archived/helm/eshop-common/Chart.yaml create mode 100644 deploy/k8s/archived/helm/eshop-common/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/eshop-common/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/eshop-common/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/eshop-common/templates/secret.yaml create mode 100644 deploy/k8s/archived/helm/eshop-common/values.yaml create mode 100644 deploy/k8s/archived/helm/identity-api/.helmignore create mode 100644 deploy/k8s/archived/helm/identity-api/Chart.yaml create mode 100644 deploy/k8s/archived/helm/identity-api/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/identity-api/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/identity-api/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/identity-api/templates/configmap.yaml create mode 100644 deploy/k8s/archived/helm/identity-api/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/identity-api/templates/ingress-dockerk8s.yaml create mode 100644 deploy/k8s/archived/helm/identity-api/templates/ingress.yaml create mode 100644 deploy/k8s/archived/helm/identity-api/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/identity-api/values.yaml create mode 100644 deploy/k8s/archived/helm/inf.yaml create mode 100644 deploy/k8s/archived/helm/ingress_values.yaml create mode 100644 deploy/k8s/archived/helm/ingress_values_dockerk8s.yaml create mode 100644 deploy/k8s/archived/helm/ingress_values_linkerd.yaml create mode 100644 deploy/k8s/archived/helm/keystore-data/.helmignore create mode 100644 deploy/k8s/archived/helm/keystore-data/Chart.yaml create mode 100644 deploy/k8s/archived/helm/keystore-data/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/keystore-data/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/keystore-data/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/keystore-data/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/keystore-data/values.yaml create mode 100644 deploy/k8s/archived/helm/locations-api/.helmignore create mode 100644 deploy/k8s/archived/helm/locations-api/Chart.yaml create mode 100644 deploy/k8s/archived/helm/locations-api/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/locations-api/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/locations-api/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/locations-api/templates/configmap.yaml create mode 100644 deploy/k8s/archived/helm/locations-api/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/locations-api/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/locations-api/values.yaml create mode 100644 deploy/k8s/archived/helm/marketing-api/.helmignore create mode 100644 deploy/k8s/archived/helm/marketing-api/Chart.yaml create mode 100644 deploy/k8s/archived/helm/marketing-api/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/marketing-api/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/marketing-api/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/marketing-api/templates/configmap.yaml create mode 100644 deploy/k8s/archived/helm/marketing-api/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/marketing-api/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/marketing-api/values.yaml create mode 100644 deploy/k8s/archived/helm/mobileshoppingagg/.helmignore create mode 100644 deploy/k8s/archived/helm/mobileshoppingagg/Chart.yaml create mode 100644 deploy/k8s/archived/helm/mobileshoppingagg/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/mobileshoppingagg/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/mobileshoppingagg/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/mobileshoppingagg/templates/configmap.yaml create mode 100644 deploy/k8s/archived/helm/mobileshoppingagg/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/mobileshoppingagg/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/mobileshoppingagg/values.yaml create mode 100644 deploy/k8s/archived/helm/nosql-data/.helmignore create mode 100644 deploy/k8s/archived/helm/nosql-data/Chart.yaml create mode 100644 deploy/k8s/archived/helm/nosql-data/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/nosql-data/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/nosql-data/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/nosql-data/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/nosql-data/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/nosql-data/values.yaml create mode 100644 deploy/k8s/archived/helm/ordering-api/.helmignore create mode 100644 deploy/k8s/archived/helm/ordering-api/Chart.yaml create mode 100644 deploy/k8s/archived/helm/ordering-api/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/ordering-api/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/ordering-api/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/ordering-api/templates/configmap.yaml create mode 100644 deploy/k8s/archived/helm/ordering-api/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/ordering-api/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/ordering-api/values.yaml create mode 100644 deploy/k8s/archived/helm/ordering-backgroundtasks/.helmignore create mode 100644 deploy/k8s/archived/helm/ordering-backgroundtasks/Chart.yaml create mode 100644 deploy/k8s/archived/helm/ordering-backgroundtasks/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/ordering-backgroundtasks/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/ordering-backgroundtasks/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/ordering-backgroundtasks/templates/configmap.yaml create mode 100644 deploy/k8s/archived/helm/ordering-backgroundtasks/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/ordering-backgroundtasks/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/ordering-backgroundtasks/values.yaml create mode 100644 deploy/k8s/archived/helm/ordering-signalrhub/.helmignore create mode 100644 deploy/k8s/archived/helm/ordering-signalrhub/Chart.yaml create mode 100644 deploy/k8s/archived/helm/ordering-signalrhub/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/ordering-signalrhub/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/ordering-signalrhub/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/ordering-signalrhub/templates/configmap.yaml create mode 100644 deploy/k8s/archived/helm/ordering-signalrhub/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/ordering-signalrhub/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/ordering-signalrhub/values.yaml create mode 100644 deploy/k8s/archived/helm/payment-api/.helmignore create mode 100644 deploy/k8s/archived/helm/payment-api/Chart.yaml create mode 100644 deploy/k8s/archived/helm/payment-api/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/payment-api/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/payment-api/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/payment-api/templates/configmap.yaml create mode 100644 deploy/k8s/archived/helm/payment-api/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/payment-api/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/payment-api/values.yaml create mode 100644 deploy/k8s/archived/helm/rabbitmq/.helmignore create mode 100644 deploy/k8s/archived/helm/rabbitmq/Chart.yaml create mode 100644 deploy/k8s/archived/helm/rabbitmq/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/rabbitmq/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/rabbitmq/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/rabbitmq/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/rabbitmq/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/rabbitmq/values.yaml create mode 100644 deploy/k8s/archived/helm/sql-data/.helmignore create mode 100644 deploy/k8s/archived/helm/sql-data/Chart.yaml create mode 100644 deploy/k8s/archived/helm/sql-data/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/sql-data/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/sql-data/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/sql-data/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/sql-data/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/sql-data/values.yaml create mode 100644 deploy/k8s/archived/helm/tls-support/.helmignore create mode 100644 deploy/k8s/archived/helm/tls-support/Chart.yaml create mode 100644 deploy/k8s/archived/helm/tls-support/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/tls-support/templates/issuer.yaml create mode 100644 deploy/k8s/archived/helm/tls-support/values-prod.yaml create mode 100644 deploy/k8s/archived/helm/tls-support/values-staging.yaml create mode 100644 deploy/k8s/archived/helm/webhooks-api/.helmignore create mode 100644 deploy/k8s/archived/helm/webhooks-api/Chart.yaml create mode 100644 deploy/k8s/archived/helm/webhooks-api/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/webhooks-api/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/webhooks-api/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/webhooks-api/templates/configmap.yaml create mode 100644 deploy/k8s/archived/helm/webhooks-api/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/webhooks-api/templates/ingress.yaml create mode 100644 deploy/k8s/archived/helm/webhooks-api/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/webhooks-api/values.yaml create mode 100644 deploy/k8s/archived/helm/webhooks-web/.helmignore create mode 100644 deploy/k8s/archived/helm/webhooks-web/Chart.yaml create mode 100644 deploy/k8s/archived/helm/webhooks-web/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/webhooks-web/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/webhooks-web/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/webhooks-web/templates/configmap.yaml create mode 100644 deploy/k8s/archived/helm/webhooks-web/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/webhooks-web/templates/ingress.yaml create mode 100644 deploy/k8s/archived/helm/webhooks-web/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/webhooks-web/values.yaml create mode 100644 deploy/k8s/archived/helm/webmvc/.helmignore create mode 100644 deploy/k8s/archived/helm/webmvc/Chart.yaml create mode 100644 deploy/k8s/archived/helm/webmvc/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/webmvc/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/webmvc/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/webmvc/templates/configmap.yaml create mode 100644 deploy/k8s/archived/helm/webmvc/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/webmvc/templates/ingress-dockerk8s.yaml create mode 100644 deploy/k8s/archived/helm/webmvc/templates/ingress.yaml create mode 100644 deploy/k8s/archived/helm/webmvc/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/webmvc/values.yaml create mode 100644 deploy/k8s/archived/helm/webshoppingagg/.helmignore create mode 100644 deploy/k8s/archived/helm/webshoppingagg/Chart.yaml create mode 100644 deploy/k8s/archived/helm/webshoppingagg/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/webshoppingagg/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/webshoppingagg/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/webshoppingagg/templates/configmap.yaml create mode 100644 deploy/k8s/archived/helm/webshoppingagg/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/webshoppingagg/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/webshoppingagg/values.yaml create mode 100644 deploy/k8s/archived/helm/webspa/.helmignore create mode 100644 deploy/k8s/archived/helm/webspa/Chart.yaml create mode 100644 deploy/k8s/archived/helm/webspa/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/webspa/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/webspa/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/webspa/templates/configmap.yaml create mode 100644 deploy/k8s/archived/helm/webspa/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/webspa/templates/ingress.yaml create mode 100644 deploy/k8s/archived/helm/webspa/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/webspa/values.yaml create mode 100644 deploy/k8s/archived/helm/webstatus/.helmignore create mode 100644 deploy/k8s/archived/helm/webstatus/Chart.yaml create mode 100644 deploy/k8s/archived/helm/webstatus/templates/NOTES.txt create mode 100644 deploy/k8s/archived/helm/webstatus/templates/_helpers.tpl create mode 100644 deploy/k8s/archived/helm/webstatus/templates/_names.tpl create mode 100644 deploy/k8s/archived/helm/webstatus/templates/configmap.yaml create mode 100644 deploy/k8s/archived/helm/webstatus/templates/deployment.yaml create mode 100644 deploy/k8s/archived/helm/webstatus/templates/ingress.yaml create mode 100644 deploy/k8s/archived/helm/webstatus/templates/service.yaml create mode 100644 deploy/k8s/archived/helm/webstatus/values.yaml create mode 100644 deploy/k8s/archived/linkerd/basket-api-sp.yaml create mode 100644 deploy/k8s/archived/linkerd/catalog-api-sp.yaml create mode 100644 deploy/k8s/archived/nginx-ingress/local-cm.yaml create mode 100644 deploy/k8s/archived/nginx-ingress/local-dockerk8s/identityapi-cm-fix.yaml create mode 100644 deploy/k8s/archived/nginx-ingress/local-dockerk8s/mvc-cm-fix.yaml create mode 100644 deploy/k8s/archived/nginx-ingress/local-dockerk8s/mvc-fix.yaml create mode 100644 deploy/k8s/archived/nginx-ingress/local-svc.yaml create mode 100644 deploy/k8s/archived/nginx-ingress/mandatory.yaml create mode 100644 deploy/k8s/archived/nginx-ingress/service-nodeport.yaml create mode 100644 deploy/k8s/archived/nodeports/rabbitmq-admin.yaml create mode 100644 deploy/k8s/archived/nodeports/sql-service.yaml create mode 100644 deploy/k8s/helm/deploy-all-mac.ps1 diff --git a/deploy/k8s/archived/README.md b/deploy/k8s/archived/README.md new file mode 100644 index 000000000..3e464c3d1 --- /dev/null +++ b/deploy/k8s/archived/README.md @@ -0,0 +1,8 @@ +# Kubernetes deployment + +This folder contains the files required to deploy eShopOnContainers to a Kubernetes cluster. + +For more information see the following articles in the [wiki](https://github.com/dotnet-architecture/eShopOnContainers/wiki): + +- [Deploy to Local Kubernetes](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Deploy-to-Local-Kubernetes) +- [Deploy to Azure Kubernetes Service (AKS)](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Deploy-to-Azure-Kubernetes-Service-(AKS)) diff --git a/deploy/k8s/archived/create-aks.ps1 b/deploy/k8s/archived/create-aks.ps1 new file mode 100644 index 000000000..327f5fd6b --- /dev/null +++ b/deploy/k8s/archived/create-aks.ps1 @@ -0,0 +1,50 @@ +ļ»æParam( + [parameter(Mandatory=$true)][string]$resourceGroupName, + [parameter(Mandatory=$true)][string]$location, + [parameter(Mandatory=$true)][string]$serviceName, + [parameter(Mandatory=$true)][string]$dnsNamePrefix, + [parameter(Mandatory=$false)][string]$registryName, + [parameter(Mandatory=$true)][bool]$createAcr=$true, + [parameter(Mandatory=$false)][int]$nodeCount=3, + [parameter(Mandatory=$false)][string]$nodeVMSize="Standard_D2_v2", + [parameter(Mandatory=$false)][bool]$enableHttpApplicationAddon=$true, + [parameter(Mandatory=$false)][bool]$enableAzureMonitoring=$false, + [parameter(Mandatory=$false)][ValidateSet("VirtualMachineScaleSets","AvailabilitySet",IgnoreCase=$true)]$vmSetType="VirtualMachineScaleSets" +) + +# Create resource group +Write-Host "Creating Azure Resource Group..." -ForegroundColor Yellow +az group create --name=$resourceGroupName --location=$location + +if ($createAcr -eq $true) { + # Create Azure Container Registry + if ([string]::IsNullOrEmpty($registryName)) { + $registryName=$serviceName + } + Write-Host "Creating Azure Container Registry named $registryName" -ForegroundColor Yellow + az acr create -n $registryName -g $resourceGroupName -l $location --admin-enabled true --sku Basic +} + +# Create kubernetes cluster in AKS +Write-Host "Creating AKS $resourceGroupName/$serviceName" -ForegroundColor Yellow +az aks create --resource-group=$resourceGroupName --name=$serviceName --dns-name-prefix=$dnsNamePrefix --generate-ssh-keys --node-count=$nodeCount --node-vm-size=$nodeVMSize --vm-set-type $vmSetType + +if ($enableHttpApplicationAddon) { + Write-Host "Enabling Http Applciation Routing in AKS $serviceName" -ForegroundColor Yellow + az aks enable-addons --resource-group $resourceGroupName --name $serviceName --addons http_application_routing +} + +if ($enableAzureMonitoring) { + Write-Host "Enabling Azure Monitoring in AKS $serviceName" -ForegroundColor Yellow + az aks enable-addons --resource-group $resourceGroupName --name $serviceName --addons monitoring +} + +# Retrieve kubernetes cluster configuration and save it under ~/.kube/config +Write-Host "Getting Kubernetes config..." -ForegroundColor Yellow +az aks get-credentials --resource-group=$resourceGroupName --name=$serviceName + +if ($createAcr -eq $true) { + # Show ACR credentials + Write-Host "ACR $registryName credentials:" -ForegroundColor Yellow + az acr credential show -n $registryName +} diff --git a/deploy/k8s/archived/dashboard-adminuser.yaml b/deploy/k8s/archived/dashboard-adminuser.yaml new file mode 100644 index 000000000..9f24303cd --- /dev/null +++ b/deploy/k8s/archived/dashboard-adminuser.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: admin-user + namespace: kubernetes-dashboard +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: admin-user +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: +- kind: ServiceAccount + name: admin-user + namespace: kubernetes-dashboard diff --git a/deploy/k8s/archived/enable-tls.ps1 b/deploy/k8s/archived/enable-tls.ps1 new file mode 100644 index 000000000..cd4ef3ffe --- /dev/null +++ b/deploy/k8s/archived/enable-tls.ps1 @@ -0,0 +1,20 @@ +Param ( +[parameter(Mandatory=$false)][string]$aksName="", +[parameter(Mandatory=$false)][string]$aksRg="" +) + +if ($aksName -and $aksRg) { + + $aks=$(az aks show -n $aksName -g $aksRg -o json | ConvertFrom-Json) + if (-not $aks) { + Write-Host "AKS $aksName not found in RG $aksRg" -ForegroundColor Red + exit 1 + } + + Write-Host "Switching kubectl context to $aksRg/$aksName" -ForegroundColor Yellow + az aks get-credentials -g $aksRg -n $aksName +} + +Write-Host "Installing cert-manager on current cluster" + +kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v0.11.0/cert-manager.yaml --validate=false diff --git a/deploy/k8s/archived/helm-rbac.yaml b/deploy/k8s/archived/helm-rbac.yaml new file mode 100644 index 000000000..b6180329a --- /dev/null +++ b/deploy/k8s/archived/helm-rbac.yaml @@ -0,0 +1,18 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: tiller + namespace: kube-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: tiller +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: + - kind: ServiceAccount + name: tiller + namespace: kube-system \ No newline at end of file diff --git a/deploy/k8s/archived/helm/aks-httpaddon-cfg.yaml b/deploy/k8s/archived/helm/aks-httpaddon-cfg.yaml new file mode 100644 index 000000000..b9576b0b6 --- /dev/null +++ b/deploy/k8s/archived/helm/aks-httpaddon-cfg.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + labels: +# addonmanager.kubernetes.io/mode: Reconcile + app: addon-http-application-routing-ingress-nginx + kubernetes.io/cluster-service: "true" + name: addon-http-application-routing-nginx-configuration + namespace: kube-system +data: + proxy-buffer-size: "128k" + proxy-buffers: "4 256k" diff --git a/deploy/k8s/archived/helm/apigwmm/.helmignore b/deploy/k8s/archived/helm/apigwmm/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwmm/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/apigwmm/Chart.yaml b/deploy/k8s/archived/helm/apigwmm/Chart.yaml new file mode 100644 index 000000000..50b3d07c6 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwmm/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: apigwmm +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/apigwmm/envoy.yaml b/deploy/k8s/archived/helm/apigwmm/envoy.yaml new file mode 100644 index 000000000..54b1afa06 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwmm/envoy.yaml @@ -0,0 +1,75 @@ +admin: + access_log_path: "/dev/null" + address: + socket_address: + address: 0.0.0.0 + port_value: 8001 +static_resources: + listeners: + - address: + socket_address: + address: 0.0.0.0 + port_value: 80 + filter_chains: + - filters: + - name: envoy.http_connection_manager + config: + codec_type: auto + stat_prefix: ingress_http + route_config: + name: eshop_backend_route + virtual_hosts: + - name: eshop_backend + domains: + - "*" + routes: + - name: "m-short" + match: + prefix: "/m/" + route: + auto_host_rewrite: true + prefix_rewrite: "/marketing-api/" + cluster: marketing + - name: "m-long" + match: + prefix: "/marketing-api/" + route: + auto_host_rewrite: true + cluster: marketing + http_filters: + - name: envoy.router + access_log: + - name: envoy.file_access_log + filter: + not_health_check_filter: {} + config: + json_format: + time: "%START_TIME%" + protocol: "%PROTOCOL%" + duration: "%DURATION%" + request_method: "%REQ(:METHOD)%" + request_host: "%REQ(HOST)%" + path: "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%" + response_flags: "%RESPONSE_FLAGS%" + route_name: "%ROUTE_NAME%" + upstream_host: "%UPSTREAM_HOST%" + upstream_cluster: "%UPSTREAM_CLUSTER%" + upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%" + path: "/tmp/access.log" + clusters: + - name: marketing + connect_timeout: 0.25s + type: logical_dns + lb_policy: round_robin + hosts: + - socket_address: + address: marketing-api + port_value: 80 + - name: locations + connect_timeout: 0.25s + type: logical_dns + lb_policy: round_robin + hosts: + - socket_address: + address: locations-api + port_value: 80 diff --git a/deploy/k8s/archived/helm/apigwmm/templates/NOTES.txt b/deploy/k8s/archived/helm/apigwmm/templates/NOTES.txt new file mode 100644 index 000000000..30ef33447 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwmm/templates/NOTES.txt @@ -0,0 +1,2 @@ +eShop API Gateway for Mobile Marketing services installed +---------------------------------------------------------- \ No newline at end of file diff --git a/deploy/k8s/archived/helm/apigwmm/templates/_helpers.tpl b/deploy/k8s/archived/helm/apigwmm/templates/_helpers.tpl new file mode 100644 index 000000000..fd3d89212 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwmm/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "apigwmm.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "apigwmm.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "apigwmm.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/apigwmm/templates/_names.tpl b/deploy/k8s/archived/helm/apigwmm/templates/_names.tpl new file mode 100644 index 000000000..d44859fea --- /dev/null +++ b/deploy/k8s/archived/helm/apigwmm/templates/_names.tpl @@ -0,0 +1,52 @@ +{{- define "suffix-name" -}} +{{- if .Values.app.name -}} +{{- .Values.app.name -}} +{{- else -}} +{{- .Release.Name -}} +{{- end -}} +{{- end -}} + +{{- define "sql-name" -}} +{{- if .Values.inf.sql.host -}} +{{- .Values.inf.sql.host -}} +{{- else -}} +{{- printf "%s" "sql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "nosql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "url-of" -}} +{{- $name := first .}} +{{- $ctx := last .}} +{{- if eq $name "" -}} +{{- $ctx.Values.inf.k8s.dns -}} +{{- else -}} +{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} +{{- end -}} +{{- end -}} + + + +{{- define "pathBase" -}} +{{- if .Values.inf.k8s.suffix -}} +{{- $suffix := include "suffix-name" . -}} +{{- printf "%s-%s" .Values.pathBase $suffix -}} +{{- else -}} +{{- .Values.pathBase -}} +{{- end -}} +{{- end -}} + +{{- define "fqdn-image" -}} +{{- if .Values.inf.registry -}} +{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} +{{- else -}} +{{- .Values.image.repository -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/apigwmm/templates/deployment.yaml b/deploy/k8s/archived/helm/apigwmm/templates/deployment.yaml new file mode 100644 index 000000000..f93706bb9 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwmm/templates/deployment.yaml @@ -0,0 +1,110 @@ +{{- $name := include "apigwmm.fullname" . -}} +{{- $cfgname := printf "%s-%s" "cfg" $name -}} +{{- $envoycfgname := printf "%s-%s" "envoy" $name -}} +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "apigwmm.fullname" . }} + labels: + ufo: {{ $cfgname}} + app: {{ template "apigwmm.name" . }} + chart: {{ template "apigwmm.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "apigwmm.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "apigwmm.name" . }} + release: {{ .Release.Name }} + {{ if .Values.inf.mesh.enabled -}} + annotations: + linkerd.io/inject: enabled + {{- end }} + spec: + {{ if .Values.inf.registry -}} + imagePullSecrets: + - name: {{ .Values.inf.registry.secretName }} + {{- end }} + volumes: + - name: config + configMap: + name: {{ $envoycfgname }} + items: + - key: envoy.yaml + path: envoy.yaml + containers: + - name: {{ .Chart.Name }} + {{ if .Values.probes -}} + {{- if .Values.probes.liveness -}} + livenessProbe: + httpGet: + port: {{ .Values.probes.liveness.port }} + path: {{ .Values.probes.liveness.path }} + initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.liveness.periodSeconds }} + {{- end -}} + {{- end -}} + {{- if .Values.probes -}} + {{- if .Values.probes.readiness }} + readinessProbe: + httpGet: + port: {{ .Values.probes.readiness.port }} + path: {{ .Values.probes.readiness.path }} + initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.readiness.periodSeconds }} + timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} + {{- end -}} + {{- end }} + image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" + imagePullPolicy: IfNotPresent + volumeMounts: + - name: config + mountPath: {{ .Values.envoy.configPath }} + env: + - name: PATH_BASE + value: {{ include "pathBase" . }} + - name: k8sname + value: {{ .Values.clusterName }} + {{- if .Values.env.values -}} + {{- range .Values.env.values }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end -}} + {{- end -}} + {{- if .Values.env.configmap -}} + {{- range .Values.env.configmap }} + - name: {{ .name }} + valueFrom: + configMapKeyRef: + name: {{ $cfgname }} + key: {{ .key }} + {{- end -}} + {{- end }} + ports: + - name: http + containerPort: 80 + protocol: TCP + - name: admin + containerPort: 8001 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + diff --git a/deploy/k8s/archived/helm/apigwmm/templates/envoy-cm.yaml b/deploy/k8s/archived/helm/apigwmm/templates/envoy-cm.yaml new file mode 100644 index 000000000..71728d084 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwmm/templates/envoy-cm.yaml @@ -0,0 +1,14 @@ +{{- $name := include "apigwmm.fullname" . -}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: "envoy-{{ $name }}" + labels: + app: {{ template "apigwmm.name" . }} + chart: {{ template "apigwmm.chart" .}} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + {{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }} + diff --git a/deploy/k8s/archived/helm/apigwmm/templates/ingress.yaml b/deploy/k8s/archived/helm/apigwmm/templates/ingress.yaml new file mode 100644 index 000000000..44e9a90fc --- /dev/null +++ b/deploy/k8s/archived/helm/apigwmm/templates/ingress.yaml @@ -0,0 +1,46 @@ +{{- if .Values.ingress.enabled -}} +{{- $ingressPath := include "pathBase" . -}} +{{- $serviceName := .Values.app.svc.mobilemarketingapigw -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ template "apigwmm.fullname" . }} + labels: + app: {{ template "apigwmm.name" . }} + chart: {{ template "apigwmm.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.ingress.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +{{- if and .Values.inf.tls.enabled .Values.inf.tls.issuer }} + cert-manager.io/issuer: {{ .Values.inf.tls.issuer }} +{{- end }} +{{- if .Values.inf.mesh.enabled }} +{{- with .Values.ingress.mesh.annotations }} +{{ toYaml . | indent 4 }} +{{- end }} +{{- end }} +spec: +{{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} +{{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ . }} + http: + paths: + - path: {{ $ingressPath }} + backend: + serviceName: {{ $serviceName }} + servicePort: http + {{- end }} +{{- end }} diff --git a/deploy/k8s/archived/helm/apigwmm/templates/service.yaml b/deploy/k8s/archived/helm/apigwmm/templates/service.yaml new file mode 100644 index 000000000..286277c7d --- /dev/null +++ b/deploy/k8s/archived/helm/apigwmm/templates/service.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.app.svc.mobilemarketingapigw }} + labels: + app: {{ template "apigwmm.name" . }} + chart: {{ template "apigwmm.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + - port: {{ .Values.service.adminPort }} + targetPort: admin + protocol: TCP + name: admin + selector: + app: {{ template "apigwmm.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/apigwmm/values.yaml b/deploy/k8s/archived/helm/apigwmm/values.yaml new file mode 100644 index 000000000..21f12f27a --- /dev/null +++ b/deploy/k8s/archived/helm/apigwmm/values.yaml @@ -0,0 +1,45 @@ +replicaCount: 1 +clusterName: eshop-aks +pathBase: /mobilemarketingapigw + +image: + repository: envoyproxy/envoy + tag: v1.11.1 + +service: + type: ClusterIP + port: 80 + adminPort: 8001 + +ingress: + enabled: true + annotations: + nginx.ingress.kubernetes.io/rewrite-target: "/" + ingress.kubernetes.io/rewrite-target: "/" + tls: [] + +resources: {} + + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +env: {} + +envoy: + configPath: /etc/envoy + +probes: + liveness: + path: /ready + initialDelaySeconds: 5 + periodSeconds: 15 + port: 8001 + readiness: + path: /ready + initialDelaySeconds: 5 + periodSeconds: 60 + port: 8001 \ No newline at end of file diff --git a/deploy/k8s/archived/helm/apigwms/.helmignore b/deploy/k8s/archived/helm/apigwms/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwms/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/apigwms/Chart.yaml b/deploy/k8s/archived/helm/apigwms/Chart.yaml new file mode 100644 index 000000000..3ad3fdf46 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwms/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: apigwms +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/apigwms/envoy.yaml b/deploy/k8s/archived/helm/apigwms/envoy.yaml new file mode 100644 index 000000000..1ae8c45a1 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwms/envoy.yaml @@ -0,0 +1,139 @@ +admin: + access_log_path: "/dev/null" + address: + socket_address: + address: 0.0.0.0 + port_value: 8001 +static_resources: + listeners: + - address: + socket_address: + address: 0.0.0.0 + port_value: 80 + filter_chains: + - filters: + - name: envoy.http_connection_manager + config: + codec_type: auto + stat_prefix: ingress_http + route_config: + name: eshop_backend_route + virtual_hosts: + - name: eshop_backend + domains: + - "*" + routes: + - name: "c-short" + match: + prefix: "/c/" + route: + auto_host_rewrite: true + prefix_rewrite: "/catalog-api/" + cluster: catalog + - name: "c-long" + match: + prefix: "/catalog-api/" + route: + auto_host_rewrite: true + cluster: catalog + - name: "o-short" + match: + prefix: "/o/" + route: + auto_host_rewrite: true + prefix_rewrite: "/ordering-api/" + cluster: ordering + - name: "o-long" + match: + prefix: "/ordering-api/" + route: + auto_host_rewrite: true + cluster: ordering + - name: "h-long" + match: + prefix: "/hub/notificationhub" + route: + auto_host_rewrite: true + cluster: signalr-hub + timeout: 300s + - name: "b-short" + match: + prefix: "/b/" + route: + auto_host_rewrite: true + prefix_rewrite: "/basket-api/" + cluster: basket + - name: "b-long" + match: + prefix: "/basket-api/" + route: + auto_host_rewrite: true + cluster: basket + - name: "agg" + match: + prefix: "/" + route: + auto_host_rewrite: true + prefix_rewrite: "/" + cluster: shoppingagg + http_filters: + - name: envoy.router + access_log: + - name: envoy.file_access_log + filter: + not_health_check_filter: {} + config: + json_format: + time: "%START_TIME%" + protocol: "%PROTOCOL%" + duration: "%DURATION%" + request_method: "%REQ(:METHOD)%" + request_host: "%REQ(HOST)%" + path: "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%" + response_flags: "%RESPONSE_FLAGS%" + route_name: "%ROUTE_NAME%" + upstream_host: "%UPSTREAM_HOST%" + upstream_cluster: "%UPSTREAM_CLUSTER%" + upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%" + path: "/tmp/access.log" + clusters: + - name: shoppingagg + connect_timeout: 0.25s + type: strict_dns + lb_policy: round_robin + hosts: + - socket_address: + address: webshoppingagg + port_value: 80 + - name: catalog + connect_timeout: 0.25s + type: strict_dns + lb_policy: round_robin + hosts: + - socket_address: + address: catalog-api + port_value: 80 + - name: basket + connect_timeout: 0.25s + type: strict_dns + lb_policy: round_robin + hosts: + - socket_address: + address: basket-api + port_value: 80 + - name: ordering + connect_timeout: 0.25s + type: strict_dns + lb_policy: round_robin + hosts: + - socket_address: + address: ordering-api + port_value: 80 + - name: signalr-hub + connect_timeout: 0.25s + type: strict_dns + lb_policy: round_robin + hosts: + - socket_address: + address: ordering-signalrhub + port_value: 80 diff --git a/deploy/k8s/archived/helm/apigwms/templates/NOTES.txt b/deploy/k8s/archived/helm/apigwms/templates/NOTES.txt new file mode 100644 index 000000000..74b3eedda --- /dev/null +++ b/deploy/k8s/archived/helm/apigwms/templates/NOTES.txt @@ -0,0 +1,2 @@ +eShop API Gateway for Mobile Shopping services installed +-------------------------------------------------------- \ No newline at end of file diff --git a/deploy/k8s/archived/helm/apigwms/templates/_helpers.tpl b/deploy/k8s/archived/helm/apigwms/templates/_helpers.tpl new file mode 100644 index 000000000..2ae403c2f --- /dev/null +++ b/deploy/k8s/archived/helm/apigwms/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "apigwms.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "apigwms.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "apigwms.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/apigwms/templates/_names.tpl b/deploy/k8s/archived/helm/apigwms/templates/_names.tpl new file mode 100644 index 000000000..d44859fea --- /dev/null +++ b/deploy/k8s/archived/helm/apigwms/templates/_names.tpl @@ -0,0 +1,52 @@ +{{- define "suffix-name" -}} +{{- if .Values.app.name -}} +{{- .Values.app.name -}} +{{- else -}} +{{- .Release.Name -}} +{{- end -}} +{{- end -}} + +{{- define "sql-name" -}} +{{- if .Values.inf.sql.host -}} +{{- .Values.inf.sql.host -}} +{{- else -}} +{{- printf "%s" "sql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "nosql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "url-of" -}} +{{- $name := first .}} +{{- $ctx := last .}} +{{- if eq $name "" -}} +{{- $ctx.Values.inf.k8s.dns -}} +{{- else -}} +{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} +{{- end -}} +{{- end -}} + + + +{{- define "pathBase" -}} +{{- if .Values.inf.k8s.suffix -}} +{{- $suffix := include "suffix-name" . -}} +{{- printf "%s-%s" .Values.pathBase $suffix -}} +{{- else -}} +{{- .Values.pathBase -}} +{{- end -}} +{{- end -}} + +{{- define "fqdn-image" -}} +{{- if .Values.inf.registry -}} +{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} +{{- else -}} +{{- .Values.image.repository -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/apigwms/templates/deployment.yaml b/deploy/k8s/archived/helm/apigwms/templates/deployment.yaml new file mode 100644 index 000000000..2c5703103 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwms/templates/deployment.yaml @@ -0,0 +1,110 @@ +{{- $name := include "apigwms.fullname" . -}} +{{- $cfgname := printf "%s-%s" "cfg" $name -}} +{{- $envoycfgname := printf "%s-%s" "envoy" $name -}} +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "apigwms.fullname" . }} + labels: + ufo: {{ $cfgname}} + app: {{ template "apigwms.name" . }} + chart: {{ template "apigwms.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "apigwms.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "apigwms.name" . }} + release: {{ .Release.Name }} + {{ if .Values.inf.mesh.enabled -}} + annotations: + linkerd.io/inject: enabled + {{- end }} + spec: + {{ if .Values.inf.registry -}} + imagePullSecrets: + - name: {{ .Values.inf.registry.secretName }} + {{- end }} + volumes: + - name: config + configMap: + name: {{ $envoycfgname }} + items: + - key: envoy.yaml + path: envoy.yaml + containers: + - name: {{ .Chart.Name }} + {{ if .Values.probes -}} + {{- if .Values.probes.liveness -}} + livenessProbe: + httpGet: + port: {{ .Values.probes.liveness.port }} + path: {{ .Values.probes.liveness.path }} + initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.liveness.periodSeconds }} + {{- end -}} + {{- end -}} + {{- if .Values.probes -}} + {{- if .Values.probes.readiness }} + readinessProbe: + httpGet: + port: {{ .Values.probes.readiness.port }} + path: {{ .Values.probes.readiness.path }} + initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.readiness.periodSeconds }} + timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} + {{- end -}} + {{- end }} + image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" + imagePullPolicy: IfNotPresent + volumeMounts: + - name: config + mountPath: {{ .Values.envoy.configPath }} + env: + - name: PATH_BASE + value: {{ include "pathBase" . }} + - name: k8sname + value: {{ .Values.clusterName }} + {{- if .Values.env.values -}} + {{- range .Values.env.values }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end -}} + {{- end -}} + {{- if .Values.env.configmap -}} + {{- range .Values.env.configmap }} + - name: {{ .name }} + valueFrom: + configMapKeyRef: + name: {{ $cfgname }} + key: {{ .key }} + {{- end -}} + {{- end }} + ports: + - name: http + containerPort: 80 + protocol: TCP + - name: admin + containerPort: 8001 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + diff --git a/deploy/k8s/archived/helm/apigwms/templates/envoy-cm.yaml b/deploy/k8s/archived/helm/apigwms/templates/envoy-cm.yaml new file mode 100644 index 000000000..76da5832b --- /dev/null +++ b/deploy/k8s/archived/helm/apigwms/templates/envoy-cm.yaml @@ -0,0 +1,14 @@ +{{- $name := include "apigwms.fullname" . -}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: "envoy-{{ $name }}" + labels: + app: {{ template "apigwms.name" . }} + chart: {{ template "apigwms.chart" .}} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + {{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }} + diff --git a/deploy/k8s/archived/helm/apigwms/templates/ingress.yaml b/deploy/k8s/archived/helm/apigwms/templates/ingress.yaml new file mode 100644 index 000000000..bc0c6d05b --- /dev/null +++ b/deploy/k8s/archived/helm/apigwms/templates/ingress.yaml @@ -0,0 +1,47 @@ +{{- if .Values.ingress.enabled -}} +{{- $ingressPath := include "pathBase" . -}} +{{- $serviceName := .Values.app.svc.mobileshoppingapigw -}} + +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ template "apigwms.fullname" . }} + labels: + app: {{ template "apigwms.name" . }} + chart: {{ template "apigwms.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.ingress.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +{{- if and .Values.inf.tls.enabled .Values.inf.tls.issuer }} + cert-manager.io/issuer: {{ .Values.inf.tls.issuer }} +{{- end }} +{{- if .Values.inf.mesh.enabled }} +{{- with .Values.ingress.mesh.annotations }} +{{ toYaml . | indent 4 }} +{{- end }} +{{- end }} +spec: +{{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} +{{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ . }} + http: + paths: + - path: {{ $ingressPath }} + backend: + serviceName: {{ $serviceName }} + servicePort: http + {{- end }} +{{- end }} diff --git a/deploy/k8s/archived/helm/apigwms/templates/service.yaml b/deploy/k8s/archived/helm/apigwms/templates/service.yaml new file mode 100644 index 000000000..aa087d428 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwms/templates/service.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.app.svc.mobileshoppingapigw }} + labels: + app: {{ template "apigwms.name" . }} + chart: {{ template "apigwms.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + - port: {{ .Values.service.adminPort }} + targetPort: admin + protocol: TCP + name: admin + selector: + app: {{ template "apigwms.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/apigwms/values.yaml b/deploy/k8s/archived/helm/apigwms/values.yaml new file mode 100644 index 000000000..4a92d85e9 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwms/values.yaml @@ -0,0 +1,45 @@ +replicaCount: 1 +clusterName: eshop-aks +pathBase: /mobileshoppingapigw + +image: + repository: envoyproxy/envoy + tag: v1.11.1 + +service: + type: ClusterIP + port: 80 + adminPort: 8001 + +ingress: + enabled: true + annotations: + nginx.ingress.kubernetes.io/rewrite-target: "/" + ingress.kubernetes.io/rewrite-target: "/" + tls: [] + +resources: {} + + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +env: {} + +envoy: + configPath: /etc/envoy + +probes: + liveness: + path: /ready + initialDelaySeconds: 5 + periodSeconds: 15 + port: 8001 + readiness: + path: /ready + initialDelaySeconds: 5 + periodSeconds: 60 + port: 8001 \ No newline at end of file diff --git a/deploy/k8s/archived/helm/apigwwm/.helmignore b/deploy/k8s/archived/helm/apigwwm/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwwm/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/apigwwm/Chart.yaml b/deploy/k8s/archived/helm/apigwwm/Chart.yaml new file mode 100644 index 000000000..4c2082969 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwwm/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: apigwwm +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/apigwwm/envoy.yaml b/deploy/k8s/archived/helm/apigwwm/envoy.yaml new file mode 100644 index 000000000..c6f3421de --- /dev/null +++ b/deploy/k8s/archived/helm/apigwwm/envoy.yaml @@ -0,0 +1,75 @@ +admin: + access_log_path: "/dev/null" + address: + socket_address: + address: 0.0.0.0 + port_value: 8001 +static_resources: + listeners: + - address: + socket_address: + address: 0.0.0.0 + port_value: 80 + filter_chains: + - filters: + - name: envoy.http_connection_manager + config: + codec_type: auto + stat_prefix: ingress_http + route_config: + name: eshop_backend_route + virtual_hosts: + - name: eshop_backend + domains: + - "*" + routes: + - name: "m-short" + match: + prefix: "/m/" + route: + auto_host_rewrite: true + prefix_rewrite: "/marketing-api/" + cluster: marketing + - name: "m-long" + match: + prefix: "/marketing-api/" + route: + auto_host_rewrite: true + cluster: marketing + http_filters: + - name: envoy.router + access_log: + - name: envoy.file_access_log + filter: + not_health_check_filter: {} + config: + json_format: + time: "%START_TIME%" + protocol: "%PROTOCOL%" + duration: "%DURATION%" + request_method: "%REQ(:METHOD)%" + request_host: "%REQ(HOST)%" + path: "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%" + response_flags: "%RESPONSE_FLAGS%" + route_name: "%ROUTE_NAME%" + upstream_host: "%UPSTREAM_HOST%" + upstream_cluster: "%UPSTREAM_CLUSTER%" + upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%" + path: "/tmp/access.log" + clusters: + - name: marketing + connect_timeout: 0.25s + type: strict_dns + lb_policy: round_robin + hosts: + - socket_address: + address: marketing-api + port_value: 80 + - name: locations + connect_timeout: 0.25s + type: strict_dns + lb_policy: round_robin + hosts: + - socket_address: + address: locations-api + port_value: 80 diff --git a/deploy/k8s/archived/helm/apigwwm/templates/NOTES.txt b/deploy/k8s/archived/helm/apigwwm/templates/NOTES.txt new file mode 100644 index 000000000..3420c97c8 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwwm/templates/NOTES.txt @@ -0,0 +1,2 @@ +eShop API Gateway for Web Marketing services installed +------------------------------------------------------ \ No newline at end of file diff --git a/deploy/k8s/archived/helm/apigwwm/templates/_helpers.tpl b/deploy/k8s/archived/helm/apigwwm/templates/_helpers.tpl new file mode 100644 index 000000000..194cf96ca --- /dev/null +++ b/deploy/k8s/archived/helm/apigwwm/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "apigwwm.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "apigwwm.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "apigwwm.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/apigwwm/templates/_names.tpl b/deploy/k8s/archived/helm/apigwwm/templates/_names.tpl new file mode 100644 index 000000000..d44859fea --- /dev/null +++ b/deploy/k8s/archived/helm/apigwwm/templates/_names.tpl @@ -0,0 +1,52 @@ +{{- define "suffix-name" -}} +{{- if .Values.app.name -}} +{{- .Values.app.name -}} +{{- else -}} +{{- .Release.Name -}} +{{- end -}} +{{- end -}} + +{{- define "sql-name" -}} +{{- if .Values.inf.sql.host -}} +{{- .Values.inf.sql.host -}} +{{- else -}} +{{- printf "%s" "sql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "nosql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "url-of" -}} +{{- $name := first .}} +{{- $ctx := last .}} +{{- if eq $name "" -}} +{{- $ctx.Values.inf.k8s.dns -}} +{{- else -}} +{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} +{{- end -}} +{{- end -}} + + + +{{- define "pathBase" -}} +{{- if .Values.inf.k8s.suffix -}} +{{- $suffix := include "suffix-name" . -}} +{{- printf "%s-%s" .Values.pathBase $suffix -}} +{{- else -}} +{{- .Values.pathBase -}} +{{- end -}} +{{- end -}} + +{{- define "fqdn-image" -}} +{{- if .Values.inf.registry -}} +{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} +{{- else -}} +{{- .Values.image.repository -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/apigwwm/templates/deployment.yaml b/deploy/k8s/archived/helm/apigwwm/templates/deployment.yaml new file mode 100644 index 000000000..6ceb1fa1b --- /dev/null +++ b/deploy/k8s/archived/helm/apigwwm/templates/deployment.yaml @@ -0,0 +1,110 @@ +{{- $name := include "apigwwm.fullname" . -}} +{{- $cfgname := printf "%s-%s" "cfg" $name -}} +{{- $envoycfgname := printf "%s-%s" "envoy" $name -}} +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "apigwwm.fullname" . }} + labels: + ufo: {{ $cfgname}} + app: {{ template "apigwwm.name" . }} + chart: {{ template "apigwwm.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "apigwwm.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "apigwwm.name" . }} + release: {{ .Release.Name }} + {{ if .Values.inf.mesh.enabled -}} + annotations: + linkerd.io/inject: enabled + {{- end }} + spec: + {{ if .Values.inf.registry -}} + imagePullSecrets: + - name: {{ .Values.inf.registry.secretName }} + {{- end }} + volumes: + - name: config + configMap: + name: {{ $envoycfgname }} + items: + - key: envoy.yaml + path: envoy.yaml + containers: + - name: {{ .Chart.Name }} + {{ if .Values.probes -}} + {{- if .Values.probes.liveness -}} + livenessProbe: + httpGet: + port: {{ .Values.probes.liveness.port }} + path: {{ .Values.probes.liveness.path }} + initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.liveness.periodSeconds }} + {{- end -}} + {{- end -}} + {{- if .Values.probes -}} + {{- if .Values.probes.readiness }} + readinessProbe: + httpGet: + port: {{ .Values.probes.readiness.port }} + path: {{ .Values.probes.readiness.path }} + initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.readiness.periodSeconds }} + timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} + {{- end -}} + {{- end }} + image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" + imagePullPolicy: IfNotPresent + volumeMounts: + - name: config + mountPath: {{ .Values.envoy.configPath }} + env: + - name: PATH_BASE + value: {{ include "pathBase" . }} + - name: k8sname + value: {{ .Values.clusterName }} + {{- if .Values.env.values -}} + {{- range .Values.env.values }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end -}} + {{- end -}} + {{- if .Values.env.configmap -}} + {{- range .Values.env.configmap }} + - name: {{ .name }} + valueFrom: + configMapKeyRef: + name: {{ $cfgname }} + key: {{ .key }} + {{- end -}} + {{- end }} + ports: + - name: http + containerPort: 80 + protocol: TCP + - name: admin + containerPort: 8001 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + diff --git a/deploy/k8s/archived/helm/apigwwm/templates/envoy-cm.yaml b/deploy/k8s/archived/helm/apigwwm/templates/envoy-cm.yaml new file mode 100644 index 000000000..4d6307e36 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwwm/templates/envoy-cm.yaml @@ -0,0 +1,14 @@ +{{- $name := include "apigwwm.fullname" . -}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: "envoy-{{ $name }}" + labels: + app: {{ template "apigwwm.name" . }} + chart: {{ template "apigwwm.chart" .}} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + {{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 -}} + diff --git a/deploy/k8s/archived/helm/apigwwm/templates/ingress.yaml b/deploy/k8s/archived/helm/apigwwm/templates/ingress.yaml new file mode 100644 index 000000000..00d54c226 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwwm/templates/ingress.yaml @@ -0,0 +1,47 @@ +{{- if .Values.ingress.enabled -}} +{{- $ingressPath := include "pathBase" . -}} +{{- $serviceName := .Values.app.svc.webmarketingapigw -}} + +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ template "apigwwm.fullname" . }} + labels: + app: {{ template "apigwwm.name" . }} + chart: {{ template "apigwwm.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.ingress.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +{{- if and .Values.inf.tls.enabled .Values.inf.tls.issuer }} + cert-manager.io/issuer: {{ .Values.inf.tls.issuer }} +{{- end }} +{{- if .Values.inf.mesh.enabled }} +{{- with .Values.ingress.mesh.annotations }} +{{ toYaml . | indent 4 }} +{{- end }} +{{- end }} +spec: +{{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} +{{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ . }} + http: + paths: + - path: {{ $ingressPath }} + backend: + serviceName: {{ $serviceName }} + servicePort: http + {{- end }} +{{- end }} diff --git a/deploy/k8s/archived/helm/apigwwm/templates/service.yaml b/deploy/k8s/archived/helm/apigwwm/templates/service.yaml new file mode 100644 index 000000000..cb11cc665 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwwm/templates/service.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.app.svc.webmarketingapigw }} + labels: + app: {{ template "apigwwm.name" . }} + chart: {{ template "apigwwm.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + - port: {{ .Values.service.adminPort }} + targetPort: admin + protocol: TCP + name: admin + selector: + app: {{ template "apigwwm.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/apigwwm/values.yaml b/deploy/k8s/archived/helm/apigwwm/values.yaml new file mode 100644 index 000000000..d866c2d3c --- /dev/null +++ b/deploy/k8s/archived/helm/apigwwm/values.yaml @@ -0,0 +1,46 @@ +replicaCount: 1 +clusterName: eshop-aks +pathBase: /webmarketingapigw + +image: + repository: envoyproxy/envoy + tag: v1.11.1 + +service: + type: ClusterIP + port: 80 + adminPort: 8001 + +ingress: + enabled: true + annotations: + nginx.ingress.kubernetes.io/rewrite-target: "/" + ingress.kubernetes.io/rewrite-target: "/" + tls: [] + +resources: {} + + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +# env defines the environment variables that will be declared in the pod +env: {} + +envoy: + configPath: /etc/envoy + +probes: + liveness: + path: /ready + initialDelaySeconds: 5 + periodSeconds: 15 + port: 8001 + readiness: + path: /ready + initialDelaySeconds: 5 + periodSeconds: 60 + port: 8001 \ No newline at end of file diff --git a/deploy/k8s/archived/helm/apigwws/.helmignore b/deploy/k8s/archived/helm/apigwws/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwws/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/apigwws/Chart.yaml b/deploy/k8s/archived/helm/apigwws/Chart.yaml new file mode 100644 index 000000000..0a6c34e62 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwws/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: apigwws +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/apigwws/envoy.yaml b/deploy/k8s/archived/helm/apigwws/envoy.yaml new file mode 100644 index 000000000..1ae8c45a1 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwws/envoy.yaml @@ -0,0 +1,139 @@ +admin: + access_log_path: "/dev/null" + address: + socket_address: + address: 0.0.0.0 + port_value: 8001 +static_resources: + listeners: + - address: + socket_address: + address: 0.0.0.0 + port_value: 80 + filter_chains: + - filters: + - name: envoy.http_connection_manager + config: + codec_type: auto + stat_prefix: ingress_http + route_config: + name: eshop_backend_route + virtual_hosts: + - name: eshop_backend + domains: + - "*" + routes: + - name: "c-short" + match: + prefix: "/c/" + route: + auto_host_rewrite: true + prefix_rewrite: "/catalog-api/" + cluster: catalog + - name: "c-long" + match: + prefix: "/catalog-api/" + route: + auto_host_rewrite: true + cluster: catalog + - name: "o-short" + match: + prefix: "/o/" + route: + auto_host_rewrite: true + prefix_rewrite: "/ordering-api/" + cluster: ordering + - name: "o-long" + match: + prefix: "/ordering-api/" + route: + auto_host_rewrite: true + cluster: ordering + - name: "h-long" + match: + prefix: "/hub/notificationhub" + route: + auto_host_rewrite: true + cluster: signalr-hub + timeout: 300s + - name: "b-short" + match: + prefix: "/b/" + route: + auto_host_rewrite: true + prefix_rewrite: "/basket-api/" + cluster: basket + - name: "b-long" + match: + prefix: "/basket-api/" + route: + auto_host_rewrite: true + cluster: basket + - name: "agg" + match: + prefix: "/" + route: + auto_host_rewrite: true + prefix_rewrite: "/" + cluster: shoppingagg + http_filters: + - name: envoy.router + access_log: + - name: envoy.file_access_log + filter: + not_health_check_filter: {} + config: + json_format: + time: "%START_TIME%" + protocol: "%PROTOCOL%" + duration: "%DURATION%" + request_method: "%REQ(:METHOD)%" + request_host: "%REQ(HOST)%" + path: "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%" + response_flags: "%RESPONSE_FLAGS%" + route_name: "%ROUTE_NAME%" + upstream_host: "%UPSTREAM_HOST%" + upstream_cluster: "%UPSTREAM_CLUSTER%" + upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%" + path: "/tmp/access.log" + clusters: + - name: shoppingagg + connect_timeout: 0.25s + type: strict_dns + lb_policy: round_robin + hosts: + - socket_address: + address: webshoppingagg + port_value: 80 + - name: catalog + connect_timeout: 0.25s + type: strict_dns + lb_policy: round_robin + hosts: + - socket_address: + address: catalog-api + port_value: 80 + - name: basket + connect_timeout: 0.25s + type: strict_dns + lb_policy: round_robin + hosts: + - socket_address: + address: basket-api + port_value: 80 + - name: ordering + connect_timeout: 0.25s + type: strict_dns + lb_policy: round_robin + hosts: + - socket_address: + address: ordering-api + port_value: 80 + - name: signalr-hub + connect_timeout: 0.25s + type: strict_dns + lb_policy: round_robin + hosts: + - socket_address: + address: ordering-signalrhub + port_value: 80 diff --git a/deploy/k8s/archived/helm/apigwws/templates/NOTES.txt b/deploy/k8s/archived/helm/apigwws/templates/NOTES.txt new file mode 100644 index 000000000..8214afb1e --- /dev/null +++ b/deploy/k8s/archived/helm/apigwws/templates/NOTES.txt @@ -0,0 +1,2 @@ +eShop API Gateway for Web Shopping services installed +----------------------------------------------------- \ No newline at end of file diff --git a/deploy/k8s/archived/helm/apigwws/templates/_helpers.tpl b/deploy/k8s/archived/helm/apigwws/templates/_helpers.tpl new file mode 100644 index 000000000..b6aa6b483 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwws/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "apigwws.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "apigwws.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "apigwws.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/apigwws/templates/_names.tpl b/deploy/k8s/archived/helm/apigwws/templates/_names.tpl new file mode 100644 index 000000000..d44859fea --- /dev/null +++ b/deploy/k8s/archived/helm/apigwws/templates/_names.tpl @@ -0,0 +1,52 @@ +{{- define "suffix-name" -}} +{{- if .Values.app.name -}} +{{- .Values.app.name -}} +{{- else -}} +{{- .Release.Name -}} +{{- end -}} +{{- end -}} + +{{- define "sql-name" -}} +{{- if .Values.inf.sql.host -}} +{{- .Values.inf.sql.host -}} +{{- else -}} +{{- printf "%s" "sql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "nosql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "url-of" -}} +{{- $name := first .}} +{{- $ctx := last .}} +{{- if eq $name "" -}} +{{- $ctx.Values.inf.k8s.dns -}} +{{- else -}} +{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} +{{- end -}} +{{- end -}} + + + +{{- define "pathBase" -}} +{{- if .Values.inf.k8s.suffix -}} +{{- $suffix := include "suffix-name" . -}} +{{- printf "%s-%s" .Values.pathBase $suffix -}} +{{- else -}} +{{- .Values.pathBase -}} +{{- end -}} +{{- end -}} + +{{- define "fqdn-image" -}} +{{- if .Values.inf.registry -}} +{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} +{{- else -}} +{{- .Values.image.repository -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/apigwws/templates/deployment.yaml b/deploy/k8s/archived/helm/apigwws/templates/deployment.yaml new file mode 100644 index 000000000..3aedde6dd --- /dev/null +++ b/deploy/k8s/archived/helm/apigwws/templates/deployment.yaml @@ -0,0 +1,109 @@ +{{- $name := include "apigwws.fullname" . -}} +{{- $cfgname := printf "%s-%s" "cfg" $name -}} +{{- $envoycfgname := printf "%s-%s" "envoy" $name -}} +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "apigwws.fullname" . }} + labels: + app: {{ template "apigwws.name" . }} + chart: {{ template "apigwws.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "apigwws.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "apigwws.name" . }} + release: {{ .Release.Name }} + {{ if .Values.inf.mesh.enabled -}} + annotations: + linkerd.io/inject: enabled + {{- end }} + spec: + {{ if .Values.inf.registry -}} + imagePullSecrets: + - name: {{ .Values.inf.registry.secretName }} + {{- end }} + volumes: + - name: config + configMap: + name: {{ $envoycfgname }} + items: + - key: envoy.yaml + path: envoy.yaml + containers: + - name: {{ .Chart.Name }} + {{ if .Values.probes -}} + {{- if .Values.probes.liveness -}} + livenessProbe: + httpGet: + port: {{ .Values.probes.liveness.port }} + path: {{ .Values.probes.liveness.path }} + initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.liveness.periodSeconds }} + {{- end -}} + {{- end -}} + {{- if .Values.probes -}} + {{- if .Values.probes.readiness }} + readinessProbe: + httpGet: + port: {{ .Values.probes.readiness.port }} + path: {{ .Values.probes.readiness.path }} + initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.readiness.periodSeconds }} + timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} + {{- end -}} + {{- end }} + image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + volumeMounts: + - name: config + mountPath: {{ .Values.envoy.configPath }} + env: + - name: PATH_BASE + value: {{ include "pathBase" . }} + - name: k8sname + value: {{ .Values.clusterName }} + {{- if .Values.env.values -}} + {{- range .Values.env.values }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end -}} + {{- end -}} + {{- if .Values.env.configmap -}} + {{- range .Values.env.configmap }} + - name: {{ .name }} + valueFrom: + configMapKeyRef: + name: {{ $cfgname }} + key: {{ .key }} + {{- end -}} + {{- end }} + ports: + - name: http + containerPort: 80 + protocol: TCP + - name: admin + containerPort: 8001 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + diff --git a/deploy/k8s/archived/helm/apigwws/templates/envoy-cm.yaml b/deploy/k8s/archived/helm/apigwws/templates/envoy-cm.yaml new file mode 100644 index 000000000..6d41bd2e2 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwws/templates/envoy-cm.yaml @@ -0,0 +1,14 @@ +{{- $name := include "apigwws.fullname" . -}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: "envoy-{{ $name }}" + labels: + app: {{ template "apigwws.name" . }} + chart: {{ template "apigwws.chart" .}} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + {{ (.Files.Glob "envoy.yaml").AsConfig | indent 2 }} + diff --git a/deploy/k8s/archived/helm/apigwws/templates/ingress.yaml b/deploy/k8s/archived/helm/apigwws/templates/ingress.yaml new file mode 100644 index 000000000..945038081 --- /dev/null +++ b/deploy/k8s/archived/helm/apigwws/templates/ingress.yaml @@ -0,0 +1,46 @@ +{{- if .Values.ingress.enabled -}} +{{- $ingressPath := include "pathBase" . -}} +{{- $serviceName := .Values.app.svc.webshoppingapigw -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ template "apigwws.fullname" . }} + labels: + app: {{ template "apigwws.name" . }} + chart: {{ template "apigwws.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.ingress.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +{{- if and .Values.inf.tls.enabled .Values.inf.tls.issuer }} + cert-manager.io/issuer: {{ .Values.inf.tls.issuer }} +{{- end }} +{{- if .Values.inf.mesh.enabled }} +{{- with .Values.ingress.mesh.annotations }} +{{ toYaml . | indent 4 }} +{{- end }} +{{- end }} +spec: +{{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} +{{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ . }} + http: + paths: + - path: {{ $ingressPath }} + backend: + serviceName: {{ $serviceName }} + servicePort: http + {{- end }} +{{- end }} diff --git a/deploy/k8s/archived/helm/apigwws/templates/service.yaml b/deploy/k8s/archived/helm/apigwws/templates/service.yaml new file mode 100644 index 000000000..55f6daf3f --- /dev/null +++ b/deploy/k8s/archived/helm/apigwws/templates/service.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.app.svc.webshoppingapigw }} + labels: + app: {{ template "apigwws.name" . }} + chart: {{ template "apigwws.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + - port: {{ .Values.service.adminPort }} + targetPort: admin + protocol: TCP + name: admin + selector: + app: {{ template "apigwws.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/apigwws/values.yaml b/deploy/k8s/archived/helm/apigwws/values.yaml new file mode 100644 index 000000000..fb1182dac --- /dev/null +++ b/deploy/k8s/archived/helm/apigwws/values.yaml @@ -0,0 +1,46 @@ +replicaCount: 1 +clusterName: eshop-aks +pathBase: /webshoppingapigw + +image: + repository: envoyproxy/envoy + tag: v1.11.1 + +service: + type: ClusterIP + port: 80 + adminPort: 8001 + +ingress: + enabled: true + annotations: + nginx.ingress.kubernetes.io/rewrite-target: "/" + ingress.kubernetes.io/rewrite-target: "/" + tls: [] + +resources: {} + + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +# env defines the environment variables that will be declared in the pod +env: {} + +envoy: + configPath: /etc/envoy + +probes: + liveness: + path: /ready + initialDelaySeconds: 5 + periodSeconds: 15 + port: 8001 + readiness: + path: /ready + initialDelaySeconds: 5 + periodSeconds: 60 + port: 8001 \ No newline at end of file diff --git a/deploy/k8s/archived/helm/app.yaml b/deploy/k8s/archived/helm/app.yaml new file mode 100644 index 000000000..e83ea2823 --- /dev/null +++ b/deploy/k8s/archived/helm/app.yaml @@ -0,0 +1,46 @@ +# This helm values file defines app-based settings +# Charts use those values, so this file **MUST** be included in all chart releases + +app: # app global settings + name: "my-eshop" # Override for custom app name + ingress: # ingress related settings + entries: + basket: basket-api # ingress entry for basket api + catalog: catalog-api # ingress entry for catalog api + ordering: ordering-api # ingress entry for ordering api + identity: identity # ingress entry for identity api + mvc: webmvc # ingress entry for web mvc + spa: "" # ingress entry for web spa + status: webstatus # ingress entry for web status + webshoppingapigw: webshoppingapigw # ingress entry for web shopping Agw + webmarketingapigw: webmarketingapigw # ingress entry for web mkg Agw + mobilemarketingapigw: mobilemarketingapigw # ingress entry for mobile mkg Agw + mobileshoppingapigw: mobileshoppingapigw # ingress entry for mobile shopping Agw + webshoppingagg: webshoppingagg # ingress entry for web shopping aggregator + mobileshoppingagg: mobileshoppingagg # ingress entry for mobile shopping aggregator + payment: payment-api # ingress entry for payment api + locations: locations-api # ingress entry for locations api + marketing: marketing-api # ingress entry for marketing api + webhooks: webhooks-api # ingress entry for webhooks api + webhooksweb: webhooks-web # ingress entry for webhooks web demo client + svc: + basket: basket-api # service name for basket api + catalog: catalog-api # service name for catalog api + ordering: ordering-api # service name for ordering api + orderingbackgroundtasks: ordering-backgroundtasks # service name for orderingbackgroundtasks + orderingsignalrhub: ordering-signalrhub # service name for orderingsignalrhub + identity: identity-api # service name for identity api + mvc: webmvc # service name for web mvc + spa: webspa # service name for web spa + status: webstatus # service name for web status + webshoppingapigw: webshoppingapigw # service name for web shopping Agw + webmarketingapigw: webmarketingapigw # service name for web mkg Agw + mobilemarketingapigw: mobilemarketingapigw # service name for mobile mkg Agw + mobileshoppingapigw: mobileshoppingapigw # service name for mobile shopping Agw + webshoppingagg: webshoppingagg # service name for web shopping aggregator + mobileshoppingagg: mobileshoppingagg # service name for mobile shopping aggregator + payment: payment-api # service name for payment api + locations: locations-api # service name for locations api + marketing: marketing-api # service name for marketing ap + webhooks: webhooks-api # service name for webhooks api + webhooksweb: webhooks-client # service name for webhooks web diff --git a/deploy/k8s/archived/helm/basket-api/.helmignore b/deploy/k8s/archived/helm/basket-api/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/basket-api/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/basket-api/Chart.yaml b/deploy/k8s/archived/helm/basket-api/Chart.yaml new file mode 100644 index 000000000..fd3e01486 --- /dev/null +++ b/deploy/k8s/archived/helm/basket-api/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: basket-api +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/basket-api/templates/NOTES.txt b/deploy/k8s/archived/helm/basket-api/templates/NOTES.txt new file mode 100644 index 000000000..8ba2c89ee --- /dev/null +++ b/deploy/k8s/archived/helm/basket-api/templates/NOTES.txt @@ -0,0 +1,8 @@ +eShop Basket API installed. +-------------------------- + +This API is not directly exposed outside cluster. If need to access it use: + +export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "basket-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") +echo "Visit http://127.0.0.1:8080 to use your application" +kubectl port-forward $POD_NAME 8080:80 \ No newline at end of file diff --git a/deploy/k8s/archived/helm/basket-api/templates/_helpers.tpl b/deploy/k8s/archived/helm/basket-api/templates/_helpers.tpl new file mode 100644 index 000000000..550eb2e6c --- /dev/null +++ b/deploy/k8s/archived/helm/basket-api/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "basket-api.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "basket-api.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "basket-api.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/basket-api/templates/_names.tpl b/deploy/k8s/archived/helm/basket-api/templates/_names.tpl new file mode 100644 index 000000000..d44859fea --- /dev/null +++ b/deploy/k8s/archived/helm/basket-api/templates/_names.tpl @@ -0,0 +1,52 @@ +{{- define "suffix-name" -}} +{{- if .Values.app.name -}} +{{- .Values.app.name -}} +{{- else -}} +{{- .Release.Name -}} +{{- end -}} +{{- end -}} + +{{- define "sql-name" -}} +{{- if .Values.inf.sql.host -}} +{{- .Values.inf.sql.host -}} +{{- else -}} +{{- printf "%s" "sql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "nosql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "url-of" -}} +{{- $name := first .}} +{{- $ctx := last .}} +{{- if eq $name "" -}} +{{- $ctx.Values.inf.k8s.dns -}} +{{- else -}} +{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} +{{- end -}} +{{- end -}} + + + +{{- define "pathBase" -}} +{{- if .Values.inf.k8s.suffix -}} +{{- $suffix := include "suffix-name" . -}} +{{- printf "%s-%s" .Values.pathBase $suffix -}} +{{- else -}} +{{- .Values.pathBase -}} +{{- end -}} +{{- end -}} + +{{- define "fqdn-image" -}} +{{- if .Values.inf.registry -}} +{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} +{{- else -}} +{{- .Values.image.repository -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/basket-api/templates/configmap.yaml b/deploy/k8s/archived/helm/basket-api/templates/configmap.yaml new file mode 100644 index 000000000..2de0e28c7 --- /dev/null +++ b/deploy/k8s/archived/helm/basket-api/templates/configmap.yaml @@ -0,0 +1,18 @@ +{{- $name := include "basket-api.fullname" . -}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: "cfg-{{ $name }}" + labels: + app: {{ template "basket-api.name" . }} + chart: {{ template "basket-api.chart" .}} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + basket__ConnectionString: {{ .Values.inf.redis.basket.constr }} + urls__IdentityUrl: http://{{ .Values.app.svc.identity }} + basket__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" + all__EventBusConnection: {{ .Values.inf.eventbus.constr }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" + all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" \ No newline at end of file diff --git a/deploy/k8s/archived/helm/basket-api/templates/deployment.yaml b/deploy/k8s/archived/helm/basket-api/templates/deployment.yaml new file mode 100644 index 000000000..dc90666f5 --- /dev/null +++ b/deploy/k8s/archived/helm/basket-api/templates/deployment.yaml @@ -0,0 +1,99 @@ +{{- $name := include "basket-api.fullname" . -}} +{{- $cfgname := printf "%s-%s" "cfg" $name -}} +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "basket-api.fullname" . }} + labels: + ufo: {{ $cfgname}} + app: {{ template "basket-api.name" . }} + chart: {{ template "basket-api.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "basket-api.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "basket-api.name" . }} + release: {{ .Release.Name }} + {{ if .Values.inf.mesh.enabled -}} + annotations: + linkerd.io/inject: enabled + {{- end }} + spec: + {{ if .Values.inf.registry -}} + imagePullSecrets: + - name: {{ .Values.inf.registry.secretName }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + {{ if .Values.probes -}} + {{- if .Values.probes.liveness -}} + livenessProbe: + httpGet: + port: {{ .Values.probes.liveness.port }} + path: {{ .Values.probes.liveness.path }} + initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.liveness.periodSeconds }} + {{- end -}} + {{- end -}} + {{- if .Values.probes -}} + {{- if .Values.probes.readiness }} + readinessProbe: + httpGet: + port: {{ .Values.probes.readiness.port }} + path: {{ .Values.probes.readiness.path }} + initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.readiness.periodSeconds }} + timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} + {{- end -}} + {{- end }} + image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: PATH_BASE + value: {{ include "pathBase" . }} + - name: k8sname + value: {{ .Values.clusterName }} + {{- if .Values.env.values -}} + {{- range .Values.env.values }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end -}} + {{- end -}} + {{- if .Values.env.configmap -}} + {{- range .Values.env.configmap }} + - name: {{ .name }} + valueFrom: + configMapKeyRef: + name: {{ $cfgname }} + key: {{ .key }} + {{- end -}} + {{- end }} + ports: + - name: http + containerPort: 80 + protocol: TCP + - name: grpc + containerPort: 81 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + diff --git a/deploy/k8s/archived/helm/basket-api/templates/service.yaml b/deploy/k8s/archived/helm/basket-api/templates/service.yaml new file mode 100644 index 000000000..1783c59aa --- /dev/null +++ b/deploy/k8s/archived/helm/basket-api/templates/service.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.app.svc.basket }} + labels: + app: {{ template "basket-api.name" . }} + chart: {{ template "basket-api.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + - port: {{ .Values.service.grpcPort }} + targetPort: grpc + protocol: TCP + name: grpc + selector: + app: {{ template "basket-api.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/basket-api/values.yaml b/deploy/k8s/archived/helm/basket-api/values.yaml new file mode 100644 index 000000000..121de02de --- /dev/null +++ b/deploy/k8s/archived/helm/basket-api/values.yaml @@ -0,0 +1,63 @@ +replicaCount: 1 +clusterName: eshop-aks +pathBase: /basket-api + +image: + repository: eshop/basket.api + tag: latest + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 80 + grpcPort: 81 + +resources: {} + + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +# env defines the environment variables that will be declared in the pod +env: + urls: + # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). + configmap: + - name: ConnectionString + key: basket__ConnectionString + - name: EventBusConnection + key: all__EventBusConnection + - name: ApplicationInsights__InstrumentationKey + key: all__InstrumentationKey + - name: AzureServiceBusEnabled + key: all__UseAzureServiceBus + - name: IdentityUrl + key: urls__IdentityUrl + - name: UseLoadTest + key: basket__EnableLoadTest + # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) + values: + - name: OrchestratorType + value: 'K8S' + - name: PORT + value: "80" + - name: GRPC_PORT + value: "81" +probes: + liveness: + path: /liveness + initialDelaySeconds: 10 + periodSeconds: 15 + port: 80 + readiness: + path: /hc + timeoutSeconds: 5 + initialDelaySeconds: 90 + periodSeconds: 60 + port: 80 + +ingress: + enabled: false \ No newline at end of file diff --git a/deploy/k8s/archived/helm/basket-data/.helmignore b/deploy/k8s/archived/helm/basket-data/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/basket-data/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/basket-data/Chart.yaml b/deploy/k8s/archived/helm/basket-data/Chart.yaml new file mode 100644 index 000000000..67ceddee1 --- /dev/null +++ b/deploy/k8s/archived/helm/basket-data/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: basket-data +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/basket-data/templates/NOTES.txt b/deploy/k8s/archived/helm/basket-data/templates/NOTES.txt new file mode 100644 index 000000000..c10513333 --- /dev/null +++ b/deploy/k8s/archived/helm/basket-data/templates/NOTES.txt @@ -0,0 +1,8 @@ +eShop Redis for keystore data installed +---------------------------------------- + +Redis is not directly exposed outside cluster. If need to access it from outside use: + +export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "basket-data.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") +echo "Visit http://127.0.0.1:8080 to use your application" +kubectl port-forward $POD_NAME 8080:80 \ No newline at end of file diff --git a/deploy/k8s/archived/helm/basket-data/templates/_helpers.tpl b/deploy/k8s/archived/helm/basket-data/templates/_helpers.tpl new file mode 100644 index 000000000..74b51b089 --- /dev/null +++ b/deploy/k8s/archived/helm/basket-data/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "basket-data.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "basket-data.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "basket-data.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/basket-data/templates/deployment.yaml b/deploy/k8s/archived/helm/basket-data/templates/deployment.yaml new file mode 100644 index 000000000..8ccceceeb --- /dev/null +++ b/deploy/k8s/archived/helm/basket-data/templates/deployment.yaml @@ -0,0 +1,43 @@ +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "basket-data.fullname" . }} + labels: + app: {{ template "basket-data.name" . }} + chart: {{ template "basket-data.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "basket-data.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "basket-data.name" . }} + release: {{ .Release.Name }} + spec: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: 6379 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} diff --git a/deploy/k8s/archived/helm/basket-data/templates/service.yaml b/deploy/k8s/archived/helm/basket-data/templates/service.yaml new file mode 100644 index 000000000..98b8cc3bd --- /dev/null +++ b/deploy/k8s/archived/helm/basket-data/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.inf.redis.basket.svc }} + labels: + app: {{ template "basket-data.name" . }} + chart: {{ template "basket-data.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + app: {{ template "basket-data.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/basket-data/values.yaml b/deploy/k8s/archived/helm/basket-data/values.yaml new file mode 100644 index 000000000..17cc75ee7 --- /dev/null +++ b/deploy/k8s/archived/helm/basket-data/values.yaml @@ -0,0 +1,19 @@ +replicaCount: 1 + +image: + repository: redis + tag: 4.0.10 + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 6379 + + +resources: {} + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/deploy/k8s/archived/helm/catalog-api/.helmignore b/deploy/k8s/archived/helm/catalog-api/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/catalog-api/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/catalog-api/Chart.yaml b/deploy/k8s/archived/helm/catalog-api/Chart.yaml new file mode 100644 index 000000000..a143a0afe --- /dev/null +++ b/deploy/k8s/archived/helm/catalog-api/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: catalog-api +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/catalog-api/templates/NOTES.txt b/deploy/k8s/archived/helm/catalog-api/templates/NOTES.txt new file mode 100644 index 000000000..1f01a2b92 --- /dev/null +++ b/deploy/k8s/archived/helm/catalog-api/templates/NOTES.txt @@ -0,0 +1,9 @@ +eShop Catalog API installed. +---------------------------- + +This API is not directly exposed outside cluster. If need to access it use: + +export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "catalog-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") +echo "Visit http://127.0.0.1:8080 to use your application" +kubectl port-forward $POD_NAME 8080:80 + diff --git a/deploy/k8s/archived/helm/catalog-api/templates/_helpers.tpl b/deploy/k8s/archived/helm/catalog-api/templates/_helpers.tpl new file mode 100644 index 000000000..6fd128e77 --- /dev/null +++ b/deploy/k8s/archived/helm/catalog-api/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "catalog-api.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "catalog-api.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "catalog-api.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/catalog-api/templates/_names.tpl b/deploy/k8s/archived/helm/catalog-api/templates/_names.tpl new file mode 100644 index 000000000..605e92e7e --- /dev/null +++ b/deploy/k8s/archived/helm/catalog-api/templates/_names.tpl @@ -0,0 +1,60 @@ +{{- define "suffix-name" -}} +{{- if .Values.app.name -}} +{{- .Values.app.name -}} +{{- else -}} +{{- .Release.Name -}} +{{- end -}} +{{- end -}} + +{{- define "sql-name" -}} +{{- if .Values.inf.sql.host -}} +{{- .Values.inf.sql.host -}} +{{- else -}} +{{- printf "%s" "sql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "nosql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "url-of" -}} +{{- $name := first .}} +{{- $ctx := last .}} +{{- if eq $name "" -}} +{{- $ctx.Values.inf.k8s.dns -}} +{{- else -}} +{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} +{{- end -}} +{{- end -}} + + + +{{- define "pathBase" -}} +{{- if .Values.inf.k8s.suffix -}} +{{- $suffix := include "suffix-name" . -}} +{{- printf "%s-%s" .Values.pathBase $suffix -}} +{{- else -}} +{{- .Values.pathBase -}} +{{- end -}} +{{- end -}} + +{{- define "fqdn-image" -}} +{{- if .Values.inf.registry -}} +{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} +{{- else -}} +{{- .Values.image.repository -}} +{{- end -}} +{{- end -}} + +{{- define "protocol" -}} +{{- if .Values.inf.tls.enabled -}} +{{- printf "%s" "https" -}} +{{- else -}} +{{- printf "%s" "http" -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/catalog-api/templates/configmap.yaml b/deploy/k8s/archived/helm/catalog-api/templates/configmap.yaml new file mode 100644 index 000000000..292b9e9b9 --- /dev/null +++ b/deploy/k8s/archived/helm/catalog-api/templates/configmap.yaml @@ -0,0 +1,21 @@ +{{- $name := include "catalog-api.fullname" . -}} +{{- $sqlsrv := include "sql-name" . -}} +{{- $webshoppingapigw := include "url-of" (list .Values.app.ingress.entries.webshoppingapigw .) -}} +{{- $protocol := include "protocol" . -}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: "cfg-{{ $name }}" + labels: + app: {{ template "catalog-api.name" . }} + chart: {{ template "catalog-api.chart" .}} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + catalog__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.catalog.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }}; + catalog__PicBaseUrl: {{ $protocol }}://{{ $webshoppingapigw }}/c/api/v1/catalog/items/[0]/pic/ + catalog__AzureStorageEnabled: "{{ .Values.inf.misc.useAzureStorage }}" + all__EventBusConnection: {{ .Values.inf.eventbus.constr }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" + all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" \ No newline at end of file diff --git a/deploy/k8s/archived/helm/catalog-api/templates/deployment.yaml b/deploy/k8s/archived/helm/catalog-api/templates/deployment.yaml new file mode 100644 index 000000000..33a0ad5b4 --- /dev/null +++ b/deploy/k8s/archived/helm/catalog-api/templates/deployment.yaml @@ -0,0 +1,99 @@ +{{- $name := include "catalog-api.fullname" . -}} +{{- $cfgname := printf "%s-%s" "cfg" $name -}} +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "catalog-api.fullname" . }} + labels: + ufo: {{ $cfgname}} + app: {{ template "catalog-api.name" . }} + chart: {{ template "catalog-api.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "catalog-api.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "catalog-api.name" . }} + release: {{ .Release.Name }} + {{ if .Values.inf.mesh.enabled -}} + annotations: + linkerd.io/inject: enabled + {{- end }} + spec: + {{ if .Values.inf.registry -}} + imagePullSecrets: + - name: {{ .Values.inf.registry.secretName }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + {{ if .Values.probes -}} + {{- if .Values.probes.liveness -}} + livenessProbe: + httpGet: + port: {{ .Values.probes.liveness.port }} + path: {{ .Values.probes.liveness.path }} + initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.liveness.periodSeconds }} + {{- end -}} + {{- end -}} + {{- if .Values.probes -}} + {{- if .Values.probes.readiness }} + readinessProbe: + httpGet: + port: {{ .Values.probes.readiness.port }} + path: {{ .Values.probes.readiness.path }} + initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.readiness.periodSeconds }} + timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} + {{- end -}} + {{- end }} + image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: PATH_BASE + value: {{ include "pathBase" . }} + - name: k8sname + value: {{ .Values.clusterName }} + {{- if .Values.env.values -}} + {{- range .Values.env.values }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end -}} + {{- end -}} + {{- if .Values.env.configmap -}} + {{- range .Values.env.configmap }} + - name: {{ .name }} + valueFrom: + configMapKeyRef: + name: {{ $cfgname }} + key: {{ .key }} + {{- end -}} + {{- end }} + ports: + - name: http + containerPort: 80 + protocol: TCP + - name: grpc + containerPort: 81 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + diff --git a/deploy/k8s/archived/helm/catalog-api/templates/service.yaml b/deploy/k8s/archived/helm/catalog-api/templates/service.yaml new file mode 100644 index 000000000..f634a7088 --- /dev/null +++ b/deploy/k8s/archived/helm/catalog-api/templates/service.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.app.svc.catalog }} + labels: + app: {{ template "catalog-api.name" . }} + chart: {{ template "catalog-api.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + - port: {{ .Values.service.grpcPort }} + targetPort: grpc + protocol: TCP + name: grpc + selector: + app: {{ template "catalog-api.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/catalog-api/values.yaml b/deploy/k8s/archived/helm/catalog-api/values.yaml new file mode 100644 index 000000000..0de49b7f6 --- /dev/null +++ b/deploy/k8s/archived/helm/catalog-api/values.yaml @@ -0,0 +1,63 @@ +replicaCount: 1 +clusterName: eshop-aks +pathBase: /catalog-api + +image: + repository: eshop/catalog.api + tag: latest + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 80 + grpcPort: 81 + +resources: {} + + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +# env defines the environment variables that will be declared in the pod +env: + urls: + # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). + configmap: + - name: ConnectionString + key: catalog__ConnectionString + - name: PicBaseUrl + key: catalog__PicBaseUrl + - name: AzureStorageEnabled + key: catalog__AzureStorageEnabled + - name: ApplicationInsights__InstrumentationKey + key: all__InstrumentationKey + - name: EventBusConnection + key: all__EventBusConnection + - name: AzureServiceBusEnabled + key: all__UseAzureServiceBus + # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) + values: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: OrchestratorType + value: 'K8S' + - name: PORT + value: "80" + - name: GRPC_PORT + value: "81" +probes: + liveness: + path: /liveness + initialDelaySeconds: 10 + periodSeconds: 15 + port: 80 + readiness: + path: /hc + timeoutSeconds: 5 + initialDelaySeconds: 90 + periodSeconds: 60 + port: 80 + diff --git a/deploy/k8s/archived/helm/deploy-all.ps1 b/deploy/k8s/archived/helm/deploy-all.ps1 new file mode 100644 index 000000000..1711c0c2c --- /dev/null +++ b/deploy/k8s/archived/helm/deploy-all.ps1 @@ -0,0 +1,149 @@ +Param( + [parameter(Mandatory=$false)][string]$registry, + [parameter(Mandatory=$false)][string]$dockerUser, + [parameter(Mandatory=$false)][string]$dockerPassword, + [parameter(Mandatory=$false)][string]$externalDns, + [parameter(Mandatory=$false)][string]$appName="eshop", + [parameter(Mandatory=$false)][bool]$deployInfrastructure=$true, + [parameter(Mandatory=$false)][bool]$deployCharts=$true, + [parameter(Mandatory=$false)][bool]$clean=$true, + [parameter(Mandatory=$false)][string]$aksName="", + [parameter(Mandatory=$false)][string]$aksRg="", + [parameter(Mandatory=$false)][string]$imageTag="latest", + [parameter(Mandatory=$false)][bool]$useLocalk8s=$false, + [parameter(Mandatory=$false)][bool]$useMesh=$false, + [parameter(Mandatory=$false)][string][ValidateSet('Always','IfNotPresent','Never', IgnoreCase=$false)]$imagePullPolicy="Always", + [parameter(Mandatory=$false)][string][ValidateSet('prod','staging','none','custom', IgnoreCase=$false)]$sslSupport = "none", + [parameter(Mandatory=$false)][string]$tlsSecretName = "eshop-tls-custom", + [parameter(Mandatory=$false)][string]$chartsToDeploy="*", + [parameter(Mandatory=$false)][string]$ingressMeshAnnotationsFile="ingress_values_linkerd.yaml" + ) + +function Install-Chart { + Param([string]$chart,[string]$initialOptions, [bool]$customRegistry) + $options=$initialOptions + if ($sslEnabled) { + $options = "$options --set ingress.tls[0].secretName=$tlsSecretName --set ingress.tls[0].hosts={$dns}" + if ($sslSupport -ne "custom") { + $options = "$options --set inf.tls.issuer=$sslIssuer" + } + } + if ($customRegistry) { + $options = "$options --set inf.registry.server=$registry --set inf.registry.login=$dockerUser --set inf.registry.pwd=$dockerPassword --set inf.registry.secretName=eshop-docker-scret" + } + + if ($chart -ne "eshop-common" -or $customRegistry) { # eshop-common is ignored when no secret must be deployed + $command = "install $options --name=$appName-$chart $chart" + Write-Host "Helm Command: helm $command" -ForegroundColor Gray + Invoke-Expression 'cmd /c "helm $command"' + } +} + +$dns = $externalDns +$sslEnabled=$false +$sslIssuer="" + +if ($sslSupport -eq "staging") { + $sslEnabled=$true + $tlsSecretName="eshop-letsencrypt-staging" + $sslIssuer="letsencrypt-staging" +} +elseif ($sslSupport -eq "prod") { + $sslEnabled=$true + $tlsSecretName="eshop-letsencrypt-prod" + $sslIssuer="letsencrypt-prod" +} +elseif ($sslSupport -eq "custom") { + $sslEnabled=$true +} + +$ingressValuesFile="ingress_values.yaml" + +if ($useLocalk8s -eq $true) { + $ingressValuesFile="ingress_values_dockerk8s.yaml" + $dns="localhost" +} + +if ($externalDns -eq "aks") { + if ([string]::IsNullOrEmpty($aksName) -or [string]::IsNullOrEmpty($aksRg)) { + Write-Host "Error: When using -dns aks, MUST set -aksName and -aksRg too." -ForegroundColor Red + exit 1 + } + Write-Host "Getting DNS of AKS of AKS $aksName (in resource group $aksRg)..." -ForegroundColor Green + $dns = $(az aks show -n $aksName -g $aksRg --query addonProfiles.httpApplicationRouting.config.HTTPApplicationRoutingZoneName) + if ([string]::IsNullOrEmpty($dns)) { + Write-Host "Error getting DNS of AKS $aksName (in resource group $aksRg). Please ensure AKS has httpRouting enabled AND Azure CLI is logged & in version 2.0.37 or higher" -ForegroundColor Red + exit 1 + } + $dns = $dns -replace '[\"]' + Write-Host "DNS base found is $dns. Will use $appName.$dns for the app!" -ForegroundColor Green + $dns = "$appName.$dns" +} + +# Initialization & check commands +if ([string]::IsNullOrEmpty($dns)) { + Write-Host "No DNS specified. Ingress resources will be bound to public ip" -ForegroundColor Yellow + if ($sslEnabled) { + Write-Host "Can't bound SSL to public IP. DNS is mandatory when using TLS" -ForegroundColor Red + exit 1 + } +} + +if ($useLocalk8s -and $sslEnabled) { + Write-Host "SSL can'be enabled on local K8s." -ForegroundColor Red + exit 1 +} + +if ($clean) { + Write-Host "Cleaning previous helm releases..." -ForegroundColor Green + helm delete --purge $(helm ls -q eshop) + Write-Host "Previous releases deleted" -ForegroundColor Green +} + +$useCustomRegistry=$false + +if (-not [string]::IsNullOrEmpty($registry)) { + $useCustomRegistry=$true + if ([string]::IsNullOrEmpty($dockerUser) -or [string]::IsNullOrEmpty($dockerPassword)) { + Write-Host "Error: Must use -dockerUser AND -dockerPassword if specifying custom registry" -ForegroundColor Red + exit 1 + } +} + +Write-Host "Begin eShopOnContainers installation using Helm" -ForegroundColor Green + +$infras = ("sql-data", "nosql-data", "rabbitmq", "keystore-data", "basket-data") +$charts = ("eshop-common", "basket-api","catalog-api", "identity-api", "locations-api", "marketing-api", "mobileshoppingagg","ordering-api","ordering-backgroundtasks","ordering-signalrhub", "payment-api", "webmvc", "webshoppingagg", "webspa", "webstatus", "webhooks-api", "webhooks-web") +$gateways = ("apigwmm", "apigwms", "apigwwm", "apigwws") + +if ($deployInfrastructure) { + foreach ($infra in $infras) { + Write-Host "Installing infrastructure: $infra" -ForegroundColor Green + helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set "ingress.hosts={$dns}" --name="$appName-$infra" $infra + } +} +else { + Write-Host "eShopOnContainers infrastructure (bbdd, redis, ...) charts aren't installed (-deployCharts is false)" -ForegroundColor Yellow +} + +if ($deployCharts) { + foreach ($chart in $charts) { + if ($chartsToDeploy -eq "*" -or $chartsToDeploy.Contains($chart)) { + Write-Host "Installing: $chart" -ForegroundColor Green + Install-Chart $chart "-f app.yaml --values inf.yaml -f $ingressValuesFile -f $ingressMeshAnnotationsFile --set app.name=$appName --set inf.k8s.dns=$dns --set ingress.hosts={$dns} --set image.tag=$imageTag --set image.pullPolicy=$imagePullPolicy --set inf.tls.enabled=$sslEnabled --set inf.mesh.enabled=$useMesh --set inf.k8s.local=$useLocalk8s" $useCustomRegistry + } + } + + foreach ($chart in $gateways) { + if ($chartsToDeploy -eq "*" -or $chartsToDeploy.Contains($chart)) { + Write-Host "Installing Api Gateway Chart: $chart" -ForegroundColor Green + Install-Chart $chart "-f app.yaml -f inf.yaml -f $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set image.pullPolicy=$imagePullPolicy --set inf.mesh.enabled=$useMesh --set ingress.hosts={$dns} --set inf.tls.enabled=$sslEnabled" $false + + } + } +} +else { + Write-Host "eShopOnContainers non-infrastructure charts aren't installed (-deployCharts is false)" -ForegroundColor Yellow +} + +Write-Host "helm charts installed." -ForegroundColor Green diff --git a/deploy/k8s/archived/helm/deploy-all.sh b/deploy/k8s/archived/helm/deploy-all.sh new file mode 100644 index 000000000..6f6d868aa --- /dev/null +++ b/deploy/k8s/archived/helm/deploy-all.sh @@ -0,0 +1,232 @@ +#!/usr/bin/env bash + +# http://redsymbol.net/articles/unofficial-bash-strict-mode +set -euo pipefail + +usage() +{ + cat < + The name of the AKS cluster. Required when the registry (using the -r parameter) is set to "aks". + --aks-rg + The resource group for the AKS cluster. Required when the registry (using the -r parameter) is set to "aks". + -b | --build-solution + Force a solution build before deployment (default: false). + -d | --dns | --dns aks + Specifies the external DNS/ IP address of the Kubernetes cluster. + If 'aks' is set as value, the DNS value is retrieved from the AKS. --aks-name and --aks-rg are needed. + When --use-local-k8s is specified the external DNS is automatically set to localhost. + -h | --help + Displays this help text and exits the script. + --image-build + Build images (default is to not build all images). + --image-push + Upload images to the container registry (default is not pushing to the custom registry) + -n | --app-name + Specifies the name of the application (default: eshop). + --namespace + Specifies the namespace name to deploy the app. If it doesn't exists it will be created (default: eshop). + -p | --docker-password + The Docker password used to logon to the custom registry, supplied using the -r parameter. + -r | --registry + Specifies the container registry to use (required), e.g. myregistry.azurecr.io. + --skip-clean + Do not clean the Kubernetes cluster (default is to clean the cluster). + --skip-infrastructure + Do not deploy infrastructure resources (like sql-data, no-sql or redis). + This is useful for production environments where infrastructure is hosted outside the Kubernetes cluster. + -t | --tag + The tag used for the newly created docker images. Default: latest. + -u | --docker-username + The Docker username used to logon to the custom registry, supplied using the -r parameter. + --use-local-k8s + Deploy to a locally installed Kubernetes (default: false). + +It is assumed that the Kubernetes cluster has been granted access to the container registry. +If using AKS and ACR see link for more info: +https://docs.microsoft.com/en-us/azure/container-registry/container-registry-auth-aks + +WARNING! THE SCRIPT WILL COMPLETELY DESTROY ALL DEPLOYMENTS AND SERVICES VISIBLE +FROM THE CURRENT CONFIGURATION CONTEXT AND NAMESPACE. +It is recommended that you check your selected namespace, 'eshop' by default, is already in use. +Every deployment and service done in the namespace will be deleted. +For more information see https://kubernetes.io/docs/tasks/administer-cluster/namespaces/ + +END +} + +app_name='eshop' +aks_name='' +aks_rg='' +build_images='' +clean='yes' +build_solution='' +container_registry='' +docker_password='' +docker_username='' +dns='' +image_tag='latest' +push_images='' +skip_infrastructure='' +use_local_k8s='' +namespace='eshop' + +while [[ $# -gt 0 ]]; do + case "$1" in + --aks-name ) + aks_name="$2"; shift 2;; + --aks-rg ) + aks_rg="$2"; shift 2;; + -b | --build-solution ) + build_solution='yes'; shift ;; + -d | --dns ) + dns="$2"; shift 2;; + -h | --help ) + usage; exit 1 ;; + -n | --app-name ) + app_name="$2"; shift 2;; + -p | --docker-password ) + docker_password="$2"; shift 2;; + -r | --registry ) + container_registry="$2"; shift 2;; + --skip-clean ) + clean=''; shift ;; + --image-build ) + build_images='yes'; shift ;; + --image-push ) + push_images='yes'; shift ;; + --skip-infrastructure ) + skip_infrastructure='yes'; shift ;; + -t | --tag ) + image_tag="$2"; shift 2;; + -u | --docker-username ) + docker_username="$2"; shift 2;; + --use-local-k8s ) + use_local_k8s='yes'; shift ;; + --namespace ) + namespace="$2"; shift 2;; + *) + echo "Unknown option $1" + usage; exit 2 ;; + esac +done + +if [[ $build_solution ]]; then + echo "#################### Building $app_name solution ####################" + dotnet publish -o obj/Docker/publish ../../eShopOnContainers-ServicesAndWebApps.sln +fi + +export TAG=$image_tag + +if [[ $build_images ]]; then + echo "#################### Building the $app_name Docker images ####################" + docker-compose -p ../.. -f ../../docker-compose.yml build + + # Remove temporary images + docker rmi $(docker images -qf "dangling=true") +fi + +use_custom_registry='' + +if [[ -n $container_registry ]]; then + echo "################ Log into custom registry $container_registry ##################" + use_custom_registry='yes' + if [[ -z $docker_username ]] || [[ -z $docker_password ]]; then + echo "Error: Must use -u (--docker-username) AND -p (--docker-password) if specifying custom registry" + exit 1 + fi + docker login -u $docker_username -p $docker_password $container_registry +fi + +if [[ $push_images ]]; then + echo "#################### Pushing images to the container registry ####################" + services=(basket.api catalog.api identity.api ordering.api marketing.api payment.api locations.api webmvc webspa webstatus) + + if [[ -z "$(docker image ls -q --filter=reference=eshop/$service:$image_tag)" ]]; then + image_tag=linux-$image_tag + fi + + for service in "${services[@]}" + do + echo "Pushing image for service $service..." + docker tag "eshop/$service:$image_tag" "$container_registry/$service:$image_tag" + docker push "$container_registry/$service:$image_tag" + done +fi + +ingress_values_file="ingress_values.yaml" + +if [[ $use_local_k8s ]]; then + ingress_values_file="ingress_values_dockerk8s.yaml" + dns="localhost" +fi + +if [[ $dns == "aks" ]]; then + echo "#################### Begin AKS discovery based on the --dns aks setting. ####################" + if [[ -z $aks_name ]] || [[ -z $aks_rg ]]; then + echo "Error: When using -dns aks, MUST set -aksName and -aksRg too." + echo '' + usage + exit 1 + fi + + echo "Getting AKS cluster $aks_name AKS (in resource group $aks_rg)" + # JMESPath queries are case sensitive and httpapplicationrouting can be lowercase sometimes + jmespath_dnsqueries=(\ + addonProfiles.httpApplicationRouting.config.HTTPApplicationRoutingZoneName \ + addonProfiles.httpapplicationrouting.config.HTTPApplicationRoutingZoneName \ + ) + for q in "${jmespath_dnsqueries[@]}" + do + dns="$(az aks show -n $aks_name -g $aks_rg --query $q -o tsv)" + if [[ -n $dns ]]; then break; fi + done + if [[ -z $dns ]]; then + echo "Error: when getting DNS of AKS $aks_name (in resource group $aks_rg). Please ensure AKS has httpRouting enabled AND Azure CLI is logged in and is of version 2.0.37 or higher." + exit 1 + fi + echo "DNS base found is $dns. Will use $aks_name.$dns for the app!" + dns="$aks_name.$dns" +fi + +# Initialization & check commands +if [[ -z $dns ]]; then + echo "No DNS specified. Ingress resources will be bound to public IP." +fi + +if [[ $clean ]]; then + echo "Cleaning previous helm releases..." + if [[ -z $(helm ls -q --namespace $namespace) ]]; then + echo "No previous releases found" + else + helm delete --purge $(helm ls -q --namespace $namespace) + echo "Previous releases deleted" + waitsecs=10; while [ $waitsecs -gt 0 ]; do echo -ne "$waitsecs\033[0K\r"; sleep 1; : $((waitsecs--)); done + fi +fi + +echo "#################### Begin $app_name installation using Helm ####################" +infras=(sql-data nosql-data rabbitmq keystore-data basket-data) +charts=(eshop-common apigwmm apigwms apigwwm apigwws basket-api catalog-api identity-api locations-api marketing-api mobileshoppingagg ordering-api ordering-backgroundtasks ordering-signalrhub payment-api webmvc webshoppingagg webspa webstatus webhooks-api webhooks-web) + +if [[ !$skip_infrastructure ]]; then + for infra in "${infras[@]}" + do + echo "Installing infrastructure: $infra" + helm install --namespace $namespace --set "ingress.hosts={$dns}" --values app.yaml --values inf.yaml --values $ingress_values_file --set app.name=$app_name --set inf.k8s.dns=$dns --name="$app_name-$infra" $infra + done +fi + +for chart in "${charts[@]}" +do + echo "Installing: $chart" + if [[ $use_custom_registry ]]; then + helm install --namespace $namespace --set "ingress.hosts={$dns}" --set inf.registry.server=$container_registry --set inf.registry.login=$docker_username --set inf.registry.pwd=$docker_password --set inf.registry.secretName=eshop-docker-scret --values app.yaml --values inf.yaml --values $ingress_values_file --set app.name=$app_name --set inf.k8s.dns=$dns --set image.tag=$image_tag --set image.pullPolicy=Always --name="$app_name-$chart" $chart + elif [[ $chart != "eshop-common" ]]; then # eshop-common is ignored when no secret must be deployed + helm install --namespace $namespace --set "ingress.hosts={$dns}" --values app.yaml --values inf.yaml --values $ingress_values_file --set app.name=$app_name --set inf.k8s.dns=$dns --set image.tag=$image_tag --set image.pullPolicy=Always --name="$app_name-$chart" $chart + fi +done + +echo "FINISHED: Helm charts installed." diff --git a/deploy/k8s/archived/helm/eshop-common/.helmignore b/deploy/k8s/archived/helm/eshop-common/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/eshop-common/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/eshop-common/Chart.yaml b/deploy/k8s/archived/helm/eshop-common/Chart.yaml new file mode 100644 index 000000000..cd5e7b2fe --- /dev/null +++ b/deploy/k8s/archived/helm/eshop-common/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: eshop-common +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/eshop-common/templates/NOTES.txt b/deploy/k8s/archived/helm/eshop-common/templates/NOTES.txt new file mode 100644 index 000000000..1cc59f58a --- /dev/null +++ b/deploy/k8s/archived/helm/eshop-common/templates/NOTES.txt @@ -0,0 +1,7 @@ +Common eShop resources installed: + +{{- if .Values.inf.registry -}} +* Docker registry secret ({{ .Values.inf.registry.secretName }}) +{{- end -}} + ++++ Done +++ \ No newline at end of file diff --git a/deploy/k8s/archived/helm/eshop-common/templates/_helpers.tpl b/deploy/k8s/archived/helm/eshop-common/templates/_helpers.tpl new file mode 100644 index 000000000..4a3c6324b --- /dev/null +++ b/deploy/k8s/archived/helm/eshop-common/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "eshop-common.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "eshop-common.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "eshop-common.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/eshop-common/templates/_names.tpl b/deploy/k8s/archived/helm/eshop-common/templates/_names.tpl new file mode 100644 index 000000000..7cdfb80d6 --- /dev/null +++ b/deploy/k8s/archived/helm/eshop-common/templates/_names.tpl @@ -0,0 +1,3 @@ +{{- define "imagePullSecret" }} +{{- printf "{\"auths\": {\"%s\": {\"auth\": \"%s\"}}}" .Values.inf.registry.server (printf "%s:%s" .Values.inf.registry.login .Values.inf.registry.pwd | b64enc) | b64enc }} +{{- end }} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/eshop-common/templates/secret.yaml b/deploy/k8s/archived/helm/eshop-common/templates/secret.yaml new file mode 100644 index 000000000..285ec85e7 --- /dev/null +++ b/deploy/k8s/archived/helm/eshop-common/templates/secret.yaml @@ -0,0 +1,9 @@ +{{- if .Values.inf.registry -}} +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Values.inf.registry.secretName }} +type: kubernetes.io/dockerconfigjson +data: + .dockerconfigjson: {{ template "imagePullSecret" . }} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/eshop-common/values.yaml b/deploy/k8s/archived/helm/eshop-common/values.yaml new file mode 100644 index 000000000..e69de29bb diff --git a/deploy/k8s/archived/helm/identity-api/.helmignore b/deploy/k8s/archived/helm/identity-api/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/identity-api/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/identity-api/Chart.yaml b/deploy/k8s/archived/helm/identity-api/Chart.yaml new file mode 100644 index 000000000..7b9290ada --- /dev/null +++ b/deploy/k8s/archived/helm/identity-api/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: identity-api +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/identity-api/templates/NOTES.txt b/deploy/k8s/archived/helm/identity-api/templates/NOTES.txt new file mode 100644 index 000000000..48fbbe9b4 --- /dev/null +++ b/deploy/k8s/archived/helm/identity-api/templates/NOTES.txt @@ -0,0 +1,4 @@ +eShop Identity API installed. +----------------------------- + +Access this API through ingress. \ No newline at end of file diff --git a/deploy/k8s/archived/helm/identity-api/templates/_helpers.tpl b/deploy/k8s/archived/helm/identity-api/templates/_helpers.tpl new file mode 100644 index 000000000..fb47187b4 --- /dev/null +++ b/deploy/k8s/archived/helm/identity-api/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "identity-api.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "identity-api.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "identity-api.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/identity-api/templates/_names.tpl b/deploy/k8s/archived/helm/identity-api/templates/_names.tpl new file mode 100644 index 000000000..39ee485ef --- /dev/null +++ b/deploy/k8s/archived/helm/identity-api/templates/_names.tpl @@ -0,0 +1,51 @@ +{{- define "suffix-name" -}} +{{- if .Values.app.name -}} +{{- .Values.app.name -}} +{{- else -}} +{{- .Release.Name -}} +{{- end -}} +{{- end -}} + +{{- define "sql-name" -}} +{{- if .Values.inf.sql.host -}} +{{- .Values.inf.sql.host -}} +{{- else -}} +{{- printf "%s" "sql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "nosql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "url-of" -}} +{{- $name := first .}} +{{- $ctx := last .}} +{{- if eq $name "" -}} +{{- $ctx.Values.inf.k8s.dns -}} +{{- else -}} +{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} +{{- end -}} +{{- end -}} + + +{{- define "pathBase" -}} +{{- if .Values.inf.k8s.suffix -}} +{{- $suffix := include "suffix-name" . -}} +{{- printf "%s-%s" .Values.pathBase $suffix -}} +{{- else -}} +{{- .Values.pathBase -}} +{{- end -}} +{{- end -}} + +{{- define "fqdn-image" -}} +{{- if .Values.inf.registry -}} +{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} +{{- else -}} +{{- .Values.image.repository -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/identity-api/templates/configmap.yaml b/deploy/k8s/archived/helm/identity-api/templates/configmap.yaml new file mode 100644 index 000000000..264ceb745 --- /dev/null +++ b/deploy/k8s/archived/helm/identity-api/templates/configmap.yaml @@ -0,0 +1,39 @@ +{{- $name := include "identity-api.fullname" . -}} +{{- $sqlsrv := include "sql-name" . -}} +{{- $mvc_url := include "url-of" (list .Values.app.ingress.entries.mvc .) -}} +{{- $spa_url := include "url-of" (list .Values.app.ingress.entries.spa .) -}} +{{- $locations_url := include "url-of" (list .Values.app.ingress.entries.locations .) -}} +{{- $marketing_url := include "url-of" (list .Values.app.ingress.entries.marketing .) -}} +{{- $basket_url := include "url-of" (list .Values.app.ingress.entries.basket .) -}} +{{- $ordering_url := include "url-of" (list .Values.app.ingress.entries.ordering .) -}} +{{- $mobileshoppingagg := include "url-of" (list .Values.app.ingress.entries.mobileshoppingagg .) -}} +{{- $webhoppingagg := include "url-of" (list .Values.app.ingress.entries.webshoppingagg .) -}} +{{- $xamarincallback := include "url-of" (list "xamarincallback" .) -}} +{{- $webhooks_url := include "url-of" (list .Values.app.ingress.entries.webhooks .) -}} +{{- $webhooksweb_url := include "url-of" (list .Values.app.ingress.entries.webhooksweb .) -}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: "cfg-{{ $name }}" + labels: + app: {{ template "identity-api.name" . }} + chart: {{ template "identity-api.chart" .}} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + identity__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.identity.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }}; + identity__keystore: {{ .Values.inf.redis.keystore.constr }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" + mvc_e: http://{{ $mvc_url }} + spa_e: http://{{ $spa_url }} + locations_e: http://{{ $locations_url }} + marketing_e: http://{{ $marketing_url }} + basket_e: http://{{ $basket_url }} + ordering_e: http://{{ $ordering_url }} + mobileshoppingagg_e: http://{{ $mobileshoppingagg }} + webshoppingagg_e: http://{{ $webhoppingagg }} + xamarin_callback_e: http://{{ $xamarincallback }} + webhooksapi_e: http://{{ $webhooks_url }} + webhooksweb_e: http://{{ $webhooksweb_url }} + enableDevspaces: "{{ .Values.enableDevspaces }}" \ No newline at end of file diff --git a/deploy/k8s/archived/helm/identity-api/templates/deployment.yaml b/deploy/k8s/archived/helm/identity-api/templates/deployment.yaml new file mode 100644 index 000000000..c6ad69067 --- /dev/null +++ b/deploy/k8s/archived/helm/identity-api/templates/deployment.yaml @@ -0,0 +1,96 @@ +{{- $name := include "identity-api.fullname" . -}} +{{- $cfgname := printf "%s-%s" "cfg" $name -}} +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "identity-api.fullname" . }} + labels: + ufo: {{ $cfgname}} + app: {{ template "identity-api.name" . }} + chart: {{ template "identity-api.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "identity-api.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "identity-api.name" . }} + release: {{ .Release.Name }} + {{ if .Values.inf.mesh.enabled -}} + annotations: + linkerd.io/inject: enabled + {{- end }} + spec: + {{ if .Values.inf.registry -}} + imagePullSecrets: + - name: {{ .Values.inf.registry.secretName }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + {{ if .Values.probes -}} + {{- if .Values.probes.liveness -}} + livenessProbe: + httpGet: + port: {{ .Values.probes.liveness.port }} + path: {{ .Values.probes.liveness.path }} + initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.liveness.periodSeconds }} + {{- end -}} + {{- end -}} + {{- if .Values.probes -}} + {{- if .Values.probes.readiness }} + readinessProbe: + httpGet: + port: {{ .Values.probes.readiness.port }} + path: {{ .Values.probes.readiness.path }} + initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.readiness.periodSeconds }} + timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} + {{- end -}} + {{- end }} + image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: PATH_BASE + value: {{ include "pathBase" . }} + - name: k8sname + value: {{ .Values.clusterName }} + {{- if .Values.env.values -}} + {{- range .Values.env.values }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end -}} + {{- end -}} + {{- if .Values.env.configmap -}} + {{- range .Values.env.configmap }} + - name: {{ .name }} + valueFrom: + configMapKeyRef: + name: {{ $cfgname }} + key: {{ .key }} + {{- end -}} + {{- end }} + ports: + - name: http + containerPort: 80 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + diff --git a/deploy/k8s/archived/helm/identity-api/templates/ingress-dockerk8s.yaml b/deploy/k8s/archived/helm/identity-api/templates/ingress-dockerk8s.yaml new file mode 100644 index 000000000..b6a8980f2 --- /dev/null +++ b/deploy/k8s/archived/helm/identity-api/templates/ingress-dockerk8s.yaml @@ -0,0 +1,33 @@ +{{- if .Values.ingress.enabled -}} +{{- if .Values.inf.k8s.local -}} +{{- $ingressPath := include "pathBase" . -}} +{{- $serviceName := .Values.app.svc.identity }} +{{- $name := include "identity-api.fullname" . -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ $name }}-local + labels: + app: {{ template "identity-api.name" . }} + chart: {{ template "identity-api.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.ingress.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +{{- if .Values.inf.mesh.enabled }} +{{- with .Values.ingress.mesh.annotations }} +{{ toYaml . | indent 4 }} +{{- end }} +{{- end }} +spec: + rules: + - http: + paths: + - backend: + serviceName: {{ $serviceName }} + servicePort: http + path: {{ $ingressPath }} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/identity-api/templates/ingress.yaml b/deploy/k8s/archived/helm/identity-api/templates/ingress.yaml new file mode 100644 index 000000000..751636926 --- /dev/null +++ b/deploy/k8s/archived/helm/identity-api/templates/ingress.yaml @@ -0,0 +1,46 @@ +{{- if .Values.ingress.enabled -}} +{{- $ingressPath := include "pathBase" . -}} +{{- $serviceName := .Values.app.svc.identity }} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ template "identity-api.fullname" . }} + labels: + app: {{ template "identity-api.name" . }} + chart: {{ template "identity-api.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.ingress.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +{{- if and .Values.inf.tls.enabled .Values.inf.tls.issuer }} + cert-manager.io/issuer: {{ .Values.inf.tls.issuer }} +{{- end }} +{{- if .Values.inf.mesh.enabled }} +{{- with .Values.ingress.mesh.annotations }} +{{ toYaml . | indent 4 }} +{{- end }} +{{- end }} +spec: +{{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} +{{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ . }} + http: + paths: + - path: {{ $ingressPath }} + backend: + serviceName: {{ $serviceName }} + servicePort: http + {{- end }} +{{- end }} diff --git a/deploy/k8s/archived/helm/identity-api/templates/service.yaml b/deploy/k8s/archived/helm/identity-api/templates/service.yaml new file mode 100644 index 000000000..bca200389 --- /dev/null +++ b/deploy/k8s/archived/helm/identity-api/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.app.svc.identity }} + labels: + app: {{ template "identity-api.name" . }} + chart: {{ template "identity-api.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + app: {{ template "identity-api.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/identity-api/values.yaml b/deploy/k8s/archived/helm/identity-api/values.yaml new file mode 100644 index 000000000..7b57dfde1 --- /dev/null +++ b/deploy/k8s/archived/helm/identity-api/values.yaml @@ -0,0 +1,84 @@ +replicaCount: 1 +clusterName: eshop-aks +pathBase: /identity + +image: + repository: eshop/identity.api + tag: latest + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: true + annotations: {} + hosts: + - chart-example.local + tls: [] + +resources: {} + + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +env: + urls: + configmap: + - name: ConnectionString + key: identity__ConnectionString + - name: DPConnectionString + key: identity__keystore + - name: ApplicationInsights__InstrumentationKey + key: all__InstrumentationKey + - name: MvcClient + key: mvc_e + - name: SpaClient + key: spa_e + - name: LocationApiClient + key: locations_e + - name: MarketingApiClient + key: marketing_e + - name: BasketApiClient + key: basket_e + - name: OrderingApiClient + key: ordering_e + - name: MobileShoppingAggClient + key: mobileshoppingagg_e + - name: WebShoppingAggClient + key: webshoppingagg_e + - name: XamarinCallback + key: xamarin_callback_e + - name: WebhooksApiClient + key: webhooksapi_e + - name: WebhooksWebClient + key: webhooksweb_e + - name: EnableDevspaces + key: enableDevspaces + values: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: OrchestratorType + value: 'K8S' + - name: IsClusterEnv + value: 'True' + +probes: + liveness: + path: /liveness + initialDelaySeconds: 10 + periodSeconds: 15 + port: 80 + readiness: + path: /hc + timeoutSeconds: 5 + initialDelaySeconds: 90 + periodSeconds: 60 + port: 80 + +enableDevspaces: "false" \ No newline at end of file diff --git a/deploy/k8s/archived/helm/inf.yaml b/deploy/k8s/archived/helm/inf.yaml new file mode 100644 index 000000000..938be3d45 --- /dev/null +++ b/deploy/k8s/archived/helm/inf.yaml @@ -0,0 +1,56 @@ +# This helm values file defines all infrastructure used by eShopOnContainers. +# It is used on all charts, so ** MUST BE INCLUDED ** on every deployment + +inf: + mesh: + enabled: false # True to enable Linkerd (set by deploy-all.ps1) + tls: + enabled: false # True to enable TLS (set by deploy-all.ps1) + issuer: "" # cert-manager issuer to use for retrieving certs (set by deploy-all.ps1) + sql: # inf.sql defines the sql server databases & logins +# host: my-sql-server # Uncomment to specify a custom sql-server to be used. By default "sql-data-" will be used + common: + user: sa # SQL user + pwd: Pass@word # SQL pwd + pid: Developer + catalog: # inf.sql.catalog: settings for the catalog-api sql (user, pwd, db) + db: CatalogDb # Catalog API SQL db name + ordering: # inf.sql.ordering: settings for the ordering-api sql (user, pwd, db) + db: OrderingDb # Ordering API SQL db name + identity: + db: IdentityDb # Ordering API SQL db name + marketing: + db: MarketingDb # Marketing API SQL db name + webhooks: + db: WebhooksDb # Webhooks DB + mongo: +# host: my-nosql-data # Uncomment to use specify custom mongo host. By default nosql-data is used + locations: + database: LocationsDb + marketing: + database: MarketingDb + redis: # inf.redis defines the redis' connection strings + basket: + svc: basket-data # Name of k8s svc for basket redis + constr: basket-data # Connection string to Redis used by Basket API + keystore: + svc: keystore-data # Name of k8s svc for keystore-data redis + constr: keystore-data # Connection string to Redis used as a Keystore (by Identity API) + eventbus: + svc: rabbitmq # Name of k8s svc for rabbitmq + constr: rabbitmq # Event bus connection string + useAzure: false # true if use Azure Service Bus. False if RabbitMQ + appinsights: + key: "" # App insights to use + k8s: # inf.k8s defines Kubernetes cluster global config + dns: "" # k8s external DNS. This value or ip value MUST BE PROVIDED + local: false # True when deploying on "local K8s" provided by Docker Desktop. + misc: # inf.misc contains miscellaneous configuration related to infrastructure + useLoadTest: false # If running under loading test or not + useAzureStorage: false # If catalog api uses azure storage or not +# registry: # Uncomment "registry" to specify registry secret +# secretName: # secretName is the name of the secret inside k8s +# server: # Registry login server +# login: # User login +# pwd: # User pwd + diff --git a/deploy/k8s/archived/helm/ingress_values.yaml b/deploy/k8s/archived/helm/ingress_values.yaml new file mode 100644 index 000000000..5f4d653c0 --- /dev/null +++ b/deploy/k8s/archived/helm/ingress_values.yaml @@ -0,0 +1,8 @@ +# This file contains common ingress annotations when using AKS with Http Application Routing + +ingress: + annotations: + kubernetes.io/ingress.class: addon-http-application-routing + ingress.kubernetes.io/ssl-redirect: "false" + nginx.ingress.kubernetes.io/ssl-redirect: "false" + diff --git a/deploy/k8s/archived/helm/ingress_values_dockerk8s.yaml b/deploy/k8s/archived/helm/ingress_values_dockerk8s.yaml new file mode 100644 index 000000000..f69af8a5b --- /dev/null +++ b/deploy/k8s/archived/helm/ingress_values_dockerk8s.yaml @@ -0,0 +1,7 @@ +# This file contains common ingress annotations when using Kubernetes included in Docker Desktop + +ingress: + annotations: + kubernetes.io/ingress.class: "nginx" + ingress.kubernetes.io/ssl-redirect: "false" + nginx.ingress.kubernetes.io/ssl-redirect: "false" diff --git a/deploy/k8s/archived/helm/ingress_values_linkerd.yaml b/deploy/k8s/archived/helm/ingress_values_linkerd.yaml new file mode 100644 index 000000000..f85a3a57f --- /dev/null +++ b/deploy/k8s/archived/helm/ingress_values_linkerd.yaml @@ -0,0 +1,16 @@ +# This file contains extra annotations to make Linkerd work with ingress. +# ingress.mesh.annotations are inserted into ingress.annotations of the resource being generated, if mesh is deployed +# +# It is designed to work with NGINX ingress controller or the Http Application Routing +# +# Check https://linkerd.io/2/tasks/using-ingress/ for more info or other ingress controllers +# +# If using your custom file, use -ingressMeshAnnotationsFile parameter in deploy-all.ps1 + +ingress: + mesh: + annotations: + nginx.ingress.kubernetes.io/configuration-snippet: | + proxy_set_header l5d-dst-override $service_name.$namespace.svc.cluster.local:$service_port; + proxy_hide_header l5d-remote-ip; + proxy_hide_header l5d-server-id; \ No newline at end of file diff --git a/deploy/k8s/archived/helm/keystore-data/.helmignore b/deploy/k8s/archived/helm/keystore-data/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/keystore-data/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/keystore-data/Chart.yaml b/deploy/k8s/archived/helm/keystore-data/Chart.yaml new file mode 100644 index 000000000..0cfa515f9 --- /dev/null +++ b/deploy/k8s/archived/helm/keystore-data/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: keystore-data +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/keystore-data/templates/NOTES.txt b/deploy/k8s/archived/helm/keystore-data/templates/NOTES.txt new file mode 100644 index 000000000..bec3a1f0f --- /dev/null +++ b/deploy/k8s/archived/helm/keystore-data/templates/NOTES.txt @@ -0,0 +1,8 @@ +eShop Redis for keystore data installed +---------------------------------------- + +Redis is not directly exposed outside cluster. If need to access it from outside use: + +export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "keystore-data.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") +echo "Visit http://127.0.0.1:8080 to use your application" +kubectl port-forward $POD_NAME 8080:80 \ No newline at end of file diff --git a/deploy/k8s/archived/helm/keystore-data/templates/_helpers.tpl b/deploy/k8s/archived/helm/keystore-data/templates/_helpers.tpl new file mode 100644 index 000000000..18786752f --- /dev/null +++ b/deploy/k8s/archived/helm/keystore-data/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "keystore-data.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "keystore-data.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "keystore-data.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/keystore-data/templates/deployment.yaml b/deploy/k8s/archived/helm/keystore-data/templates/deployment.yaml new file mode 100644 index 000000000..34f1fe074 --- /dev/null +++ b/deploy/k8s/archived/helm/keystore-data/templates/deployment.yaml @@ -0,0 +1,43 @@ +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "keystore-data.fullname" . }} + labels: + app: {{ template "keystore-data.name" . }} + chart: {{ template "keystore-data.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "keystore-data.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "keystore-data.name" . }} + release: {{ .Release.Name }} + spec: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: 6379 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} diff --git a/deploy/k8s/archived/helm/keystore-data/templates/service.yaml b/deploy/k8s/archived/helm/keystore-data/templates/service.yaml new file mode 100644 index 000000000..38e9a4273 --- /dev/null +++ b/deploy/k8s/archived/helm/keystore-data/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.inf.redis.keystore.svc }} + labels: + app: {{ template "keystore-data.name" . }} + chart: {{ template "keystore-data.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + app: {{ template "keystore-data.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/keystore-data/values.yaml b/deploy/k8s/archived/helm/keystore-data/values.yaml new file mode 100644 index 000000000..17cc75ee7 --- /dev/null +++ b/deploy/k8s/archived/helm/keystore-data/values.yaml @@ -0,0 +1,19 @@ +replicaCount: 1 + +image: + repository: redis + tag: 4.0.10 + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 6379 + + +resources: {} + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/deploy/k8s/archived/helm/locations-api/.helmignore b/deploy/k8s/archived/helm/locations-api/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/locations-api/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/locations-api/Chart.yaml b/deploy/k8s/archived/helm/locations-api/Chart.yaml new file mode 100644 index 000000000..5126fe847 --- /dev/null +++ b/deploy/k8s/archived/helm/locations-api/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: locations-api +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/locations-api/templates/NOTES.txt b/deploy/k8s/archived/helm/locations-api/templates/NOTES.txt new file mode 100644 index 000000000..3b48889bf --- /dev/null +++ b/deploy/k8s/archived/helm/locations-api/templates/NOTES.txt @@ -0,0 +1,9 @@ +eShop Locations API installed. +------------------------------ + +This API is not directly exposed outside cluster. If need to access it use: + +export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "locations-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") +echo "Visit http://127.0.0.1:8080 to use your application" +kubectl port-forward $POD_NAME 8080:80 + diff --git a/deploy/k8s/archived/helm/locations-api/templates/_helpers.tpl b/deploy/k8s/archived/helm/locations-api/templates/_helpers.tpl new file mode 100644 index 000000000..086a461ba --- /dev/null +++ b/deploy/k8s/archived/helm/locations-api/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "locations-api.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "locations-api.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "locations-api.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/locations-api/templates/_names.tpl b/deploy/k8s/archived/helm/locations-api/templates/_names.tpl new file mode 100644 index 000000000..d44859fea --- /dev/null +++ b/deploy/k8s/archived/helm/locations-api/templates/_names.tpl @@ -0,0 +1,52 @@ +{{- define "suffix-name" -}} +{{- if .Values.app.name -}} +{{- .Values.app.name -}} +{{- else -}} +{{- .Release.Name -}} +{{- end -}} +{{- end -}} + +{{- define "sql-name" -}} +{{- if .Values.inf.sql.host -}} +{{- .Values.inf.sql.host -}} +{{- else -}} +{{- printf "%s" "sql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "nosql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "url-of" -}} +{{- $name := first .}} +{{- $ctx := last .}} +{{- if eq $name "" -}} +{{- $ctx.Values.inf.k8s.dns -}} +{{- else -}} +{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} +{{- end -}} +{{- end -}} + + + +{{- define "pathBase" -}} +{{- if .Values.inf.k8s.suffix -}} +{{- $suffix := include "suffix-name" . -}} +{{- printf "%s-%s" .Values.pathBase $suffix -}} +{{- else -}} +{{- .Values.pathBase -}} +{{- end -}} +{{- end -}} + +{{- define "fqdn-image" -}} +{{- if .Values.inf.registry -}} +{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} +{{- else -}} +{{- .Values.image.repository -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/locations-api/templates/configmap.yaml b/deploy/k8s/archived/helm/locations-api/templates/configmap.yaml new file mode 100644 index 000000000..c5d752509 --- /dev/null +++ b/deploy/k8s/archived/helm/locations-api/templates/configmap.yaml @@ -0,0 +1,22 @@ +{{- $name := include "locations-api.fullname" . -}} +{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} +{{- $mongo := include "mongo-name" . -}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: "cfg-{{ $name }}" + labels: + app: {{ template "locations-api.name" . }} + chart: {{ template "locations-api.chart" .}} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + all__EventBusConnection: {{ .Values.inf.eventbus.constr }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" + all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" + all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" + internalurls__IdentityUrl: http://{{ .Values.app.svc.identity }} + urls__IdentityUrl: {{ $identity }} + locations__ConnectionString: mongodb://{{ $mongo }} + locations__Database: {{ .Values.inf.mongo.locations.database }} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/locations-api/templates/deployment.yaml b/deploy/k8s/archived/helm/locations-api/templates/deployment.yaml new file mode 100644 index 000000000..9a5bb608c --- /dev/null +++ b/deploy/k8s/archived/helm/locations-api/templates/deployment.yaml @@ -0,0 +1,96 @@ +{{- $name := include "locations-api.fullname" . -}} +{{- $cfgname := printf "%s-%s" "cfg" $name -}} +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "locations-api.fullname" . }} + labels: + ufo: {{ $cfgname}} + app: {{ template "locations-api.name" . }} + chart: {{ template "locations-api.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "locations-api.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "locations-api.name" . }} + release: {{ .Release.Name }} + {{ if .Values.inf.mesh.enabled -}} + annotations: + linkerd.io/inject: enabled + {{- end }} + spec: + {{ if .Values.inf.registry -}} + imagePullSecrets: + - name: {{ .Values.inf.registry.secretName }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + {{ if .Values.probes -}} + {{- if .Values.probes.liveness -}} + livenessProbe: + httpGet: + port: {{ .Values.probes.liveness.port }} + path: {{ .Values.probes.liveness.path }} + initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.liveness.periodSeconds }} + {{- end -}} + {{- end -}} + {{- if .Values.probes -}} + {{- if .Values.probes.readiness }} + readinessProbe: + httpGet: + port: {{ .Values.probes.readiness.port }} + path: {{ .Values.probes.readiness.path }} + initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.readiness.periodSeconds }} + timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} + {{- end -}} + {{- end }} + image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: PATH_BASE + value: {{ include "pathBase" . }} + - name: k8sname + value: {{ .Values.clusterName }} + {{- if .Values.env.values -}} + {{- range .Values.env.values }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end -}} + {{- end -}} + {{- if .Values.env.configmap -}} + {{- range .Values.env.configmap }} + - name: {{ .name }} + valueFrom: + configMapKeyRef: + name: {{ $cfgname }} + key: {{ .key }} + {{- end -}} + {{- end }} + ports: + - name: http + containerPort: 80 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + diff --git a/deploy/k8s/archived/helm/locations-api/templates/service.yaml b/deploy/k8s/archived/helm/locations-api/templates/service.yaml new file mode 100644 index 000000000..abd628beb --- /dev/null +++ b/deploy/k8s/archived/helm/locations-api/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.app.svc.locations }} + labels: + app: {{ template "locations-api.name" . }} + chart: {{ template "locations-api.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + app: {{ template "locations-api.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/locations-api/values.yaml b/deploy/k8s/archived/helm/locations-api/values.yaml new file mode 100644 index 000000000..4718f2a0b --- /dev/null +++ b/deploy/k8s/archived/helm/locations-api/values.yaml @@ -0,0 +1,66 @@ +replicaCount: 1 +clusterName: eshop-aks +pathBase: /locations-api + +image: + repository: eshop/locations.api + tag: latest + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: false + annotations: {} + tls: [] + +resources: {} + + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +# env defines the environment variables that will be declared in the pod +env: + urls: + # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). + configmap: + - name: ApplicationInsights__InstrumentationKey + key: all__InstrumentationKey + - name: EventBusConnection + key: all__EventBusConnection + - name: AzureServiceBusEnabled + key: all__UseAzureServiceBus + - name: UseLoadTest + key: all_EnableLoadTest + - name: IdentityUrl + key: internalurls__IdentityUrl + - name: IdentityUrlExternal + key: urls__IdentityUrl + - name: ConnectionString + key: locations__ConnectionString + - name: Database + key: locations__Database + # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) + values: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: OrchestratorType + value: 'K8S' +probes: + liveness: + path: /liveness + initialDelaySeconds: 10 + periodSeconds: 15 + port: 80 + readiness: + path: /hc + timeoutSeconds: 5 + initialDelaySeconds: 90 + periodSeconds: 60 + port: 80 diff --git a/deploy/k8s/archived/helm/marketing-api/.helmignore b/deploy/k8s/archived/helm/marketing-api/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/marketing-api/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/marketing-api/Chart.yaml b/deploy/k8s/archived/helm/marketing-api/Chart.yaml new file mode 100644 index 000000000..173f94fd6 --- /dev/null +++ b/deploy/k8s/archived/helm/marketing-api/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: marketing-api +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/marketing-api/templates/NOTES.txt b/deploy/k8s/archived/helm/marketing-api/templates/NOTES.txt new file mode 100644 index 000000000..7fa66ed47 --- /dev/null +++ b/deploy/k8s/archived/helm/marketing-api/templates/NOTES.txt @@ -0,0 +1,9 @@ +eShop Marketing API installed. +------------------------------ + +This API is not directly exposed outside cluster. If need to access it use: + +export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "marketing-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") +echo "Visit http://127.0.0.1:8080 to use your application" +kubectl port-forward $POD_NAME 8080:80 + diff --git a/deploy/k8s/archived/helm/marketing-api/templates/_helpers.tpl b/deploy/k8s/archived/helm/marketing-api/templates/_helpers.tpl new file mode 100644 index 000000000..c252aeeac --- /dev/null +++ b/deploy/k8s/archived/helm/marketing-api/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "marketing-api.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "marketing-api.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "marketing-api.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/marketing-api/templates/_names.tpl b/deploy/k8s/archived/helm/marketing-api/templates/_names.tpl new file mode 100644 index 000000000..605e92e7e --- /dev/null +++ b/deploy/k8s/archived/helm/marketing-api/templates/_names.tpl @@ -0,0 +1,60 @@ +{{- define "suffix-name" -}} +{{- if .Values.app.name -}} +{{- .Values.app.name -}} +{{- else -}} +{{- .Release.Name -}} +{{- end -}} +{{- end -}} + +{{- define "sql-name" -}} +{{- if .Values.inf.sql.host -}} +{{- .Values.inf.sql.host -}} +{{- else -}} +{{- printf "%s" "sql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "nosql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "url-of" -}} +{{- $name := first .}} +{{- $ctx := last .}} +{{- if eq $name "" -}} +{{- $ctx.Values.inf.k8s.dns -}} +{{- else -}} +{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} +{{- end -}} +{{- end -}} + + + +{{- define "pathBase" -}} +{{- if .Values.inf.k8s.suffix -}} +{{- $suffix := include "suffix-name" . -}} +{{- printf "%s-%s" .Values.pathBase $suffix -}} +{{- else -}} +{{- .Values.pathBase -}} +{{- end -}} +{{- end -}} + +{{- define "fqdn-image" -}} +{{- if .Values.inf.registry -}} +{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} +{{- else -}} +{{- .Values.image.repository -}} +{{- end -}} +{{- end -}} + +{{- define "protocol" -}} +{{- if .Values.inf.tls.enabled -}} +{{- printf "%s" "https" -}} +{{- else -}} +{{- printf "%s" "http" -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/marketing-api/templates/configmap.yaml b/deploy/k8s/archived/helm/marketing-api/templates/configmap.yaml new file mode 100644 index 000000000..e6b495a7a --- /dev/null +++ b/deploy/k8s/archived/helm/marketing-api/templates/configmap.yaml @@ -0,0 +1,27 @@ +{{- $name := include "marketing-api.fullname" . -}} +{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} +{{- $webshoppingapigw := include "url-of" (list .Values.app.ingress.entries.webshoppingapigw .) -}} +{{- $mongo := include "mongo-name" . -}} +{{- $sqlsrv := include "sql-name" . -}} +{{- $protocol := include "protocol" . -}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: "cfg-{{ $name }}" + labels: + app: {{ template "marketing-api.name" . }} + chart: {{ template "marketing-api.chart" .}} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + all__EventBusConnection: {{ .Values.inf.eventbus.constr }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" + all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" + all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" + internalurls__IdentityUrl: http://{{ .Values.app.svc.identity }} + urls__IdentityUrl: {{ $protocol }}://{{ $identity }} + marketing__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.marketing.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }}; + marketing__MongoConnectionString: mongodb://{{ $mongo }} + marketing__MongoDatabase: {{ .Values.inf.mongo.marketing.database }} + marketing__PicBaseUrl: {{ $protocol }}://{{ $webshoppingapigw }}/c/api/v1/catalog/items/[0]/pic/ \ No newline at end of file diff --git a/deploy/k8s/archived/helm/marketing-api/templates/deployment.yaml b/deploy/k8s/archived/helm/marketing-api/templates/deployment.yaml new file mode 100644 index 000000000..60d4cd1a3 --- /dev/null +++ b/deploy/k8s/archived/helm/marketing-api/templates/deployment.yaml @@ -0,0 +1,96 @@ +{{- $name := include "marketing-api.fullname" . -}} +{{- $cfgname := printf "%s-%s" "cfg" $name -}} +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "marketing-api.fullname" . }} + labels: + ufo: {{ $cfgname}} + app: {{ template "marketing-api.name" . }} + chart: {{ template "marketing-api.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "marketing-api.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "marketing-api.name" . }} + release: {{ .Release.Name }} + {{ if .Values.inf.mesh.enabled -}} + annotations: + linkerd.io/inject: enabled + {{- end }} + spec: + {{ if .Values.inf.registry -}} + imagePullSecrets: + - name: {{ .Values.inf.registry.secretName }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + {{ if .Values.probes -}} + {{- if .Values.probes.liveness -}} + livenessProbe: + httpGet: + port: {{ .Values.probes.liveness.port }} + path: {{ .Values.probes.liveness.path }} + initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.liveness.periodSeconds }} + {{- end -}} + {{- end -}} + {{- if .Values.probes -}} + {{- if .Values.probes.readiness }} + readinessProbe: + httpGet: + port: {{ .Values.probes.readiness.port }} + path: {{ .Values.probes.readiness.path }} + initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.readiness.periodSeconds }} + timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} + {{- end -}} + {{- end }} + image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: PATH_BASE + value: {{ include "pathBase" . }} + - name: k8sname + value: {{ .Values.clusterName }} + {{- if .Values.env.values -}} + {{- range .Values.env.values }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end -}} + {{- end -}} + {{- if .Values.env.configmap -}} + {{- range .Values.env.configmap }} + - name: {{ .name }} + valueFrom: + configMapKeyRef: + name: {{ $cfgname }} + key: {{ .key }} + {{- end -}} + {{- end }} + ports: + - name: http + containerPort: 80 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + diff --git a/deploy/k8s/archived/helm/marketing-api/templates/service.yaml b/deploy/k8s/archived/helm/marketing-api/templates/service.yaml new file mode 100644 index 000000000..0e9bfbea2 --- /dev/null +++ b/deploy/k8s/archived/helm/marketing-api/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.app.svc.marketing }} + labels: + app: {{ template "marketing-api.name" . }} + chart: {{ template "marketing-api.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + app: {{ template "marketing-api.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/marketing-api/values.yaml b/deploy/k8s/archived/helm/marketing-api/values.yaml new file mode 100644 index 000000000..00bebf27f --- /dev/null +++ b/deploy/k8s/archived/helm/marketing-api/values.yaml @@ -0,0 +1,70 @@ +replicaCount: 1 +clusterName: eshop-aks +pathBase: /marketing-api + +image: + repository: eshop/marketing.api + tag: latest + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: false + annotations: {} + tls: [] + +resources: {} + + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +# env defines the environment variables that will be declared in the pod +env: + urls: + # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). + configmap: + - name: ApplicationInsights__InstrumentationKey + key: all__InstrumentationKey + - name: EventBusConnection + key: all__EventBusConnection + - name: AzureServiceBusEnabled + key: all__UseAzureServiceBus + - name: UseLoadTest + key: all_EnableLoadTest + - name: IdentityUrl + key: internalurls__IdentityUrl + - name: IdentityUrlExternal + key: urls__IdentityUrl + - name: ConnectionString + key: marketing__ConnectionString + - name: MongoConnectionString + key: marketing__MongoConnectionString + - name: MongoDatabase + key: marketing__MongoDatabase + - name: PicBaseUrl + key: marketing__PicBaseUrl + # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) + values: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: OrchestratorType + value: 'K8S' +probes: + liveness: + path: /liveness + initialDelaySeconds: 10 + periodSeconds: 15 + port: 80 + readiness: + path: /hc + timeoutSeconds: 5 + initialDelaySeconds: 90 + periodSeconds: 60 + port: 80 diff --git a/deploy/k8s/archived/helm/mobileshoppingagg/.helmignore b/deploy/k8s/archived/helm/mobileshoppingagg/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/mobileshoppingagg/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/mobileshoppingagg/Chart.yaml b/deploy/k8s/archived/helm/mobileshoppingagg/Chart.yaml new file mode 100644 index 000000000..957edd619 --- /dev/null +++ b/deploy/k8s/archived/helm/mobileshoppingagg/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: mobileshoppingagg +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/mobileshoppingagg/templates/NOTES.txt b/deploy/k8s/archived/helm/mobileshoppingagg/templates/NOTES.txt new file mode 100644 index 000000000..61971f717 --- /dev/null +++ b/deploy/k8s/archived/helm/mobileshoppingagg/templates/NOTES.txt @@ -0,0 +1,8 @@ +eShop Mobile Marketing Aggregator is installed +---------------------------------------------- + +This API is not directly exposed outside cluster. If need to access it use: + +export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "mobileshoppingagg.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") +echo "Visit http://127.0.0.1:8080 to use your application" +kubectl port-forward $POD_NAME 8080:80 diff --git a/deploy/k8s/archived/helm/mobileshoppingagg/templates/_helpers.tpl b/deploy/k8s/archived/helm/mobileshoppingagg/templates/_helpers.tpl new file mode 100644 index 000000000..b3aace0e7 --- /dev/null +++ b/deploy/k8s/archived/helm/mobileshoppingagg/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "mobileshoppingagg.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "mobileshoppingagg.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "mobileshoppingagg.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/mobileshoppingagg/templates/_names.tpl b/deploy/k8s/archived/helm/mobileshoppingagg/templates/_names.tpl new file mode 100644 index 000000000..d44859fea --- /dev/null +++ b/deploy/k8s/archived/helm/mobileshoppingagg/templates/_names.tpl @@ -0,0 +1,52 @@ +{{- define "suffix-name" -}} +{{- if .Values.app.name -}} +{{- .Values.app.name -}} +{{- else -}} +{{- .Release.Name -}} +{{- end -}} +{{- end -}} + +{{- define "sql-name" -}} +{{- if .Values.inf.sql.host -}} +{{- .Values.inf.sql.host -}} +{{- else -}} +{{- printf "%s" "sql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "nosql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "url-of" -}} +{{- $name := first .}} +{{- $ctx := last .}} +{{- if eq $name "" -}} +{{- $ctx.Values.inf.k8s.dns -}} +{{- else -}} +{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} +{{- end -}} +{{- end -}} + + + +{{- define "pathBase" -}} +{{- if .Values.inf.k8s.suffix -}} +{{- $suffix := include "suffix-name" . -}} +{{- printf "%s-%s" .Values.pathBase $suffix -}} +{{- else -}} +{{- .Values.pathBase -}} +{{- end -}} +{{- end -}} + +{{- define "fqdn-image" -}} +{{- if .Values.inf.registry -}} +{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} +{{- else -}} +{{- .Values.image.repository -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/mobileshoppingagg/templates/configmap.yaml b/deploy/k8s/archived/helm/mobileshoppingagg/templates/configmap.yaml new file mode 100644 index 000000000..1ca69509f --- /dev/null +++ b/deploy/k8s/archived/helm/mobileshoppingagg/templates/configmap.yaml @@ -0,0 +1,29 @@ +{{- $name := include "mobileshoppingagg.fullname" . -}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: "cfg-{{ $name }}" + labels: + app: {{ template "mobileshoppingagg.name" . }} + chart: {{ template "mobileshoppingagg.chart" .}} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" + all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" + mobileshoppingagg__keystore: {{ .Values.inf.redis.keystore.constr }} + internalurls__basket: http://{{ .Values.app.svc.basket }} + internalurls__catalog: http://{{ .Values.app.svc.catalog }} + internalurls__identity: http://{{ .Values.app.svc.identity }} + internalurls__ordering: http://{{ .Values.app.svc.ordering }} + internalurls__basket__hc: http://{{ .Values.app.svc.basket }}/hc + internalurls__catalog__hc: http://{{ .Values.app.svc.catalog }}/hc + internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc + internalurls__ordering__hc: http://{{ .Values.app.svc.ordering }}/hc + internalurls__marketing__hc: http://{{ .Values.app.svc.marketing }}/hc + internalurls__payment__hc: http://{{ .Values.app.svc.payment }}/hc + internalurls__location__hc: http://{{ .Values.app.svc.locations }}/hc + internalurls__grpcBasket: "http://{{ .Values.app.svc.basket }}:{{ .Values.service.grpcPort }}" + internalurls__grpcCatalog: "http://{{ .Values.app.svc.catalog }}:{{ .Values.service.grpcPort }}" + internalurls__grpcOrdering: "http://{{ .Values.app.svc.ordering }}:{{ .Values.service.grpcPort }}" diff --git a/deploy/k8s/archived/helm/mobileshoppingagg/templates/deployment.yaml b/deploy/k8s/archived/helm/mobileshoppingagg/templates/deployment.yaml new file mode 100644 index 000000000..41e1fa75c --- /dev/null +++ b/deploy/k8s/archived/helm/mobileshoppingagg/templates/deployment.yaml @@ -0,0 +1,96 @@ +{{- $name := include "mobileshoppingagg.fullname" . -}} +{{- $cfgname := printf "%s-%s" "cfg" $name -}} +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "mobileshoppingagg.fullname" . }} + labels: + ufo: {{ $cfgname}} + app: {{ template "mobileshoppingagg.name" . }} + chart: {{ template "mobileshoppingagg.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "mobileshoppingagg.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "mobileshoppingagg.name" . }} + release: {{ .Release.Name }} + {{ if .Values.inf.mesh.enabled -}} + annotations: + linkerd.io/inject: enabled + {{- end }} + spec: + {{ if .Values.inf.registry -}} + imagePullSecrets: + - name: {{ .Values.inf.registry.secretName }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + {{ if .Values.probes -}} + {{- if .Values.probes.liveness -}} + livenessProbe: + httpGet: + port: {{ .Values.probes.liveness.port }} + path: {{ .Values.probes.liveness.path }} + initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.liveness.periodSeconds }} + {{- end -}} + {{- end -}} + {{- if .Values.probes -}} + {{- if .Values.probes.readiness }} + readinessProbe: + httpGet: + port: {{ .Values.probes.readiness.port }} + path: {{ .Values.probes.readiness.path }} + initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.readiness.periodSeconds }} + timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} + {{- end -}} + {{- end }} + image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: PATH_BASE + value: {{ include "pathBase" . }} + - name: k8sname + value: {{ .Values.clusterName }} + {{- if .Values.env.values -}} + {{- range .Values.env.values }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end -}} + {{- end -}} + {{- if .Values.env.configmap -}} + {{- range .Values.env.configmap }} + - name: {{ .name }} + valueFrom: + configMapKeyRef: + name: {{ $cfgname }} + key: {{ .key }} + {{- end -}} + {{- end }} + ports: + - name: http + containerPort: 80 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + diff --git a/deploy/k8s/archived/helm/mobileshoppingagg/templates/service.yaml b/deploy/k8s/archived/helm/mobileshoppingagg/templates/service.yaml new file mode 100644 index 000000000..ef6726e88 --- /dev/null +++ b/deploy/k8s/archived/helm/mobileshoppingagg/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.app.svc.mobileshoppingagg }} + labels: + app: {{ template "mobileshoppingagg.name" . }} + chart: {{ template "mobileshoppingagg.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + app: {{ template "mobileshoppingagg.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/mobileshoppingagg/values.yaml b/deploy/k8s/archived/helm/mobileshoppingagg/values.yaml new file mode 100644 index 000000000..844a59441 --- /dev/null +++ b/deploy/k8s/archived/helm/mobileshoppingagg/values.yaml @@ -0,0 +1,85 @@ +replicaCount: 1 +clusterName: eshop-aks +pathBase: /mobileshoppingagg + +image: + repository: eshop/mobileshoppingagg + tag: latest + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 80 + grpcPort: 81 + +ingress: + enabled: false + annotations: {} + tls: [] + +resources: {} + + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +# env defines the environment variables that will be declared in the pod +env: + urls: + # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). + configmap: + - name: ApplicationInsights__InstrumentationKey + key: all__InstrumentationKey + - name: urls__basket + key: internalurls__basket + - name: urls__catalog + key: internalurls__catalog + - name: urls__orders + key: internalurls__ordering + - name: urls__identity + key: internalurls__identity + - name: CatalogUrlHC + key: internalurls__catalog__hc + - name: BasketUrlHC + key: internalurls__basket__hc + - name: IdentityUrlHC + key: internalurls__identity__hc + - name: OrderingUrlHC + key: internalurls__ordering__hc + - name: MarketingUrlHC + key: internalurls__marketing__hc + - name: PaymentUrlHC + key: internalurls__payment__hc + - name: LocationUrlHC + key: internalurls__location__hc + - name: urls__grpcBasket + key: internalurls__grpcBasket + - name: urls__grpcCatalog + key: internalurls__grpcCatalog + - name: urls__grpcOrdering + key: internalurls__grpcOrdering + # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) + values: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: OrchestratorType + value: 'K8S' + - name: IsClusterEnv + value: 'True' +probes: + liveness: + path: /liveness + initialDelaySeconds: 10 + periodSeconds: 15 + port: 80 + readiness: + path: /hc + timeoutSeconds: 5 + initialDelaySeconds: 90 + periodSeconds: 60 + port: 80 diff --git a/deploy/k8s/archived/helm/nosql-data/.helmignore b/deploy/k8s/archived/helm/nosql-data/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/nosql-data/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/nosql-data/Chart.yaml b/deploy/k8s/archived/helm/nosql-data/Chart.yaml new file mode 100644 index 000000000..848a11cbb --- /dev/null +++ b/deploy/k8s/archived/helm/nosql-data/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: nosql-data +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/nosql-data/templates/NOTES.txt b/deploy/k8s/archived/helm/nosql-data/templates/NOTES.txt new file mode 100644 index 000000000..116c3c4e0 --- /dev/null +++ b/deploy/k8s/archived/helm/nosql-data/templates/NOTES.txt @@ -0,0 +1,8 @@ +eShop MongoDb Installed +----------------------- + +MongoDb is not exposed outside the cluster. If need to access it from outside, use: + +export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "nosql-data.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") +echo "Visit http://127.0.0.1:8080 to use your application" +kubectl port-forward $POD_NAME 8080:80 \ No newline at end of file diff --git a/deploy/k8s/archived/helm/nosql-data/templates/_helpers.tpl b/deploy/k8s/archived/helm/nosql-data/templates/_helpers.tpl new file mode 100644 index 000000000..99be734f7 --- /dev/null +++ b/deploy/k8s/archived/helm/nosql-data/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "nosql-data.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "nosql-data.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "nosql-data.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/nosql-data/templates/_names.tpl b/deploy/k8s/archived/helm/nosql-data/templates/_names.tpl new file mode 100644 index 000000000..56fb974fc --- /dev/null +++ b/deploy/k8s/archived/helm/nosql-data/templates/_names.tpl @@ -0,0 +1,8 @@ + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "nosql-data" -}} +{{- end -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/nosql-data/templates/deployment.yaml b/deploy/k8s/archived/helm/nosql-data/templates/deployment.yaml new file mode 100644 index 000000000..9b1f32319 --- /dev/null +++ b/deploy/k8s/archived/helm/nosql-data/templates/deployment.yaml @@ -0,0 +1,43 @@ +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "nosql-data.fullname" . }} + labels: + app: {{ template "nosql-data.name" . }} + chart: {{ template "nosql-data.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "nosql-data.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "nosql-data.name" . }} + release: {{ .Release.Name }} + spec: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: 27017 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} diff --git a/deploy/k8s/archived/helm/nosql-data/templates/service.yaml b/deploy/k8s/archived/helm/nosql-data/templates/service.yaml new file mode 100644 index 000000000..478cadfea --- /dev/null +++ b/deploy/k8s/archived/helm/nosql-data/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "mongo-name" . }} + labels: + app: {{ template "nosql-data.name" . }} + chart: {{ template "nosql-data.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + app: {{ template "nosql-data.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/nosql-data/values.yaml b/deploy/k8s/archived/helm/nosql-data/values.yaml new file mode 100644 index 000000000..1a380e6b4 --- /dev/null +++ b/deploy/k8s/archived/helm/nosql-data/values.yaml @@ -0,0 +1,19 @@ +replicaCount: 1 + +image: + repository: mongo + tag: 3.6.5-jessie + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 27017 + + +resources: {} + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/deploy/k8s/archived/helm/ordering-api/.helmignore b/deploy/k8s/archived/helm/ordering-api/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-api/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/ordering-api/Chart.yaml b/deploy/k8s/archived/helm/ordering-api/Chart.yaml new file mode 100644 index 000000000..b65ca4b9a --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-api/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: ordering-api +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/ordering-api/templates/NOTES.txt b/deploy/k8s/archived/helm/ordering-api/templates/NOTES.txt new file mode 100644 index 000000000..43bfd2fdf --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-api/templates/NOTES.txt @@ -0,0 +1,8 @@ +eShop Ordering API installed. +----------------------------- + +This API is not directly exposed outside cluster. If need to access it use: + +export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "ordering-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") +echo "Visit http://127.0.0.1:8080 to use your application" +kubectl port-forward $POD_NAME 8080:80 diff --git a/deploy/k8s/archived/helm/ordering-api/templates/_helpers.tpl b/deploy/k8s/archived/helm/ordering-api/templates/_helpers.tpl new file mode 100644 index 000000000..978c08c64 --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-api/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "ordering-api.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "ordering-api.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "ordering-api.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/ordering-api/templates/_names.tpl b/deploy/k8s/archived/helm/ordering-api/templates/_names.tpl new file mode 100644 index 000000000..39ee485ef --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-api/templates/_names.tpl @@ -0,0 +1,51 @@ +{{- define "suffix-name" -}} +{{- if .Values.app.name -}} +{{- .Values.app.name -}} +{{- else -}} +{{- .Release.Name -}} +{{- end -}} +{{- end -}} + +{{- define "sql-name" -}} +{{- if .Values.inf.sql.host -}} +{{- .Values.inf.sql.host -}} +{{- else -}} +{{- printf "%s" "sql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "nosql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "url-of" -}} +{{- $name := first .}} +{{- $ctx := last .}} +{{- if eq $name "" -}} +{{- $ctx.Values.inf.k8s.dns -}} +{{- else -}} +{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} +{{- end -}} +{{- end -}} + + +{{- define "pathBase" -}} +{{- if .Values.inf.k8s.suffix -}} +{{- $suffix := include "suffix-name" . -}} +{{- printf "%s-%s" .Values.pathBase $suffix -}} +{{- else -}} +{{- .Values.pathBase -}} +{{- end -}} +{{- end -}} + +{{- define "fqdn-image" -}} +{{- if .Values.inf.registry -}} +{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} +{{- else -}} +{{- .Values.image.repository -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/ordering-api/templates/configmap.yaml b/deploy/k8s/archived/helm/ordering-api/templates/configmap.yaml new file mode 100644 index 000000000..e64a6c841 --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-api/templates/configmap.yaml @@ -0,0 +1,19 @@ +{{- $name := include "ordering-api.fullname" . -}} +{{- $sqlsrv := include "sql-name" . -}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: "cfg-{{ $name }}" + labels: + app: {{ template "ordering-api.name" . }} + chart: {{ template "ordering-api.chart" .}} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + ordering__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.ordering.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }}; + ordering__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" + urls__IdentityUrl: http://{{ .Values.app.svc.identity }} + all__EventBusConnection: {{ .Values.inf.eventbus.constr }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" + all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" \ No newline at end of file diff --git a/deploy/k8s/archived/helm/ordering-api/templates/deployment.yaml b/deploy/k8s/archived/helm/ordering-api/templates/deployment.yaml new file mode 100644 index 000000000..327040701 --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-api/templates/deployment.yaml @@ -0,0 +1,99 @@ +{{- $name := include "ordering-api.fullname" . -}} +{{- $cfgname := printf "%s-%s" "cfg" $name -}} +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "ordering-api.fullname" . }} + labels: + ufo: {{ $cfgname}} + app: {{ template "ordering-api.name" . }} + chart: {{ template "ordering-api.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "ordering-api.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "ordering-api.name" . }} + release: {{ .Release.Name }} + {{ if .Values.inf.mesh.enabled -}} + annotations: + linkerd.io/inject: enabled + {{- end }} + spec: + {{ if .Values.inf.registry -}} + imagePullSecrets: + - name: {{ .Values.inf.registry.secretName }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + {{ if .Values.probes -}} + {{- if .Values.probes.liveness -}} + livenessProbe: + httpGet: + port: {{ .Values.probes.liveness.port }} + path: {{ .Values.probes.liveness.path }} + initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.liveness.periodSeconds }} + {{- end -}} + {{- end -}} + {{- if .Values.probes -}} + {{- if .Values.probes.readiness }} + readinessProbe: + httpGet: + port: {{ .Values.probes.readiness.port }} + path: {{ .Values.probes.readiness.path }} + initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.readiness.periodSeconds }} + timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} + {{- end -}} + {{- end }} + image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: PATH_BASE + value: {{ include "pathBase" . }} + - name: k8sname + value: {{ .Values.clusterName }} + {{- if .Values.env.values -}} + {{- range .Values.env.values }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end -}} + {{- end -}} + {{- if .Values.env.configmap -}} + {{- range .Values.env.configmap }} + - name: {{ .name }} + valueFrom: + configMapKeyRef: + name: {{ $cfgname }} + key: {{ .key }} + {{- end -}} + {{- end }} + ports: + - name: http + containerPort: 80 + protocol: TCP + - name: grpc + containerPort: 81 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + diff --git a/deploy/k8s/archived/helm/ordering-api/templates/service.yaml b/deploy/k8s/archived/helm/ordering-api/templates/service.yaml new file mode 100644 index 000000000..7c2cb0945 --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-api/templates/service.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.app.svc.ordering }} + labels: + app: {{ template "ordering-api.name" . }} + chart: {{ template "ordering-api.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + - port: {{ .Values.service.grpcPort }} + targetPort: grpc + protocol: TCP + name: grpc + selector: + app: {{ template "ordering-api.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/ordering-api/values.yaml b/deploy/k8s/archived/helm/ordering-api/values.yaml new file mode 100644 index 000000000..7eff1a48b --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-api/values.yaml @@ -0,0 +1,69 @@ +replicaCount: 1 +clusterName: eshop-aks +pathBase: /ordering-api + +image: + repository: eshop/ordering.api + tag: latest + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 80 + grpcPort: 81 + +ingress: + enabled: false + annotations: {} + hosts: + - chart-example.local + tls: [] + +resources: {} + + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +# env defines the environment variables that will be declared in the pod +env: + urls: + # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). + configmap: + - name: ConnectionString + key: ordering__ConnectionString + - name: ApplicationInsights__InstrumentationKey + key: all__InstrumentationKey + - name: EventBusConnection + key: all__EventBusConnection + - name: AzureServiceBusEnabled + key: all__UseAzureServiceBus + - name: UseLoadTest + key: ordering__EnableLoadTest + - name: IdentityUrl + key: urls__IdentityUrl + # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) + values: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: OrchestratorType + value: 'K8S' + - name: PORT + value: "80" + - name: GRPC_PORT + value: "81" +probes: + liveness: + path: /liveness + initialDelaySeconds: 10 + periodSeconds: 15 + port: 80 + readiness: + path: /hc + timeoutSeconds: 5 + initialDelaySeconds: 90 + periodSeconds: 60 + port: 80 diff --git a/deploy/k8s/archived/helm/ordering-backgroundtasks/.helmignore b/deploy/k8s/archived/helm/ordering-backgroundtasks/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-backgroundtasks/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/ordering-backgroundtasks/Chart.yaml b/deploy/k8s/archived/helm/ordering-backgroundtasks/Chart.yaml new file mode 100644 index 000000000..6ad4f47e6 --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-backgroundtasks/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: ordering-backgroundtasks +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/ordering-backgroundtasks/templates/NOTES.txt b/deploy/k8s/archived/helm/ordering-backgroundtasks/templates/NOTES.txt new file mode 100644 index 000000000..54e1b49ea --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-backgroundtasks/templates/NOTES.txt @@ -0,0 +1,3 @@ +eShop Ordering Background Tasks installed. +------------------------------------------ + diff --git a/deploy/k8s/archived/helm/ordering-backgroundtasks/templates/_helpers.tpl b/deploy/k8s/archived/helm/ordering-backgroundtasks/templates/_helpers.tpl new file mode 100644 index 000000000..e61b78285 --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-backgroundtasks/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "ordering-backgroundtasks.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "ordering-backgroundtasks.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "ordering-backgroundtasks.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/ordering-backgroundtasks/templates/_names.tpl b/deploy/k8s/archived/helm/ordering-backgroundtasks/templates/_names.tpl new file mode 100644 index 000000000..39ee485ef --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-backgroundtasks/templates/_names.tpl @@ -0,0 +1,51 @@ +{{- define "suffix-name" -}} +{{- if .Values.app.name -}} +{{- .Values.app.name -}} +{{- else -}} +{{- .Release.Name -}} +{{- end -}} +{{- end -}} + +{{- define "sql-name" -}} +{{- if .Values.inf.sql.host -}} +{{- .Values.inf.sql.host -}} +{{- else -}} +{{- printf "%s" "sql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "nosql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "url-of" -}} +{{- $name := first .}} +{{- $ctx := last .}} +{{- if eq $name "" -}} +{{- $ctx.Values.inf.k8s.dns -}} +{{- else -}} +{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} +{{- end -}} +{{- end -}} + + +{{- define "pathBase" -}} +{{- if .Values.inf.k8s.suffix -}} +{{- $suffix := include "suffix-name" . -}} +{{- printf "%s-%s" .Values.pathBase $suffix -}} +{{- else -}} +{{- .Values.pathBase -}} +{{- end -}} +{{- end -}} + +{{- define "fqdn-image" -}} +{{- if .Values.inf.registry -}} +{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} +{{- else -}} +{{- .Values.image.repository -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/ordering-backgroundtasks/templates/configmap.yaml b/deploy/k8s/archived/helm/ordering-backgroundtasks/templates/configmap.yaml new file mode 100644 index 000000000..7ed4a0e8e --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-backgroundtasks/templates/configmap.yaml @@ -0,0 +1,21 @@ +{{- $name := include "ordering-backgroundtasks.fullname" . -}} +{{- $sqlsrv := include "sql-name" . -}} +{{- $cfgname := printf "cfg-%s" $name | trunc 63 }} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: "{{ $cfgname }}" + labels: + app: {{ template "ordering-backgroundtasks.name" . }} + chart: {{ template "ordering-backgroundtasks.chart" .}} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + ordering__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.ordering.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }}; + ordering__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" + all__EventBusConnection: {{ .Values.inf.eventbus.constr }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" + all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" + graceperiodmanager__CheckUpdateTime: "{{ .Values.cfg.checkUpdateTime }}" + graceperiodmanager__GracePeriodTime: "{{ .Values.cfg.gracePeriodTime }}" \ No newline at end of file diff --git a/deploy/k8s/archived/helm/ordering-backgroundtasks/templates/deployment.yaml b/deploy/k8s/archived/helm/ordering-backgroundtasks/templates/deployment.yaml new file mode 100644 index 000000000..d93c7f764 --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-backgroundtasks/templates/deployment.yaml @@ -0,0 +1,92 @@ +{{- $name := include "ordering-backgroundtasks.fullname" . -}} +{{- $cfgname := printf "cfg-%s" $name | trunc 63 }} + +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "ordering-backgroundtasks.fullname" . }} + labels: + app: {{ template "ordering-backgroundtasks.name" . }} + chart: {{ template "ordering-backgroundtasks.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "ordering-backgroundtasks.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "ordering-backgroundtasks.name" . }} + release: {{ .Release.Name }} + spec: + {{ if .Values.inf.registry -}} + imagePullSecrets: + - name: {{ .Values.inf.registry.secretName }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + {{ if .Values.probes -}} + {{- if .Values.probes.liveness -}} + livenessProbe: + httpGet: + port: {{ .Values.probes.liveness.port }} + path: {{ .Values.probes.liveness.path }} + initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.liveness.periodSeconds }} + {{- end -}} + {{- end -}} + {{- if .Values.probes -}} + {{- if .Values.probes.readiness }} + readinessProbe: + httpGet: + port: {{ .Values.probes.readiness.port }} + path: {{ .Values.probes.readiness.path }} + initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.readiness.periodSeconds }} + timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} + {{- end -}} + {{- end }} + image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: PATH_BASE + value: {{ include "pathBase" . }} + - name: k8sname + value: {{ .Values.clusterName }} + {{- if .Values.env.values -}} + {{- range .Values.env.values }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end -}} + {{- end -}} + {{- if .Values.env.configmap -}} + {{- range .Values.env.configmap }} + - name: {{ .name }} + valueFrom: + configMapKeyRef: + name: {{ $cfgname }} + key: {{ .key }} + {{- end -}} + {{- end }} + ports: + - name: http + containerPort: 80 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + diff --git a/deploy/k8s/archived/helm/ordering-backgroundtasks/templates/service.yaml b/deploy/k8s/archived/helm/ordering-backgroundtasks/templates/service.yaml new file mode 100644 index 000000000..d8fcba036 --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-backgroundtasks/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.app.svc.orderingbackgroundtasks }} + labels: + app: {{ template "ordering-backgroundtasks.name" . }} + chart: {{ template "ordering-backgroundtasks.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + app: {{ template "ordering-backgroundtasks.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/ordering-backgroundtasks/values.yaml b/deploy/k8s/archived/helm/ordering-backgroundtasks/values.yaml new file mode 100644 index 000000000..d065f0345 --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-backgroundtasks/values.yaml @@ -0,0 +1,70 @@ +replicaCount: 1 +clusterName: eshop-aks +pathBase: /ordering-backgroundtasks + +image: + repository: eshop/ordering.backgroundtasks + tag: latest + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: false + annotations: {} + hosts: + - chart-example.local + tls: [] + +cfg: + checkUpdateTime: "15000" + gracePeriodTime: "1" + +resources: {} + + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +# env defines the environment variables that will be declared in the pod +env: + urls: + # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). + configmap: + - name: ConnectionString + key: ordering__ConnectionString + - name: ApplicationInsights__InstrumentationKey + key: all__InstrumentationKey + - name: EventBusConnection + key: all__EventBusConnection + - name: AzureServiceBusEnabled + key: all__UseAzureServiceBus + - name: UseLoadTest + key: ordering__EnableLoadTest + - name: CheckUpdateTime + key: graceperiodmanager__CheckUpdateTime + - name: GracePeriodTime + key: graceperiodmanager__GracePeriodTime + # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) + values: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: OrchestratorType + value: 'K8S' +probes: + liveness: + path: /liveness + initialDelaySeconds: 10 + periodSeconds: 15 + port: 80 + readiness: + path: /hc + timeoutSeconds: 5 + initialDelaySeconds: 90 + periodSeconds: 60 + port: 80 diff --git a/deploy/k8s/archived/helm/ordering-signalrhub/.helmignore b/deploy/k8s/archived/helm/ordering-signalrhub/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-signalrhub/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/ordering-signalrhub/Chart.yaml b/deploy/k8s/archived/helm/ordering-signalrhub/Chart.yaml new file mode 100644 index 000000000..d43e83bf0 --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-signalrhub/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: ordering-signalrhub +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/ordering-signalrhub/templates/NOTES.txt b/deploy/k8s/archived/helm/ordering-signalrhub/templates/NOTES.txt new file mode 100644 index 000000000..fc55c9dfa --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-signalrhub/templates/NOTES.txt @@ -0,0 +1,8 @@ +eShop Ordering SignalR Hub installed +------------------------------------ + +This API is not directly exposed outside cluster. If need to access it use: + +export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "ordering-signalrhub.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") +echo "Visit http://127.0.0.1:8080 to use your application" +kubectl port-forward $POD_NAME 8080:80 diff --git a/deploy/k8s/archived/helm/ordering-signalrhub/templates/_helpers.tpl b/deploy/k8s/archived/helm/ordering-signalrhub/templates/_helpers.tpl new file mode 100644 index 000000000..2c11ddb51 --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-signalrhub/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "ordering-signalrhub.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "ordering-signalrhub.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "ordering-signalrhub.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/ordering-signalrhub/templates/_names.tpl b/deploy/k8s/archived/helm/ordering-signalrhub/templates/_names.tpl new file mode 100644 index 000000000..39ee485ef --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-signalrhub/templates/_names.tpl @@ -0,0 +1,51 @@ +{{- define "suffix-name" -}} +{{- if .Values.app.name -}} +{{- .Values.app.name -}} +{{- else -}} +{{- .Release.Name -}} +{{- end -}} +{{- end -}} + +{{- define "sql-name" -}} +{{- if .Values.inf.sql.host -}} +{{- .Values.inf.sql.host -}} +{{- else -}} +{{- printf "%s" "sql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "nosql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "url-of" -}} +{{- $name := first .}} +{{- $ctx := last .}} +{{- if eq $name "" -}} +{{- $ctx.Values.inf.k8s.dns -}} +{{- else -}} +{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} +{{- end -}} +{{- end -}} + + +{{- define "pathBase" -}} +{{- if .Values.inf.k8s.suffix -}} +{{- $suffix := include "suffix-name" . -}} +{{- printf "%s-%s" .Values.pathBase $suffix -}} +{{- else -}} +{{- .Values.pathBase -}} +{{- end -}} +{{- end -}} + +{{- define "fqdn-image" -}} +{{- if .Values.inf.registry -}} +{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} +{{- else -}} +{{- .Values.image.repository -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/ordering-signalrhub/templates/configmap.yaml b/deploy/k8s/archived/helm/ordering-signalrhub/templates/configmap.yaml new file mode 100644 index 000000000..bab4ebc94 --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-signalrhub/templates/configmap.yaml @@ -0,0 +1,18 @@ +{{- $name := include "ordering-signalrhub.fullname" . -}} +{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: "cfg-{{ $name }}" + labels: + app: {{ template "ordering-signalrhub.name" . }} + chart: {{ template "ordering-signalrhub.chart" .}} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + all__EventBusConnection: {{ .Values.inf.eventbus.constr }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" + all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" + signalr__StoreConnectionString: {{ .Values.inf.redis.keystore.constr }} + urls__IdentityUrl: http://{{ $identity }} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/ordering-signalrhub/templates/deployment.yaml b/deploy/k8s/archived/helm/ordering-signalrhub/templates/deployment.yaml new file mode 100644 index 000000000..af3867ea5 --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-signalrhub/templates/deployment.yaml @@ -0,0 +1,70 @@ +{{- $name := include "ordering-signalrhub.fullname" . -}} +{{- $cfgname := printf "%s-%s" "cfg" $name -}} +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "ordering-signalrhub.fullname" . }} + labels: + app: {{ template "ordering-signalrhub.name" . }} + chart: {{ template "ordering-signalrhub.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "ordering-signalrhub.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "ordering-signalrhub.name" . }} + release: {{ .Release.Name }} + spec: + {{ if .Values.inf.registry -}} + imagePullSecrets: + - name: {{ .Values.inf.registry.secretName }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: PATH_BASE + value: {{ include "pathBase" . }} + - name: k8sname + value: {{ .Values.clusterName }} + {{- if .Values.env.values -}} + {{- range .Values.env.values }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end -}} + {{- end -}} + {{- if .Values.env.configmap -}} + {{- range .Values.env.configmap }} + - name: {{ .name }} + valueFrom: + configMapKeyRef: + name: {{ $cfgname }} + key: {{ .key }} + {{- end -}} + {{- end }} + ports: + - name: http + containerPort: 80 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + diff --git a/deploy/k8s/archived/helm/ordering-signalrhub/templates/service.yaml b/deploy/k8s/archived/helm/ordering-signalrhub/templates/service.yaml new file mode 100644 index 000000000..501539923 --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-signalrhub/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.app.svc.orderingsignalrhub }} + labels: + app: {{ template "ordering-signalrhub.name" . }} + chart: {{ template "ordering-signalrhub.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + app: {{ template "ordering-signalrhub.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/ordering-signalrhub/values.yaml b/deploy/k8s/archived/helm/ordering-signalrhub/values.yaml new file mode 100644 index 000000000..19099b147 --- /dev/null +++ b/deploy/k8s/archived/helm/ordering-signalrhub/values.yaml @@ -0,0 +1,57 @@ +replicaCount: 1 +clusterName: eshop-aks +pathBase: /ordering-signalrhub + +image: + repository: eshop/ordering.signalrhub + tag: latest + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: false + annotations: {} + hosts: + - chart-example.local + tls: [] + +cfg: + checkUpdateTime: "15000" + gracePeriodTime: "1" + +resources: {} + + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +# env defines the environment variables that will be declared in the pod +env: + urls: + # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). + configmap: + - name: ApplicationInsights__InstrumentationKey + key: all__InstrumentationKey + - name: EventBusConnection + key: all__EventBusConnection + - name: AzureServiceBusEnabled + key: all__UseAzureServiceBus + - name: IdentityUrl + key: urls__IdentityUrl + - name: SignalrStoreConnectionString + key: signalr__StoreConnectionString + # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) + values: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: OrchestratorType + value: 'K8S' + - name: IsClusterEnv + values: 'True' + diff --git a/deploy/k8s/archived/helm/payment-api/.helmignore b/deploy/k8s/archived/helm/payment-api/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/payment-api/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/payment-api/Chart.yaml b/deploy/k8s/archived/helm/payment-api/Chart.yaml new file mode 100644 index 000000000..b7dba9341 --- /dev/null +++ b/deploy/k8s/archived/helm/payment-api/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: payment-api +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/payment-api/templates/NOTES.txt b/deploy/k8s/archived/helm/payment-api/templates/NOTES.txt new file mode 100644 index 000000000..6d178f344 --- /dev/null +++ b/deploy/k8s/archived/helm/payment-api/templates/NOTES.txt @@ -0,0 +1,9 @@ +eShop Payment API installed. +---------------------------- + +This API is not directly exposed outside cluster. If need to access it use: + +export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "payment-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") +echo "Visit http://127.0.0.1:8080 to use your application" +kubectl port-forward $POD_NAME 8080:80 + diff --git a/deploy/k8s/archived/helm/payment-api/templates/_helpers.tpl b/deploy/k8s/archived/helm/payment-api/templates/_helpers.tpl new file mode 100644 index 000000000..2f98d7ea2 --- /dev/null +++ b/deploy/k8s/archived/helm/payment-api/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "payment-api.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "payment-api.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "payment-api.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/payment-api/templates/_names.tpl b/deploy/k8s/archived/helm/payment-api/templates/_names.tpl new file mode 100644 index 000000000..39ee485ef --- /dev/null +++ b/deploy/k8s/archived/helm/payment-api/templates/_names.tpl @@ -0,0 +1,51 @@ +{{- define "suffix-name" -}} +{{- if .Values.app.name -}} +{{- .Values.app.name -}} +{{- else -}} +{{- .Release.Name -}} +{{- end -}} +{{- end -}} + +{{- define "sql-name" -}} +{{- if .Values.inf.sql.host -}} +{{- .Values.inf.sql.host -}} +{{- else -}} +{{- printf "%s" "sql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "nosql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "url-of" -}} +{{- $name := first .}} +{{- $ctx := last .}} +{{- if eq $name "" -}} +{{- $ctx.Values.inf.k8s.dns -}} +{{- else -}} +{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} +{{- end -}} +{{- end -}} + + +{{- define "pathBase" -}} +{{- if .Values.inf.k8s.suffix -}} +{{- $suffix := include "suffix-name" . -}} +{{- printf "%s-%s" .Values.pathBase $suffix -}} +{{- else -}} +{{- .Values.pathBase -}} +{{- end -}} +{{- end -}} + +{{- define "fqdn-image" -}} +{{- if .Values.inf.registry -}} +{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} +{{- else -}} +{{- .Values.image.repository -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/payment-api/templates/configmap.yaml b/deploy/k8s/archived/helm/payment-api/templates/configmap.yaml new file mode 100644 index 000000000..3bdb95c0f --- /dev/null +++ b/deploy/k8s/archived/helm/payment-api/templates/configmap.yaml @@ -0,0 +1,15 @@ +{{- $name := include "payment-api.fullname" . -}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: "cfg-{{ $name }}" + labels: + app: {{ template "payment-api.name" . }} + chart: {{ template "payment-api.chart" .}} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + all__EventBusConnection: {{ .Values.inf.eventbus.constr }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" + all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" \ No newline at end of file diff --git a/deploy/k8s/archived/helm/payment-api/templates/deployment.yaml b/deploy/k8s/archived/helm/payment-api/templates/deployment.yaml new file mode 100644 index 000000000..f83eb37da --- /dev/null +++ b/deploy/k8s/archived/helm/payment-api/templates/deployment.yaml @@ -0,0 +1,96 @@ +{{- $name := include "payment-api.fullname" . -}} +{{- $cfgname := printf "%s-%s" "cfg" $name -}} +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "payment-api.fullname" . }} + labels: + ufo: {{ $cfgname}} + app: {{ template "payment-api.name" . }} + chart: {{ template "payment-api.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "payment-api.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "payment-api.name" . }} + release: {{ .Release.Name }} + {{ if .Values.inf.mesh.enabled -}} + annotations: + linkerd.io/inject: enabled + {{- end }} + spec: + {{ if .Values.inf.registry -}} + imagePullSecrets: + - name: {{ .Values.inf.registry.secretName }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + {{ if .Values.probes -}} + {{- if .Values.probes.liveness -}} + livenessProbe: + httpGet: + port: {{ .Values.probes.liveness.port }} + path: {{ .Values.probes.liveness.path }} + initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.liveness.periodSeconds }} + {{- end -}} + {{- end -}} + {{- if .Values.probes -}} + {{- if .Values.probes.readiness }} + readinessProbe: + httpGet: + port: {{ .Values.probes.readiness.port }} + path: {{ .Values.probes.readiness.path }} + initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.readiness.periodSeconds }} + timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} + {{- end -}} + {{- end }} + image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: PATH_BASE + value: {{ include "pathBase" . }} + - name: k8sname + value: {{ .Values.clusterName }} + {{- if .Values.env.values -}} + {{- range .Values.env.values }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end -}} + {{- end -}} + {{- if .Values.env.configmap -}} + {{- range .Values.env.configmap }} + - name: {{ .name }} + valueFrom: + configMapKeyRef: + name: {{ $cfgname }} + key: {{ .key }} + {{- end -}} + {{- end }} + ports: + - name: http + containerPort: 80 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + diff --git a/deploy/k8s/archived/helm/payment-api/templates/service.yaml b/deploy/k8s/archived/helm/payment-api/templates/service.yaml new file mode 100644 index 000000000..14fc7479c --- /dev/null +++ b/deploy/k8s/archived/helm/payment-api/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.app.svc.payment }} + labels: + app: {{ template "payment-api.name" . }} + chart: {{ template "payment-api.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + app: {{ template "payment-api.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/payment-api/values.yaml b/deploy/k8s/archived/helm/payment-api/values.yaml new file mode 100644 index 000000000..341e4e1a9 --- /dev/null +++ b/deploy/k8s/archived/helm/payment-api/values.yaml @@ -0,0 +1,56 @@ +replicaCount: 1 +clusterName: eshop-aks +pathBase: /payment-api + +image: + repository: eshop/payment.api + tag: latest + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: false + annotations: {} + tls: [] + +resources: {} + + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +# env defines the environment variables that will be declared in the pod +env: + urls: + # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). + configmap: + - name: ApplicationInsights__InstrumentationKey + key: all__InstrumentationKey + - name: EventBusConnection + key: all__EventBusConnection + - name: AzureServiceBusEnabled + key: all__UseAzureServiceBus + # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) + values: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: OrchestratorType + value: 'K8S' +probes: + liveness: + path: /liveness + initialDelaySeconds: 10 + periodSeconds: 15 + port: 80 + readiness: + path: /hc + timeoutSeconds: 5 + initialDelaySeconds: 90 + periodSeconds: 60 + port: 80 diff --git a/deploy/k8s/archived/helm/rabbitmq/.helmignore b/deploy/k8s/archived/helm/rabbitmq/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/rabbitmq/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/rabbitmq/Chart.yaml b/deploy/k8s/archived/helm/rabbitmq/Chart.yaml new file mode 100644 index 000000000..2d955858e --- /dev/null +++ b/deploy/k8s/archived/helm/rabbitmq/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: rabbitmq +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/rabbitmq/templates/NOTES.txt b/deploy/k8s/archived/helm/rabbitmq/templates/NOTES.txt new file mode 100644 index 000000000..49edf7f9c --- /dev/null +++ b/deploy/k8s/archived/helm/rabbitmq/templates/NOTES.txt @@ -0,0 +1,8 @@ +eShop rabbitmq installed +------------------------- + +rabbitmq is not directly exposed outside cluster. If need to access it from outside use: + +export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "rabbitmq.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") +echo "Visit http://127.0.0.1:8080 to use your application" +kubectl port-forward $POD_NAME 8080:80 \ No newline at end of file diff --git a/deploy/k8s/archived/helm/rabbitmq/templates/_helpers.tpl b/deploy/k8s/archived/helm/rabbitmq/templates/_helpers.tpl new file mode 100644 index 000000000..bbbb2e33d --- /dev/null +++ b/deploy/k8s/archived/helm/rabbitmq/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "rabbitmq.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "rabbitmq.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "rabbitmq.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/rabbitmq/templates/_names.tpl b/deploy/k8s/archived/helm/rabbitmq/templates/_names.tpl new file mode 100644 index 000000000..be0a9b800 --- /dev/null +++ b/deploy/k8s/archived/helm/rabbitmq/templates/_names.tpl @@ -0,0 +1,8 @@ + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "rabbitmq" -}} +{{- end -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/rabbitmq/templates/deployment.yaml b/deploy/k8s/archived/helm/rabbitmq/templates/deployment.yaml new file mode 100644 index 000000000..9819a6455 --- /dev/null +++ b/deploy/k8s/archived/helm/rabbitmq/templates/deployment.yaml @@ -0,0 +1,43 @@ +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "rabbitmq.fullname" . }} + labels: + app: {{ template "rabbitmq.name" . }} + chart: {{ template "rabbitmq.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "rabbitmq.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "rabbitmq.name" . }} + release: {{ .Release.Name }} + spec: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: 5672 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} diff --git a/deploy/k8s/archived/helm/rabbitmq/templates/service.yaml b/deploy/k8s/archived/helm/rabbitmq/templates/service.yaml new file mode 100644 index 000000000..5de39e0a8 --- /dev/null +++ b/deploy/k8s/archived/helm/rabbitmq/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.inf.eventbus.svc }} + labels: + app: {{ template "rabbitmq.name" . }} + chart: {{ template "rabbitmq.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + app: {{ template "rabbitmq.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/rabbitmq/values.yaml b/deploy/k8s/archived/helm/rabbitmq/values.yaml new file mode 100644 index 000000000..5e9efd521 --- /dev/null +++ b/deploy/k8s/archived/helm/rabbitmq/values.yaml @@ -0,0 +1,19 @@ +replicaCount: 1 + +image: + repository: rabbitmq + tag: 3-management + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 5672 + + +resources: {} + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/deploy/k8s/archived/helm/sql-data/.helmignore b/deploy/k8s/archived/helm/sql-data/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/sql-data/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/sql-data/Chart.yaml b/deploy/k8s/archived/helm/sql-data/Chart.yaml new file mode 100644 index 000000000..6e5d726c5 --- /dev/null +++ b/deploy/k8s/archived/helm/sql-data/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: sql-data +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/sql-data/templates/NOTES.txt b/deploy/k8s/archived/helm/sql-data/templates/NOTES.txt new file mode 100644 index 000000000..468a155b0 --- /dev/null +++ b/deploy/k8s/archived/helm/sql-data/templates/NOTES.txt @@ -0,0 +1,8 @@ +eShop SQL Server Installed +-------------------------- + +SQL server is not exposed outside the cluster. If need to access it from outside, use: + +export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "sql-data.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") +echo "Visit http://127.0.0.1:8080 to use your application" +kubectl port-forward $POD_NAME 8080:80 \ No newline at end of file diff --git a/deploy/k8s/archived/helm/sql-data/templates/_helpers.tpl b/deploy/k8s/archived/helm/sql-data/templates/_helpers.tpl new file mode 100644 index 000000000..ee953f2f8 --- /dev/null +++ b/deploy/k8s/archived/helm/sql-data/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "sql-data.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "sql-data.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "sql-data.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/sql-data/templates/_names.tpl b/deploy/k8s/archived/helm/sql-data/templates/_names.tpl new file mode 100644 index 000000000..dc35d62fe --- /dev/null +++ b/deploy/k8s/archived/helm/sql-data/templates/_names.tpl @@ -0,0 +1,8 @@ + +{{- define "sql-name" -}} +{{- if .Values.inf.sql.host -}} +{{- .Values.inf.sql.host -}} +{{- else -}} +{{- printf "%s" "sql-data" -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/sql-data/templates/deployment.yaml b/deploy/k8s/archived/helm/sql-data/templates/deployment.yaml new file mode 100644 index 000000000..4b2f589ef --- /dev/null +++ b/deploy/k8s/archived/helm/sql-data/templates/deployment.yaml @@ -0,0 +1,50 @@ +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "sql-data.fullname" . }} + labels: + app: {{ template "sql-data.name" . }} + chart: {{ template "sql-data.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "sql-data.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "sql-data.name" . }} + release: {{ .Release.Name }} + spec: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: {{ .Values.inf.sql.common.pid }} + - name: MSSQL_SA_PASSWORD + value: {{ .Values.inf.sql.common.pwd }} + ports: + - name: http + containerPort: 1433 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} diff --git a/deploy/k8s/archived/helm/sql-data/templates/service.yaml b/deploy/k8s/archived/helm/sql-data/templates/service.yaml new file mode 100644 index 000000000..b9b8d59fc --- /dev/null +++ b/deploy/k8s/archived/helm/sql-data/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "sql-name" . }} + labels: + app: {{ template "sql-data.name" . }} + chart: {{ template "sql-data.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + app: {{ template "sql-data.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/sql-data/values.yaml b/deploy/k8s/archived/helm/sql-data/values.yaml new file mode 100644 index 000000000..0ed76556a --- /dev/null +++ b/deploy/k8s/archived/helm/sql-data/values.yaml @@ -0,0 +1,19 @@ +replicaCount: 1 + +image: + repository: microsoft/mssql-server-linux + tag: 2017-CU7 + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 1433 + + +resources: {} + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/deploy/k8s/archived/helm/tls-support/.helmignore b/deploy/k8s/archived/helm/tls-support/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/tls-support/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/tls-support/Chart.yaml b/deploy/k8s/archived/helm/tls-support/Chart.yaml new file mode 100644 index 000000000..e21e04e95 --- /dev/null +++ b/deploy/k8s/archived/helm/tls-support/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: tt-ssl +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/tls-support/templates/_helpers.tpl b/deploy/k8s/archived/helm/tls-support/templates/_helpers.tpl new file mode 100644 index 000000000..5088703f0 --- /dev/null +++ b/deploy/k8s/archived/helm/tls-support/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "tt-tls.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "tt-tls.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "tt-tls.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/tls-support/templates/issuer.yaml b/deploy/k8s/archived/helm/tls-support/templates/issuer.yaml new file mode 100644 index 000000000..ae9587198 --- /dev/null +++ b/deploy/k8s/archived/helm/tls-support/templates/issuer.yaml @@ -0,0 +1,17 @@ +apiVersion: cert-manager.io/v1alpha2 +kind: Issuer +metadata: + name: {{ .Values.issuerName }} + namespace: default + environment: {{ .Values.environment }} + app: {{ .Values.applicationName }} +spec: + acme: + server: {{ .Values.server }} + email: not@used.com + privateKeySecretRef: + name: {{ .Values.issuerSecretName }} + solvers: + - http01: + ingress: + class: {{ .Values.ingressClass }} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/tls-support/values-prod.yaml b/deploy/k8s/archived/helm/tls-support/values-prod.yaml new file mode 100644 index 000000000..fb577b9b7 --- /dev/null +++ b/deploy/k8s/archived/helm/tls-support/values-prod.yaml @@ -0,0 +1,8 @@ +applicationName: eshop +issuerName: letsencrypt-prod +certName: eshop-cert-prod +environment: prod +server: https://acme-v02.api.letsencrypt.org/directory +certSecretName: eshop-letsencrypt-prod +issuerSecretName: letsencrypt-prod +ingressClass: addon-http-application-routing \ No newline at end of file diff --git a/deploy/k8s/archived/helm/tls-support/values-staging.yaml b/deploy/k8s/archived/helm/tls-support/values-staging.yaml new file mode 100644 index 000000000..89dcd6654 --- /dev/null +++ b/deploy/k8s/archived/helm/tls-support/values-staging.yaml @@ -0,0 +1,8 @@ +applicationName: eshop +issuerName: letsencrypt-staging +certName: eshop-cert-staging +environment: staging +server: https://acme-staging-v02.api.letsencrypt.org/directory +certSecretName: eshop-letsencrypt-staging +issuerSecretName: letsencrypt-staging +ingressClass: addon-http-application-routing \ No newline at end of file diff --git a/deploy/k8s/archived/helm/webhooks-api/.helmignore b/deploy/k8s/archived/helm/webhooks-api/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/webhooks-api/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/webhooks-api/Chart.yaml b/deploy/k8s/archived/helm/webhooks-api/Chart.yaml new file mode 100644 index 000000000..f8e950782 --- /dev/null +++ b/deploy/k8s/archived/helm/webhooks-api/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: webhooks-api +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/webhooks-api/templates/NOTES.txt b/deploy/k8s/archived/helm/webhooks-api/templates/NOTES.txt new file mode 100644 index 000000000..818b99d1b --- /dev/null +++ b/deploy/k8s/archived/helm/webhooks-api/templates/NOTES.txt @@ -0,0 +1,8 @@ +eShop Ordering API installed. +----------------------------- + +This API is not directly exposed outside cluster. If need to access it use: + +export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "webhooks-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") +echo "Visit http://127.0.0.1:8080 to use your application" +kubectl port-forward $POD_NAME 8080:80 diff --git a/deploy/k8s/archived/helm/webhooks-api/templates/_helpers.tpl b/deploy/k8s/archived/helm/webhooks-api/templates/_helpers.tpl new file mode 100644 index 000000000..3742516b7 --- /dev/null +++ b/deploy/k8s/archived/helm/webhooks-api/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "webhooks-api.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "webhooks-api.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "webhooks-api.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/webhooks-api/templates/_names.tpl b/deploy/k8s/archived/helm/webhooks-api/templates/_names.tpl new file mode 100644 index 000000000..752355276 --- /dev/null +++ b/deploy/k8s/archived/helm/webhooks-api/templates/_names.tpl @@ -0,0 +1,60 @@ +{{- define "suffix-name" -}} +{{- if .Values.app.name -}} +{{- .Values.app.name -}} +{{- else -}} +{{- .Release.Name -}} +{{- end -}} +{{- end -}} + +{{- define "sql-name" -}} +{{- if .Values.inf.sql.host -}} +{{- .Values.inf.sql.host -}} +{{- else -}} +{{- printf "%s" "sql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "nosql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "url-of" -}} +{{- $name := first .}} +{{- $ctx := last .}} +{{- if eq $name "" -}} +{{- $ctx.Values.inf.k8s.dns -}} +{{- else -}} +{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} +{{- end -}} +{{- end -}} + + +{{- define "pathBase" -}} +{{- if .Values.inf.k8s.suffix -}} +{{- $suffix := include "suffix-name" . -}} +{{- printf "%s-%s" .Values.pathBase $suffix -}} +{{- else -}} +{{- .Values.pathBase -}} +{{- end -}} +{{- end -}} + +{{- define "fqdn-image" -}} +{{- if .Values.inf.registry -}} +{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} +{{- else -}} +{{- .Values.image.repository -}} +{{- end -}} +{{- end -}} + + +{{- define "protocol" -}} +{{- if .Values.inf.tls.enabled -}} +{{- printf "%s" "https" -}} +{{- else -}} +{{- printf "%s" "http" -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/webhooks-api/templates/configmap.yaml b/deploy/k8s/archived/helm/webhooks-api/templates/configmap.yaml new file mode 100644 index 000000000..05b9b7f57 --- /dev/null +++ b/deploy/k8s/archived/helm/webhooks-api/templates/configmap.yaml @@ -0,0 +1,21 @@ +{{- $name := include "webhooks-api.fullname" . -}} +{{- $sqlsrv := include "sql-name" . -}} +{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} +{{- $protocol := include "protocol" . -}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: "cfg-{{ $name }}" + labels: + app: {{ template "webhooks-api.name" . }} + chart: {{ template "webhooks-api.chart" .}} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + webhooks__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.webhooks.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }}; + urls__IdentityUrl: http://{{ $identity }} + urls__IdentityUrlExternal: {{ $protocol }}://{{ $identity }} + all__EventBusConnection: {{ .Values.inf.eventbus.constr }} + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" + all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" \ No newline at end of file diff --git a/deploy/k8s/archived/helm/webhooks-api/templates/deployment.yaml b/deploy/k8s/archived/helm/webhooks-api/templates/deployment.yaml new file mode 100644 index 000000000..2ecb885bf --- /dev/null +++ b/deploy/k8s/archived/helm/webhooks-api/templates/deployment.yaml @@ -0,0 +1,75 @@ +{{- $name := include "webhooks-api.fullname" . -}} +{{- $cfgname := printf "%s-%s" "cfg" $name -}} +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "webhooks-api.fullname" . }} + labels: + ufo: {{ $cfgname}} + app: {{ template "webhooks-api.name" . }} + chart: {{ template "webhooks-api.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "webhooks-api.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "webhooks-api.name" . }} + release: {{ .Release.Name }} + {{ if .Values.inf.mesh.enabled -}} + annotations: + linkerd.io/inject: enabled + {{- end }} + spec: + {{ if .Values.inf.registry -}} + imagePullSecrets: + - name: {{ .Values.inf.registry.secretName }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: PATH_BASE + value: {{ include "pathBase" . }} + - name: k8sname + value: {{ .Values.clusterName }} + {{- if .Values.env.values -}} + {{- range .Values.env.values }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end -}} + {{- end -}} + {{- if .Values.env.configmap -}} + {{- range .Values.env.configmap }} + - name: {{ .name }} + valueFrom: + configMapKeyRef: + name: {{ $cfgname }} + key: {{ .key }} + {{- end -}} + {{- end }} + ports: + - name: http + containerPort: 80 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + diff --git a/deploy/k8s/archived/helm/webhooks-api/templates/ingress.yaml b/deploy/k8s/archived/helm/webhooks-api/templates/ingress.yaml new file mode 100644 index 000000000..c7c096b77 --- /dev/null +++ b/deploy/k8s/archived/helm/webhooks-api/templates/ingress.yaml @@ -0,0 +1,46 @@ +{{- if .Values.ingress.enabled -}} +{{- $ingressPath := include "pathBase" . -}} +{{- $serviceName := .Values.app.svc.webhooks }} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ template "webhooks-api.fullname" . }} + labels: + app: {{ template "webhooks-api.name" . }} + chart: {{ template "webhooks-api.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.ingress.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +{{- if and .Values.inf.tls.enabled .Values.inf.tls.issuer }} + cert-manager.io/issuer: {{ .Values.inf.tls.issuer }} +{{- end }} +{{- if .Values.inf.mesh.enabled }} +{{- with .Values.ingress.mesh.annotations }} +{{ toYaml . | indent 4 }} +{{- end }} +{{- end }} +spec: +{{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} +{{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ . }} + http: + paths: + - path: {{ $ingressPath }} + backend: + serviceName: {{ $serviceName }} + servicePort: http + {{- end }} +{{- end }} diff --git a/deploy/k8s/archived/helm/webhooks-api/templates/service.yaml b/deploy/k8s/archived/helm/webhooks-api/templates/service.yaml new file mode 100644 index 000000000..d8a02ba65 --- /dev/null +++ b/deploy/k8s/archived/helm/webhooks-api/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.app.svc.webhooks }} + labels: + app: {{ template "webhooks-api.name" . }} + chart: {{ template "webhooks-api.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + app: {{ template "webhooks-api.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/webhooks-api/values.yaml b/deploy/k8s/archived/helm/webhooks-api/values.yaml new file mode 100644 index 000000000..f6b1957e9 --- /dev/null +++ b/deploy/k8s/archived/helm/webhooks-api/values.yaml @@ -0,0 +1,53 @@ +replicaCount: 1 +clusterName: eshop-aks +pathBase: /webhooks-api + +image: + repository: eshop/webhooks.api + tag: latest + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: true + annotations: {} + hosts: + - chart-example.local + tls: [] + +resources: {} + + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +# env defines the environment variables that will be declared in the pod +env: + urls: + # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). + configmap: + - name: ConnectionString + key: webhooks__ConnectionString + - name: ApplicationInsights__InstrumentationKey + key: all__InstrumentationKey + - name: EventBusConnection + key: all__EventBusConnection + - name: AzureServiceBusEnabled + key: all__UseAzureServiceBus + - name: IdentityUrl + key: urls__IdentityUrl + - name: IdentityUrlExternal + key: urls__IdentityUrlExternal + # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) + values: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: OrchestratorType + value: 'K8S' + diff --git a/deploy/k8s/archived/helm/webhooks-web/.helmignore b/deploy/k8s/archived/helm/webhooks-web/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/webhooks-web/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/webhooks-web/Chart.yaml b/deploy/k8s/archived/helm/webhooks-web/Chart.yaml new file mode 100644 index 000000000..420b4f16d --- /dev/null +++ b/deploy/k8s/archived/helm/webhooks-web/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: webhooks-web +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/webhooks-web/templates/NOTES.txt b/deploy/k8s/archived/helm/webhooks-web/templates/NOTES.txt new file mode 100644 index 000000000..b7f7f97ba --- /dev/null +++ b/deploy/k8s/archived/helm/webhooks-web/templates/NOTES.txt @@ -0,0 +1,8 @@ +eShop Ordering API installed. +----------------------------- + +This API is not directly exposed outside cluster. If need to access it use: + +export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "webhooks-web.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") +echo "Visit http://127.0.0.1:8080 to use your application" +kubectl port-forward $POD_NAME 8080:80 diff --git a/deploy/k8s/archived/helm/webhooks-web/templates/_helpers.tpl b/deploy/k8s/archived/helm/webhooks-web/templates/_helpers.tpl new file mode 100644 index 000000000..cbc856713 --- /dev/null +++ b/deploy/k8s/archived/helm/webhooks-web/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "webhooks-web.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "webhooks-web.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "webhooks-web.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/webhooks-web/templates/_names.tpl b/deploy/k8s/archived/helm/webhooks-web/templates/_names.tpl new file mode 100644 index 000000000..752355276 --- /dev/null +++ b/deploy/k8s/archived/helm/webhooks-web/templates/_names.tpl @@ -0,0 +1,60 @@ +{{- define "suffix-name" -}} +{{- if .Values.app.name -}} +{{- .Values.app.name -}} +{{- else -}} +{{- .Release.Name -}} +{{- end -}} +{{- end -}} + +{{- define "sql-name" -}} +{{- if .Values.inf.sql.host -}} +{{- .Values.inf.sql.host -}} +{{- else -}} +{{- printf "%s" "sql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "nosql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "url-of" -}} +{{- $name := first .}} +{{- $ctx := last .}} +{{- if eq $name "" -}} +{{- $ctx.Values.inf.k8s.dns -}} +{{- else -}} +{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} +{{- end -}} +{{- end -}} + + +{{- define "pathBase" -}} +{{- if .Values.inf.k8s.suffix -}} +{{- $suffix := include "suffix-name" . -}} +{{- printf "%s-%s" .Values.pathBase $suffix -}} +{{- else -}} +{{- .Values.pathBase -}} +{{- end -}} +{{- end -}} + +{{- define "fqdn-image" -}} +{{- if .Values.inf.registry -}} +{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} +{{- else -}} +{{- .Values.image.repository -}} +{{- end -}} +{{- end -}} + + +{{- define "protocol" -}} +{{- if .Values.inf.tls.enabled -}} +{{- printf "%s" "https" -}} +{{- else -}} +{{- printf "%s" "http" -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/webhooks-web/templates/configmap.yaml b/deploy/k8s/archived/helm/webhooks-web/templates/configmap.yaml new file mode 100644 index 000000000..bd09c7c62 --- /dev/null +++ b/deploy/k8s/archived/helm/webhooks-web/templates/configmap.yaml @@ -0,0 +1,20 @@ +{{- $name := include "webhooks-web.fullname" . -}} +{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} +{{- $webhooksweb := include "url-of" (list .Values.app.ingress.entries.webhooksweb .) -}} +{{- $webhooks := include "url-of" (list .Values.app.ingress.entries.webhooks .) -}} +{{- $protocol := include "protocol" . -}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: "cfg-{{ $name }}" + labels: + app: {{ template "webhooks-web.name" . }} + chart: {{ template "webhooks-web.chart" .}} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + urls__webhooks: {{ $protocol }}://{{ $webhooks }} + identity_e: {{ $protocol }}://{{ $identity }} + webhooksweb_e: {{ $protocol }}://{{ $webhooksweb }} + urls_webhooksweb: http://{{ .Values.app.svc.webhooksweb }} diff --git a/deploy/k8s/archived/helm/webhooks-web/templates/deployment.yaml b/deploy/k8s/archived/helm/webhooks-web/templates/deployment.yaml new file mode 100644 index 000000000..43d406524 --- /dev/null +++ b/deploy/k8s/archived/helm/webhooks-web/templates/deployment.yaml @@ -0,0 +1,75 @@ +{{- $name := include "webhooks-web.fullname" . -}} +{{- $cfgname := printf "%s-%s" "cfg" $name -}} +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "webhooks-web.fullname" . }} + labels: + ufo: {{ $cfgname}} + app: {{ template "webhooks-web.name" . }} + chart: {{ template "webhooks-web.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "webhooks-web.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "webhooks-web.name" . }} + release: {{ .Release.Name }} + {{ if .Values.inf.mesh.enabled -}} + annotations: + linkerd.io/inject: enabled + {{- end }} + spec: + {{ if .Values.inf.registry -}} + imagePullSecrets: + - name: {{ .Values.inf.registry.secretName }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: PATH_BASE + value: {{ include "pathBase" . }} + - name: k8sname + value: {{ .Values.clusterName }} + {{- if .Values.env.values -}} + {{- range .Values.env.values }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end -}} + {{- end -}} + {{- if .Values.env.configmap -}} + {{- range .Values.env.configmap }} + - name: {{ .name }} + valueFrom: + configMapKeyRef: + name: {{ $cfgname }} + key: {{ .key }} + {{- end -}} + {{- end }} + ports: + - name: http + containerPort: 80 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + diff --git a/deploy/k8s/archived/helm/webhooks-web/templates/ingress.yaml b/deploy/k8s/archived/helm/webhooks-web/templates/ingress.yaml new file mode 100644 index 000000000..1e5df8c45 --- /dev/null +++ b/deploy/k8s/archived/helm/webhooks-web/templates/ingress.yaml @@ -0,0 +1,45 @@ +{{- if .Values.ingress.enabled -}} +{{- $ingressPath := include "pathBase" . -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ template "webhooks-web.fullname" . }} + labels: + app: {{ template "webhooks-web.name" . }} + chart: {{ template "webhooks-web.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.ingress.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +{{- if and .Values.inf.tls.enabled .Values.inf.tls.issuer }} + cert-manager.io/issuer: {{ .Values.inf.tls.issuer }} +{{- end }} +{{- if .Values.inf.mesh.enabled }} +{{- with .Values.ingress.mesh.annotations }} +{{ toYaml . | indent 4 }} +{{- end }} +{{- end }} +spec: +{{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} +{{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ . }} + http: + paths: + - path: {{ $ingressPath }} + backend: + serviceName: {{ $.Values.app.svc.webhooksweb }} + servicePort: http + {{- end }} +{{- end }} diff --git a/deploy/k8s/archived/helm/webhooks-web/templates/service.yaml b/deploy/k8s/archived/helm/webhooks-web/templates/service.yaml new file mode 100644 index 000000000..873ebcc0e --- /dev/null +++ b/deploy/k8s/archived/helm/webhooks-web/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.app.svc.webhooksweb }} + labels: + app: {{ template "webhooks-web.name" . }} + chart: {{ template "webhooks-web.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + app: {{ template "webhooks-web.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/webhooks-web/values.yaml b/deploy/k8s/archived/helm/webhooks-web/values.yaml new file mode 100644 index 000000000..0e5b04b57 --- /dev/null +++ b/deploy/k8s/archived/helm/webhooks-web/values.yaml @@ -0,0 +1,52 @@ +replicaCount: 1 +clusterName: eshop-aks +pathBase: /webhooks-web + +image: + repository: eshop/webhooks.client + tag: latest + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: true + annotations: {} + hosts: + - chart-example.local + tls: [] + +resources: {} + + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +# env defines the environment variables that will be declared in the pod +env: + urls: + # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). + configmap: + - name: WebhooksUrl + key: urls__webhooks + - name: IdentityUrl + key: identity_e + - name: CallbackUrl + key: webhooksweb_e + - name: SelfUrl + key: webhooksweb_e + # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) + values: + - name: ASPNETCORE_ENVIRONMENT + value: Production + - name: OrchestratorType + value: 'K8S' + - name: Token + value: "WebHooks-Demo-Web" # Can use whatever you want + + diff --git a/deploy/k8s/archived/helm/webmvc/.helmignore b/deploy/k8s/archived/helm/webmvc/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/webmvc/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/webmvc/Chart.yaml b/deploy/k8s/archived/helm/webmvc/Chart.yaml new file mode 100644 index 000000000..c63e8924a --- /dev/null +++ b/deploy/k8s/archived/helm/webmvc/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: webmvc +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/webmvc/templates/NOTES.txt b/deploy/k8s/archived/helm/webmvc/templates/NOTES.txt new file mode 100644 index 000000000..06e02a45d --- /dev/null +++ b/deploy/k8s/archived/helm/webmvc/templates/NOTES.txt @@ -0,0 +1,2 @@ +eShop WebMVC installed. +----------------------- diff --git a/deploy/k8s/archived/helm/webmvc/templates/_helpers.tpl b/deploy/k8s/archived/helm/webmvc/templates/_helpers.tpl new file mode 100644 index 000000000..2e3bcef56 --- /dev/null +++ b/deploy/k8s/archived/helm/webmvc/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "webmvc.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "webmvc.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "webmvc.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/webmvc/templates/_names.tpl b/deploy/k8s/archived/helm/webmvc/templates/_names.tpl new file mode 100644 index 000000000..605e92e7e --- /dev/null +++ b/deploy/k8s/archived/helm/webmvc/templates/_names.tpl @@ -0,0 +1,60 @@ +{{- define "suffix-name" -}} +{{- if .Values.app.name -}} +{{- .Values.app.name -}} +{{- else -}} +{{- .Release.Name -}} +{{- end -}} +{{- end -}} + +{{- define "sql-name" -}} +{{- if .Values.inf.sql.host -}} +{{- .Values.inf.sql.host -}} +{{- else -}} +{{- printf "%s" "sql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "nosql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "url-of" -}} +{{- $name := first .}} +{{- $ctx := last .}} +{{- if eq $name "" -}} +{{- $ctx.Values.inf.k8s.dns -}} +{{- else -}} +{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} +{{- end -}} +{{- end -}} + + + +{{- define "pathBase" -}} +{{- if .Values.inf.k8s.suffix -}} +{{- $suffix := include "suffix-name" . -}} +{{- printf "%s-%s" .Values.pathBase $suffix -}} +{{- else -}} +{{- .Values.pathBase -}} +{{- end -}} +{{- end -}} + +{{- define "fqdn-image" -}} +{{- if .Values.inf.registry -}} +{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} +{{- else -}} +{{- .Values.image.repository -}} +{{- end -}} +{{- end -}} + +{{- define "protocol" -}} +{{- if .Values.inf.tls.enabled -}} +{{- printf "%s" "https" -}} +{{- else -}} +{{- printf "%s" "http" -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/webmvc/templates/configmap.yaml b/deploy/k8s/archived/helm/webmvc/templates/configmap.yaml new file mode 100644 index 000000000..2aa06fc7f --- /dev/null +++ b/deploy/k8s/archived/helm/webmvc/templates/configmap.yaml @@ -0,0 +1,26 @@ +{{- $name := include "webmvc.fullname" . -}} +{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} +{{- $webshoppingapigw := include "url-of" (list .Values.app.ingress.entries.webshoppingapigw .) -}} +{{- $mvc := include "url-of" (list .Values.app.ingress.entries.mvc .) -}} +{{- $protocol := include "protocol" . -}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: "cfg-{{ $name }}" + labels: + app: {{ template "webmvc.name" . }} + chart: {{ template "webmvc.chart" .}} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" + all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" + all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" + webmvc__keystore: {{ .Values.inf.redis.keystore.constr }} + internalurls__apigwws: http://{{ .Values.app.svc.webshoppingapigw }} + internalurls__apigwwm: http://{{ .Values.app.svc.webmarketingapigw }} + internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc + urls__apigwws: {{ $protocol }}://{{ $webshoppingapigw }} + urls__mvc: {{ $protocol }}://{{ $mvc }} + urls__IdentityUrl: {{ $protocol }}://{{ $identity }} diff --git a/deploy/k8s/archived/helm/webmvc/templates/deployment.yaml b/deploy/k8s/archived/helm/webmvc/templates/deployment.yaml new file mode 100644 index 000000000..2889dc757 --- /dev/null +++ b/deploy/k8s/archived/helm/webmvc/templates/deployment.yaml @@ -0,0 +1,75 @@ +{{- $name := include "webmvc.fullname" . -}} +{{- $cfgname := printf "%s-%s" "cfg" $name -}} +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "webmvc.fullname" . }} + labels: + ufo: {{ $cfgname}} + app: {{ template "webmvc.name" . }} + chart: {{ template "webmvc.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "webmvc.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "webmvc.name" . }} + release: {{ .Release.Name }} + {{ if .Values.inf.mesh.enabled -}} + annotations: + linkerd.io/inject: enabled + {{- end }} + spec: + {{ if .Values.inf.registry -}} + imagePullSecrets: + - name: {{ .Values.inf.registry.secretName }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: PATH_BASE + value: {{ include "pathBase" . }} + - name: k8sname + value: {{ .Values.clusterName }} + {{- if .Values.env.values -}} + {{- range .Values.env.values }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end -}} + {{- end -}} + {{- if .Values.env.configmap -}} + {{- range .Values.env.configmap }} + - name: {{ .name }} + valueFrom: + configMapKeyRef: + name: {{ $cfgname }} + key: {{ .key }} + {{- end -}} + {{- end }} + ports: + - name: http + containerPort: 80 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + diff --git a/deploy/k8s/archived/helm/webmvc/templates/ingress-dockerk8s.yaml b/deploy/k8s/archived/helm/webmvc/templates/ingress-dockerk8s.yaml new file mode 100644 index 000000000..72e043039 --- /dev/null +++ b/deploy/k8s/archived/helm/webmvc/templates/ingress-dockerk8s.yaml @@ -0,0 +1,33 @@ +{{- if .Values.ingress.enabled -}} +{{- if .Values.inf.k8s.local -}} +{{- $ingressPath := include "pathBase" . -}} +{{- $serviceName := .Values.app.svc.mvc }} +{{- $name := include "webmvc.fullname" . -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ $name }}-local + labels: + app: {{ template "webmvc.name" . }} + chart: {{ template "webmvc.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.ingress.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +{{- if .Values.inf.mesh.enabled }} +{{- with .Values.ingress.mesh.annotations }} +{{ toYaml . | indent 4 }} +{{- end }} +{{- end }} +spec: + rules: + - http: + paths: + - backend: + serviceName: {{ $serviceName }} + servicePort: http + path: {{ $ingressPath }} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/webmvc/templates/ingress.yaml b/deploy/k8s/archived/helm/webmvc/templates/ingress.yaml new file mode 100644 index 000000000..1899f5a18 --- /dev/null +++ b/deploy/k8s/archived/helm/webmvc/templates/ingress.yaml @@ -0,0 +1,46 @@ +{{- if .Values.ingress.enabled -}} +{{- $ingressPath := include "pathBase" . -}} +{{- $serviceName := .Values.app.svc.mvc -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ template "webmvc.fullname" . }} + labels: + app: {{ template "webmvc.name" . }} + chart: {{ template "webmvc.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.ingress.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +{{- if and .Values.inf.tls.enabled .Values.inf.tls.issuer }} + cert-manager.io/issuer: {{ .Values.inf.tls.issuer }} +{{- end }} +{{- if .Values.inf.mesh.enabled }} +{{- with .Values.ingress.mesh.annotations }} +{{ toYaml . | indent 4 }} +{{- end }} +{{- end }} +spec: +{{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} +{{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ . }} + http: + paths: + - path: {{ $ingressPath }} + backend: + serviceName: {{ $serviceName }} + servicePort: http + {{- end }} +{{- end }} diff --git a/deploy/k8s/archived/helm/webmvc/templates/service.yaml b/deploy/k8s/archived/helm/webmvc/templates/service.yaml new file mode 100644 index 000000000..74d87673f --- /dev/null +++ b/deploy/k8s/archived/helm/webmvc/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.app.svc.mvc }} + labels: + app: {{ template "webmvc.name" . }} + chart: {{ template "webmvc.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + app: {{ template "webmvc.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/webmvc/values.yaml b/deploy/k8s/archived/helm/webmvc/values.yaml new file mode 100644 index 000000000..973f187f5 --- /dev/null +++ b/deploy/k8s/archived/helm/webmvc/values.yaml @@ -0,0 +1,61 @@ +replicaCount: 1 +clusterName: eshop-aks +pathBase: /webmvc + +image: + repository: eshop/webmvc + tag: latest + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: true + annotations: {} + tls: [] + +resources: {} + + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +# env defines the environment variables that will be declared in the pod +env: + urls: + # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). + configmap: + - name: ApplicationInsights__InstrumentationKey + key: all__InstrumentationKey + - name: UseLoadTest + key: all_EnableLoadTest + - name: DPConnectionString + key: webmvc__keystore + - name: PurchaseUrl + key: internalurls__apigwws + - name: ExternalPurchaseUrl + key: urls__apigwws + - name: CallBackUrl + key: urls__mvc + - name: IdentityUrl + key: urls__IdentityUrl + - name: MarketingUrl + key: internalurls__apigwwm + - name: IdentityUrlHC + key: internalurls__identity__hc + - name: SignalrHubUrl + key: urls__apigwws + # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) + values: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: OrchestratorType + value: 'K8S' + - name: IsClusterEnv + value: 'True' + diff --git a/deploy/k8s/archived/helm/webshoppingagg/.helmignore b/deploy/k8s/archived/helm/webshoppingagg/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/webshoppingagg/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/webshoppingagg/Chart.yaml b/deploy/k8s/archived/helm/webshoppingagg/Chart.yaml new file mode 100644 index 000000000..cd7541025 --- /dev/null +++ b/deploy/k8s/archived/helm/webshoppingagg/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: webshoppingagg +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/webshoppingagg/templates/NOTES.txt b/deploy/k8s/archived/helm/webshoppingagg/templates/NOTES.txt new file mode 100644 index 000000000..f55946f36 --- /dev/null +++ b/deploy/k8s/archived/helm/webshoppingagg/templates/NOTES.txt @@ -0,0 +1,8 @@ +eShop Web Shopping Aggregator installed. +---------------------------------------- + +This API is not directly exposed outside cluster. If need to access it use: + +export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "webshoppingagg.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") +echo "Visit http://127.0.0.1:8080 to use your application" +kubectl port-forward $POD_NAME 8080:80 diff --git a/deploy/k8s/archived/helm/webshoppingagg/templates/_helpers.tpl b/deploy/k8s/archived/helm/webshoppingagg/templates/_helpers.tpl new file mode 100644 index 000000000..f13dc791d --- /dev/null +++ b/deploy/k8s/archived/helm/webshoppingagg/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "webshoppingagg.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "webshoppingagg.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "webshoppingagg.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/webshoppingagg/templates/_names.tpl b/deploy/k8s/archived/helm/webshoppingagg/templates/_names.tpl new file mode 100644 index 000000000..d44859fea --- /dev/null +++ b/deploy/k8s/archived/helm/webshoppingagg/templates/_names.tpl @@ -0,0 +1,52 @@ +{{- define "suffix-name" -}} +{{- if .Values.app.name -}} +{{- .Values.app.name -}} +{{- else -}} +{{- .Release.Name -}} +{{- end -}} +{{- end -}} + +{{- define "sql-name" -}} +{{- if .Values.inf.sql.host -}} +{{- .Values.inf.sql.host -}} +{{- else -}} +{{- printf "%s" "sql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "nosql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "url-of" -}} +{{- $name := first .}} +{{- $ctx := last .}} +{{- if eq $name "" -}} +{{- $ctx.Values.inf.k8s.dns -}} +{{- else -}} +{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} +{{- end -}} +{{- end -}} + + + +{{- define "pathBase" -}} +{{- if .Values.inf.k8s.suffix -}} +{{- $suffix := include "suffix-name" . -}} +{{- printf "%s-%s" .Values.pathBase $suffix -}} +{{- else -}} +{{- .Values.pathBase -}} +{{- end -}} +{{- end -}} + +{{- define "fqdn-image" -}} +{{- if .Values.inf.registry -}} +{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} +{{- else -}} +{{- .Values.image.repository -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/webshoppingagg/templates/configmap.yaml b/deploy/k8s/archived/helm/webshoppingagg/templates/configmap.yaml new file mode 100644 index 000000000..d01de8dcd --- /dev/null +++ b/deploy/k8s/archived/helm/webshoppingagg/templates/configmap.yaml @@ -0,0 +1,29 @@ +{{- $name := include "webshoppingagg.fullname" . -}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: "cfg-{{ $name }}" + labels: + app: {{ template "webshoppingagg.name" . }} + chart: {{ template "webshoppingagg.chart" .}} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" + all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" + webshoppingagg__keystore: {{ .Values.inf.redis.keystore.constr }} + internalurls__basket: http://{{ .Values.app.svc.basket }} + internalurls__catalog: http://{{ .Values.app.svc.catalog }} + internalurls__identity: http://{{ .Values.app.svc.identity }} + internalurls__ordering: http://{{ .Values.app.svc.ordering }} + internalurls__basket__hc: http://{{ .Values.app.svc.basket }}/hc + internalurls__catalog__hc: http://{{ .Values.app.svc.catalog }}/hc + internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc + internalurls__ordering__hc: http://{{ .Values.app.svc.ordering }}/hc + internalurls__marketing__hc: http://{{ .Values.app.svc.marketing }}/hc + internalurls__payment__hc: http://{{ .Values.app.svc.payment }}/hc + internalurls__location__hc: http://{{ .Values.app.svc.locations }}/hc + internalurls__grpcBasket: "http://{{ .Values.app.svc.basket }}:{{ .Values.service.grpcPort }}" + internalurls__grpcCatalog: "http://{{ .Values.app.svc.catalog }}:{{ .Values.service.grpcPort }}" + internalurls__grpcOrdering: "http://{{ .Values.app.svc.ordering }}:{{ .Values.service.grpcPort }}" diff --git a/deploy/k8s/archived/helm/webshoppingagg/templates/deployment.yaml b/deploy/k8s/archived/helm/webshoppingagg/templates/deployment.yaml new file mode 100644 index 000000000..ab5bfc0c9 --- /dev/null +++ b/deploy/k8s/archived/helm/webshoppingagg/templates/deployment.yaml @@ -0,0 +1,95 @@ +{{- $name := include "webshoppingagg.fullname" . -}} +{{- $cfgname := printf "%s-%s" "cfg" $name -}} +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "webshoppingagg.fullname" . }} + labels: + app: {{ template "webshoppingagg.name" . }} + chart: {{ template "webshoppingagg.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "webshoppingagg.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "webshoppingagg.name" . }} + release: {{ .Release.Name }} + {{ if .Values.inf.mesh.enabled -}} + annotations: + linkerd.io/inject: enabled + {{- end }} + spec: + {{ if .Values.inf.registry -}} + imagePullSecrets: + - name: {{ .Values.inf.registry.secretName }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + {{ if .Values.probes -}} + {{- if .Values.probes.liveness -}} + livenessProbe: + httpGet: + port: {{ .Values.probes.liveness.port }} + path: {{ .Values.probes.liveness.path }} + initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.liveness.periodSeconds }} + {{- end -}} + {{- end -}} + {{- if .Values.probes -}} + {{- if .Values.probes.readiness }} + readinessProbe: + httpGet: + port: {{ .Values.probes.readiness.port }} + path: {{ .Values.probes.readiness.path }} + initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.probes.readiness.periodSeconds }} + timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} + {{- end -}} + {{- end }} + image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: PATH_BASE + value: {{ include "pathBase" . }} + - name: k8sname + value: {{ .Values.clusterName }} + {{- if .Values.env.values -}} + {{- range .Values.env.values }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end -}} + {{- end -}} + {{- if .Values.env.configmap -}} + {{- range .Values.env.configmap }} + - name: {{ .name }} + valueFrom: + configMapKeyRef: + name: {{ $cfgname }} + key: {{ .key }} + {{- end -}} + {{- end }} + ports: + - name: http + containerPort: 80 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + diff --git a/deploy/k8s/archived/helm/webshoppingagg/templates/service.yaml b/deploy/k8s/archived/helm/webshoppingagg/templates/service.yaml new file mode 100644 index 000000000..8f0cb8bd5 --- /dev/null +++ b/deploy/k8s/archived/helm/webshoppingagg/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.app.svc.webshoppingagg }} + labels: + app: {{ template "webshoppingagg.name" . }} + chart: {{ template "webshoppingagg.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + app: {{ template "webshoppingagg.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/webshoppingagg/values.yaml b/deploy/k8s/archived/helm/webshoppingagg/values.yaml new file mode 100644 index 000000000..15501c727 --- /dev/null +++ b/deploy/k8s/archived/helm/webshoppingagg/values.yaml @@ -0,0 +1,87 @@ +replicaCount: 1 +clusterName: eshop-aks +pathBase: /webshoppingagg + +image: + repository: eshop/webshoppingagg + tag: latest + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 80 + grpcPort: 81 + +ingress: + enabled: false + annotations: {} + tls: [] + +resources: {} + + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +# env defines the environment variables that will be declared in the pod +env: + urls: + # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). + configmap: + - name: ApplicationInsights__InstrumentationKey + key: all__InstrumentationKey + - name: urls__basket + key: internalurls__basket + - name: urls__catalog + key: internalurls__catalog + - name: urls__orders + key: internalurls__ordering + - name: urls__identity + key: internalurls__identity + - name: CatalogUrlHC + key: internalurls__catalog__hc + - name: BasketUrlHC + key: internalurls__basket__hc + - name: IdentityUrlHC + key: internalurls__identity__hc + - name: OrderingUrlHC + key: internalurls__ordering__hc + - name: MarketingUrlHC + key: internalurls__marketing__hc + - name: PaymentUrlHC + key: internalurls__payment__hc + - name: LocationUrlHC + key: internalurls__location__hc + - name: urls__grpcBasket + key: internalurls__grpcBasket + - name: urls__grpcCatalog + key: internalurls__grpcCatalog + - name: urls__grpcOrdering + key: internalurls__grpcOrdering + + # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) + values: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: OrchestratorType + value: 'K8S' + - name: IsClusterEnv + value: 'True' +probes: + liveness: + path: /liveness + initialDelaySeconds: 10 + periodSeconds: 15 + port: 80 + readiness: + path: /hc + timeoutSeconds: 5 + initialDelaySeconds: 90 + periodSeconds: 60 + port: 80 + diff --git a/deploy/k8s/archived/helm/webspa/.helmignore b/deploy/k8s/archived/helm/webspa/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/webspa/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/webspa/Chart.yaml b/deploy/k8s/archived/helm/webspa/Chart.yaml new file mode 100644 index 000000000..c16616489 --- /dev/null +++ b/deploy/k8s/archived/helm/webspa/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: webspa +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/webspa/templates/NOTES.txt b/deploy/k8s/archived/helm/webspa/templates/NOTES.txt new file mode 100644 index 000000000..c8e1622db --- /dev/null +++ b/deploy/k8s/archived/helm/webspa/templates/NOTES.txt @@ -0,0 +1,2 @@ +eShop WebSPA installed +---------------------- \ No newline at end of file diff --git a/deploy/k8s/archived/helm/webspa/templates/_helpers.tpl b/deploy/k8s/archived/helm/webspa/templates/_helpers.tpl new file mode 100644 index 000000000..585f9f001 --- /dev/null +++ b/deploy/k8s/archived/helm/webspa/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "webspa.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "webspa.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "webspa.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/webspa/templates/_names.tpl b/deploy/k8s/archived/helm/webspa/templates/_names.tpl new file mode 100644 index 000000000..605e92e7e --- /dev/null +++ b/deploy/k8s/archived/helm/webspa/templates/_names.tpl @@ -0,0 +1,60 @@ +{{- define "suffix-name" -}} +{{- if .Values.app.name -}} +{{- .Values.app.name -}} +{{- else -}} +{{- .Release.Name -}} +{{- end -}} +{{- end -}} + +{{- define "sql-name" -}} +{{- if .Values.inf.sql.host -}} +{{- .Values.inf.sql.host -}} +{{- else -}} +{{- printf "%s" "sql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "nosql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "url-of" -}} +{{- $name := first .}} +{{- $ctx := last .}} +{{- if eq $name "" -}} +{{- $ctx.Values.inf.k8s.dns -}} +{{- else -}} +{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} +{{- end -}} +{{- end -}} + + + +{{- define "pathBase" -}} +{{- if .Values.inf.k8s.suffix -}} +{{- $suffix := include "suffix-name" . -}} +{{- printf "%s-%s" .Values.pathBase $suffix -}} +{{- else -}} +{{- .Values.pathBase -}} +{{- end -}} +{{- end -}} + +{{- define "fqdn-image" -}} +{{- if .Values.inf.registry -}} +{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} +{{- else -}} +{{- .Values.image.repository -}} +{{- end -}} +{{- end -}} + +{{- define "protocol" -}} +{{- if .Values.inf.tls.enabled -}} +{{- printf "%s" "https" -}} +{{- else -}} +{{- printf "%s" "http" -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/webspa/templates/configmap.yaml b/deploy/k8s/archived/helm/webspa/templates/configmap.yaml new file mode 100644 index 000000000..ecdbf8b63 --- /dev/null +++ b/deploy/k8s/archived/helm/webspa/templates/configmap.yaml @@ -0,0 +1,27 @@ +{{- $name := include "webspa.fullname" . -}} +{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} +{{- $webshoppingapigw := include "url-of" (list .Values.app.ingress.entries.webshoppingapigw .) -}} +{{- $webmarketingapigw := include "url-of" (list .Values.app.ingress.entries.webmarketingapigw .) -}} +{{- $spa := include "url-of" (list .Values.app.ingress.entries.spa .) -}} +{{- $mongo := include "mongo-name" . -}} +{{- $protocol := include "protocol" . -}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: "cfg-{{ $name }}" + labels: + app: {{ template "webspa.name" . }} + chart: {{ template "webspa.chart" .}} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" + all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" + webspa__keystore: {{ .Values.inf.redis.keystore.constr }} + internalurls__apigwws: http://{{ .Values.app.svc.webshoppingapigw }} + internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc + urls__apigwws: {{ $protocol }}://{{ $webshoppingapigw }} + urls__spa: {{ $protocol }}://{{ $spa }} + urls__IdentityUrl: {{ $protocol }}://{{ $identity }} + urls__apigwwm: {{ $protocol }}://{{ $webmarketingapigw }} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/webspa/templates/deployment.yaml b/deploy/k8s/archived/helm/webspa/templates/deployment.yaml new file mode 100644 index 000000000..20dc696bf --- /dev/null +++ b/deploy/k8s/archived/helm/webspa/templates/deployment.yaml @@ -0,0 +1,75 @@ +{{- $name := include "webspa.fullname" . -}} +{{- $cfgname := printf "%s-%s" "cfg" $name -}} +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "webspa.fullname" . }} + labels: + ufo: {{ $cfgname}} + app: {{ template "webspa.name" . }} + chart: {{ template "webspa.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "webspa.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "webspa.name" . }} + release: {{ .Release.Name }} + {{ if .Values.inf.mesh.enabled -}} + annotations: + linkerd.io/inject: enabled + {{- end }} + spec: + {{ if .Values.inf.registry -}} + imagePullSecrets: + - name: {{ .Values.inf.registry.secretName }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: PATH_BASE + value: {{ include "pathBase" . }} + - name: k8sname + value: {{ .Values.clusterName }} + {{- if .Values.env.values -}} + {{- range .Values.env.values }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end -}} + {{- end -}} + {{- if .Values.env.configmap -}} + {{- range .Values.env.configmap }} + - name: {{ .name }} + valueFrom: + configMapKeyRef: + name: {{ $cfgname }} + key: {{ .key }} + {{- end -}} + {{- end }} + ports: + - name: http + containerPort: 80 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + diff --git a/deploy/k8s/archived/helm/webspa/templates/ingress.yaml b/deploy/k8s/archived/helm/webspa/templates/ingress.yaml new file mode 100644 index 000000000..2b9fdd703 --- /dev/null +++ b/deploy/k8s/archived/helm/webspa/templates/ingress.yaml @@ -0,0 +1,45 @@ +{{- if .Values.ingress.enabled -}} +{{- $ingressPath := include "pathBase" . -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ template "webspa.fullname" . }} + labels: + app: {{ template "webspa.name" . }} + chart: {{ template "webspa.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.ingress.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +{{- if and .Values.inf.tls.enabled .Values.inf.tls.issuer }} + cert-manager.io/issuer: {{ .Values.inf.tls.issuer }} +{{- end }} +{{- if .Values.inf.mesh.enabled }} +{{- with .Values.ingress.mesh.annotations }} +{{ toYaml . | indent 4 }} +{{- end }} +{{- end }} +spec: +{{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} +{{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ . }} + http: + paths: + - path: {{ $ingressPath }} + backend: + serviceName: {{ $.Values.app.svc.spa }} + servicePort: http + {{- end }} +{{- end }} diff --git a/deploy/k8s/archived/helm/webspa/templates/service.yaml b/deploy/k8s/archived/helm/webspa/templates/service.yaml new file mode 100644 index 000000000..2eab5d02e --- /dev/null +++ b/deploy/k8s/archived/helm/webspa/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.app.svc.spa }} + labels: + app: {{ template "webspa.name" . }} + chart: {{ template "webspa.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + app: {{ template "webspa.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/webspa/values.yaml b/deploy/k8s/archived/helm/webspa/values.yaml new file mode 100644 index 000000000..e1547ed39 --- /dev/null +++ b/deploy/k8s/archived/helm/webspa/values.yaml @@ -0,0 +1,61 @@ +replicaCount: 1 +clusterName: eshop-aks +pathBase: / + +image: + repository: eshop/webspa + tag: latest + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: true + annotations: {} + tls: [] + +resources: {} + + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +# env defines the environment variables that will be declared in the pod +env: + urls: + # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). + configmap: + - name: ApplicationInsights__InstrumentationKey + key: all__InstrumentationKey + - name: UseLoadTest + key: all_EnableLoadTest + - name: DPConnectionString + key: webspa__keystore + - name: PurchaseUrl + key: urls__apigwws + - name: CallBackUrl + key: urls__spa + - name: IdentityUrl + key: urls__IdentityUrl + - name: MarketingUrl + key: urls__apigwwm + - name: IdentityUrlHC + key: internalurls__identity__hc + - name: SignalrHubUrl + key: urls__apigwws + # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) + values: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: ASPNETCORE_URLS + value: http://0.0.0.0:80 + - name: OrchestratorType + value: 'K8S' + - name: IsClusterEnv + value: 'True' + diff --git a/deploy/k8s/archived/helm/webstatus/.helmignore b/deploy/k8s/archived/helm/webstatus/.helmignore new file mode 100644 index 000000000..f0c131944 --- /dev/null +++ b/deploy/k8s/archived/helm/webstatus/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/deploy/k8s/archived/helm/webstatus/Chart.yaml b/deploy/k8s/archived/helm/webstatus/Chart.yaml new file mode 100644 index 000000000..9ee2783f4 --- /dev/null +++ b/deploy/k8s/archived/helm/webstatus/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: webstatus +version: 0.1.0 diff --git a/deploy/k8s/archived/helm/webstatus/templates/NOTES.txt b/deploy/k8s/archived/helm/webstatus/templates/NOTES.txt new file mode 100644 index 000000000..5d9d4570d --- /dev/null +++ b/deploy/k8s/archived/helm/webstatus/templates/NOTES.txt @@ -0,0 +1,2 @@ +eShop WebStatus installed. +-------------------------- \ No newline at end of file diff --git a/deploy/k8s/archived/helm/webstatus/templates/_helpers.tpl b/deploy/k8s/archived/helm/webstatus/templates/_helpers.tpl new file mode 100644 index 000000000..65b290af7 --- /dev/null +++ b/deploy/k8s/archived/helm/webstatus/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "webstatus.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "webstatus.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "webstatus.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/deploy/k8s/archived/helm/webstatus/templates/_names.tpl b/deploy/k8s/archived/helm/webstatus/templates/_names.tpl new file mode 100644 index 000000000..49455d135 --- /dev/null +++ b/deploy/k8s/archived/helm/webstatus/templates/_names.tpl @@ -0,0 +1,50 @@ +{{- define "suffix-name" -}} +{{- if .Values.app.name -}} +{{- .Values.app.name -}} +{{- else -}} +{{- .Release.Name -}} +{{- end -}} +{{- end -}} + +{{- define "sql-name" -}} +{{- if .Values.inf.sql.host -}} +{{- .Values.inf.sql.host -}} +{{- else -}} +{{- printf "%s" "sql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "mongo-name" -}} +{{- if .Values.inf.mongo.host -}} +{{- .Values.inf.mongo.host -}} +{{- else -}} +{{- printf "%s" "nosql-data" -}} +{{- end -}} +{{- end -}} + +{{- define "url-of" -}} +{{- $name := first .}} +{{- $ctx := last .}} +{{- if eq $name "" -}} +{{- $ctx.Values.inf.k8s.dns -}} +{{- else -}} +{{- printf "%s/%s" $ctx.Values.inf.k8s.dns $name -}} {{/*Value is just / */}} +{{- end -}} +{{- end -}} + +{{- define "pathBase" -}} +{{- if .Values.inf.k8s.suffix -}} +{{- $suffix := include "suffix-name" . -}} +{{- printf "%s-%s" .Values.pathBase $suffix -}} +{{- else -}} +{{- .Values.pathBase -}} +{{- end -}} +{{- end -}} + +{{- define "fqdn-image" -}} +{{- if .Values.inf.registry -}} +{{- printf "%s/%s" .Values.inf.registry.server .Values.image.repository -}} +{{- else -}} +{{- .Values.image.repository -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/deploy/k8s/archived/helm/webstatus/templates/configmap.yaml b/deploy/k8s/archived/helm/webstatus/templates/configmap.yaml new file mode 100644 index 000000000..bf40d2a7d --- /dev/null +++ b/deploy/k8s/archived/helm/webstatus/templates/configmap.yaml @@ -0,0 +1,54 @@ +{{- $name := include "webstatus.fullname" . -}} +{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}} +{{- $webshoppingapigw := include "url-of" (list .Values.app.ingress.entries.webshoppingapigw .) -}} +{{- $mvc := include "url-of" (list .Values.app.ingress.entries.mvc .) -}} +{{- $mongo := include "mongo-name" . -}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: "cfg-{{ $name }}" + labels: + app: {{ template "webstatus.name" . }} + chart: {{ template "webstatus.chart" .}} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +data: + all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}" + all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}" + all_EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}" + webstatus__keystore: {{ .Values.inf.redis.keystore.constr }} + name__mvc__hc: WebMVC HTTP Check + internalurls__mvc__hc: http://{{ .Values.app.svc.mvc }}/hc + name__spa__hc: WebSPA HTTP Check + internalurls__spa__hc: http://{{ .Values.app.svc.spa }}/hc + name__apigwws__hc: Web Shopping API GW HTTP Check + internalurls__apigwws__hc: http://{{ .Values.app.svc.webshoppingapigw }}:8001/ready + name__apigwwm__hc: Web Marketing API GW HTTP Check + internalurls__apigwwm__hc: http://{{ .Values.app.svc.webmarketingapigw }}:8001/ready + name__apigwms__hc: Mobile Shopping API GW HTTP Check + internalurls__apigwms__hc: http://{{ .Values.app.svc.mobileshoppingapigw }}:8001/ready + name__apigwmm__hc: Mobile Marketing API GW HTTP Check + internalurls__apigwmm__hc: http://{{ .Values.app.svc.mobilemarketingapigw }}:8001/ready + name__apigwwsagg__hc: Web Shopping Aggregator GW HTTP Check + internalurls__apigwwsagg__hc: http://{{ .Values.app.svc.webshoppingagg }}/hc + name__apigwmsagg__hc: Mobile Shopping Aggregator HTTP Check + internalurls__apigwmsagg__hc: http://{{ .Values.app.svc.mobileshoppingagg }}/hc + name__ordering__hc: Ordering HTTP Check + internalurls__ordering__hc: http://{{ .Values.app.svc.ordering }}/hc + name__orderingbackground__hc: Ordering HTTP Background Check + internalurls__orderingbackground__hc: http://{{ .Values.app.svc.orderingbackgroundtasks }}/hc + name__basket__hc: Basket HTTP Check + internalurls__basket__hc: http://{{ .Values.app.svc.basket }}/hc + name__catalog__hc: Catalog HTTP Check + internalurls__catalog__hc: http://{{ .Values.app.svc.catalog }}/hc + name__identity__hc: Identity HTTP Check + internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc + name__marketing__hc: Marketing HTTP Check + internalurls__marketing__hc: http://{{ .Values.app.svc.marketing }}/hc + name__locations__hc: Locations HTTP Check + internalurls__locations__hc: http://{{ .Values.app.svc.locations }}/hc + name__payment__hc: Payment HTTP Check + internalurls__payment__hc: http://{{ .Values.app.svc.payment }}/hc + name__signalrhub__hc: Ordering SignalR Hub HTTP Check + internalurls__signalrhub__hc: http://{{ .Values.app.svc.orderingsignalrhub }}/hc diff --git a/deploy/k8s/archived/helm/webstatus/templates/deployment.yaml b/deploy/k8s/archived/helm/webstatus/templates/deployment.yaml new file mode 100644 index 000000000..70b953577 --- /dev/null +++ b/deploy/k8s/archived/helm/webstatus/templates/deployment.yaml @@ -0,0 +1,75 @@ +{{- $name := include "webstatus.fullname" . -}} +{{- $cfgname := printf "%s-%s" "cfg" $name -}} +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + name: {{ template "webstatus.fullname" . }} + labels: + ufo: {{ $cfgname}} + app: {{ template "webstatus.name" . }} + chart: {{ template "webstatus.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "webstatus.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "webstatus.name" . }} + release: {{ .Release.Name }} + {{ if .Values.inf.mesh.enabled -}} + annotations: + linkerd.io/inject: enabled + {{- end }} + spec: + {{ if .Values.inf.registry -}} + imagePullSecrets: + - name: {{ .Values.inf.registry.secretName }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + image: "{{ template "fqdn-image" . }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: PATH_BASE + value: {{ include "pathBase" . }} + - name: k8sname + value: {{ .Values.clusterName }} + {{- if .Values.env.values -}} + {{- range .Values.env.values }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end -}} + {{- end -}} + {{- if .Values.env.configmap -}} + {{- range .Values.env.configmap }} + - name: {{ .name }} + valueFrom: + configMapKeyRef: + name: {{ $cfgname }} + key: {{ .key }} + {{- end -}} + {{- end }} + ports: + - name: http + containerPort: 80 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + diff --git a/deploy/k8s/archived/helm/webstatus/templates/ingress.yaml b/deploy/k8s/archived/helm/webstatus/templates/ingress.yaml new file mode 100644 index 000000000..9902b86b5 --- /dev/null +++ b/deploy/k8s/archived/helm/webstatus/templates/ingress.yaml @@ -0,0 +1,46 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "webstatus.fullname" . -}} +{{- $ingressPath := include "pathBase" . -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ template "webstatus.fullname" . }} + labels: + app: {{ template "webstatus.name" . }} + chart: {{ template "webstatus.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.ingress.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +{{- if and .Values.inf.tls.enabled .Values.inf.tls.issuer }} + cert-manager.io/issuer: {{ .Values.inf.tls.issuer }} +{{- end }} +{{- if .Values.inf.mesh.enabled }} +{{- with .Values.ingress.mesh.annotations }} +{{ toYaml . | indent 4 }} +{{- end }} +{{- end }} +spec: +{{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} +{{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ . }} + http: + paths: + - path: {{ $ingressPath }} + backend: + serviceName: {{ $.Values.app.svc.status }} + servicePort: http + {{- end }} +{{- end }} diff --git a/deploy/k8s/archived/helm/webstatus/templates/service.yaml b/deploy/k8s/archived/helm/webstatus/templates/service.yaml new file mode 100644 index 000000000..37fff50c6 --- /dev/null +++ b/deploy/k8s/archived/helm/webstatus/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.app.svc.status }} + labels: + app: {{ template "webstatus.name" . }} + chart: {{ template "webstatus.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + app: {{ template "webstatus.name" . }} + release: {{ .Release.Name }} diff --git a/deploy/k8s/archived/helm/webstatus/values.yaml b/deploy/k8s/archived/helm/webstatus/values.yaml new file mode 100644 index 000000000..e5a23ec85 --- /dev/null +++ b/deploy/k8s/archived/helm/webstatus/values.yaml @@ -0,0 +1,95 @@ +replicaCount: 1 +clusterName: eshop-aks +pathBase: /webstatus + +image: + repository: eshop/webstatus + tag: latest + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: true + annotations: { + + } + tls: [] + +resources: {} + + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +# env defines the environment variables that will be declared in the pod +env: + urls: + # configmap declares variables which value is taken from the config map defined in template configmap.yaml (name is name of var and key the key in configmap). + configmap: + - name: ApplicationInsights__InstrumentationKey + key: all__InstrumentationKey + - name: HealthChecks-UI__HealthChecks__0__Name + key: name__mvc__hc + - name: HealthChecks-UI__HealthChecks__0__Uri + key: internalurls__mvc__hc + - name: HealthChecks-UI__HealthChecks__1__Name + key: name__spa__hc + - name: HealthChecks-UI__HealthChecks__1__Uri + key: internalurls__spa__hc + - name: HealthChecks-UI__HealthChecks__2__Name + key: name__apigwwsagg__hc + - name: HealthChecks-UI__HealthChecks__2__Uri + key: internalurls__apigwwsagg__hc + - name: HealthChecks-UI__HealthChecks__3__Name + key: name__apigwmsagg__hc + - name: HealthChecks-UI__HealthChecks__3__Uri + key: internalurls__apigwmsagg__hc + - name: HealthChecks-UI__HealthChecks__4__Name + key: name__ordering__hc + - name: HealthChecks-UI__HealthChecks__4__Uri + key: internalurls__ordering__hc + - name: HealthChecks-UI__HealthChecks__5__Name + key: name__basket__hc + - name: HealthChecks-UI__HealthChecks__5__Uri + key: internalurls__basket__hc + - name: HealthChecks-UI__HealthChecks__6__Name + key: name__catalog__hc + - name: HealthChecks-UI__HealthChecks__6__Uri + key: internalurls__catalog__hc + - name: HealthChecks-UI__HealthChecks__7__Name + key: name__identity__hc + - name: HealthChecks-UI__HealthChecks__7__Uri + key: internalurls__identity__hc + - name: HealthChecks-UI__HealthChecks__8__Name + key: name__marketing__hc + - name: HealthChecks-UI__HealthChecks__8__Uri + key: internalurls__marketing__hc + - name: HealthChecks-UI__HealthChecks__9__Name + key: name__locations__hc + - name: HealthChecks-UI__HealthChecks__9__Uri + key: internalurls__locations__hc + - name: HealthChecks-UI__HealthChecks__10__Name + key: name__payment__hc + - name: HealthChecks-UI__HealthChecks__10__Uri + key: internalurls__payment__hc + - name: HealthChecks-UI__HealthChecks__11__Name + key: name__signalrhub__hc + - name: HealthChecks-UI__HealthChecks__11__Uri + key: internalurls__signalrhub__hc + - name: HealthChecks-UI__HealthChecks__12__Name + key: name__orderingbackground__hc + - name: HealthChecks-UI__HealthChecks__12__Uri + key: internalurls__orderingbackground__hc + + # values define environment variables with a fixed value (no configmap involved) (name is name of var, and value is its value) + values: + - name: ASPNETCORE_ENVIRONMENT + value: Development + - name: OrchestratorType + value: 'K8S' diff --git a/deploy/k8s/archived/linkerd/basket-api-sp.yaml b/deploy/k8s/archived/linkerd/basket-api-sp.yaml new file mode 100644 index 000000000..6b23bdb9f --- /dev/null +++ b/deploy/k8s/archived/linkerd/basket-api-sp.yaml @@ -0,0 +1,42 @@ +apiVersion: linkerd.io/v1alpha2 +kind: ServiceProfile +metadata: + creationTimestamp: null + name: basket-api.default.svc.cluster.local + namespace: default +spec: + routes: + - condition: + method: GET + pathRegex: /basket-api/api/v1/basket/[^/]* + name: GET Basket {id} + isRetryable: true + - condition: + method: GET + pathRegex: /hc + name: GET /hc + isRetryable: false + - condition: + method: GET + pathRegex: /liveness + name: GET /liveness + isRetryable: false + - condition: + method: POST + pathRegex: /BasketApi\.Basket/GetBasketById + name: POST /BasketApi.Basket/GetBasketById + isRetryable: true + - condition: + method: POST + pathRegex: /BasketApi\.Basket/UpdateBasket + name: POST /BasketApi.Basket/UpdateBasket + isRetryable: true + - condition: + method: POST + pathRegex: /basket-api/api/v1/basket/checkout + name: POST /v1/basket/checkout + isRetryable: true + retryBudget: + retryRatio: 0.2 + minRetriesPerSecond: 10 + ttl: 10s \ No newline at end of file diff --git a/deploy/k8s/archived/linkerd/catalog-api-sp.yaml b/deploy/k8s/archived/linkerd/catalog-api-sp.yaml new file mode 100644 index 000000000..6e9afa472 --- /dev/null +++ b/deploy/k8s/archived/linkerd/catalog-api-sp.yaml @@ -0,0 +1,47 @@ +apiVersion: linkerd.io/v1alpha2 +kind: ServiceProfile +metadata: + creationTimestamp: null + name: catalog-api.default.svc.cluster.local + namespace: default +spec: + routes: + - condition: + method: GET + pathRegex: /catalog-api/api/v1/catalog/catalogbrands + name: GET /v1/catalog/catalogbrands + isRetryable: true + - condition: + method: GET + pathRegex: /catalog-api/api/v1/catalog/catalogtypes + name: GET /v1/catalog/catalogtypes + isRetryable: true + - condition: + method: GET + pathRegex: /catalog-api/api/v1/catalog/items + name: GET /v1/catalog/items + isRetryable: true + - condition: + method: GET + pathRegex: /api/v1/catalog/items/[^/]*/pic/ + name: GET /v1/catalog/items/{id}/pic/ + isRetryable: false + - condition: + method: GET + pathRegex: /hc + name: GET /hc + isRetryable: false + - condition: + method: GET + pathRegex: /liveness + isRetryable: false + name: GET /liveness + - condition: + method: POST + pathRegex: /CatalogApi\.Catalog/GetItemsByIds + name: POST /CatalogApi.Catalog/GetItemsByIds + isRetryable: true + retryBudget: + retryRatio: 0.2 + minRetriesPerSecond: 10 + ttl: 10s \ No newline at end of file diff --git a/deploy/k8s/archived/nginx-ingress/local-cm.yaml b/deploy/k8s/archived/nginx-ingress/local-cm.yaml new file mode 100644 index 000000000..02906afc1 --- /dev/null +++ b/deploy/k8s/archived/nginx-ingress/local-cm.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + labels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx + name: nginx-configuration + namespace: ingress-nginx +data: + proxy-buffer-size: "128k" + proxy-buffers: "4 256k" \ No newline at end of file diff --git a/deploy/k8s/archived/nginx-ingress/local-dockerk8s/identityapi-cm-fix.yaml b/deploy/k8s/archived/nginx-ingress/local-dockerk8s/identityapi-cm-fix.yaml new file mode 100644 index 000000000..3a3fcf5a5 --- /dev/null +++ b/deploy/k8s/archived/nginx-ingress/local-dockerk8s/identityapi-cm-fix.yaml @@ -0,0 +1,3 @@ +data: + mvc_e: http://10.0.75.1/webmvc + \ No newline at end of file diff --git a/deploy/k8s/archived/nginx-ingress/local-dockerk8s/mvc-cm-fix.yaml b/deploy/k8s/archived/nginx-ingress/local-dockerk8s/mvc-cm-fix.yaml new file mode 100644 index 000000000..1475deec1 --- /dev/null +++ b/deploy/k8s/archived/nginx-ingress/local-dockerk8s/mvc-cm-fix.yaml @@ -0,0 +1,3 @@ +data: + urls__IdentityUrl: http://10.0.75.1/identity + urls__mvc: http://10.0.75.1/webmvc diff --git a/deploy/k8s/archived/nginx-ingress/local-dockerk8s/mvc-fix.yaml b/deploy/k8s/archived/nginx-ingress/local-dockerk8s/mvc-fix.yaml new file mode 100644 index 000000000..b9ecd4cba --- /dev/null +++ b/deploy/k8s/archived/nginx-ingress/local-dockerk8s/mvc-fix.yaml @@ -0,0 +1,39 @@ +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + annotations: + ingress.kubernetes.io/ssl-redirect: "false" + kubernetes.io/ingress.class: nginx + nginx.ingress.kubernetes.io/ssl-redirect: "false" + labels: + app: webmvc + name: eshop-webmvc-loopback + namespace: default +spec: + rules: + - http: + paths: + - backend: + serviceName: webmvc + servicePort: http + path: /webmvc +--- +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + annotations: + ingress.kubernetes.io/ssl-redirect: "false" + kubernetes.io/ingress.class: nginx + nginx.ingress.kubernetes.io/ssl-redirect: "false" + labels: + app: identity-api + name: eshop-identity-api-loopback + namespace: default +spec: + rules: + - http: + paths: + - backend: + serviceName: identity + servicePort: http + path: /identity \ No newline at end of file diff --git a/deploy/k8s/archived/nginx-ingress/local-svc.yaml b/deploy/k8s/archived/nginx-ingress/local-svc.yaml new file mode 100644 index 000000000..945441ab8 --- /dev/null +++ b/deploy/k8s/archived/nginx-ingress/local-svc.yaml @@ -0,0 +1,21 @@ +kind: Service +apiVersion: v1 +metadata: + name: ingress-nginx + namespace: ingress-nginx + labels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx +spec: + externalTrafficPolicy: Local + type: LoadBalancer + selector: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx + ports: + - name: http + port: 80 + targetPort: http + - name: https + port: 443 + targetPort: https \ No newline at end of file diff --git a/deploy/k8s/archived/nginx-ingress/mandatory.yaml b/deploy/k8s/archived/nginx-ingress/mandatory.yaml new file mode 100644 index 000000000..56b1cc3b5 --- /dev/null +++ b/deploy/k8s/archived/nginx-ingress/mandatory.yaml @@ -0,0 +1,238 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: ingress-nginx + +--- + +kind: ConfigMap +apiVersion: v1 +metadata: + name: nginx-configuration + namespace: ingress-nginx + labels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx + +--- + +apiVersion: v1 +kind: ServiceAccount +metadata: + name: nginx-ingress-serviceaccount + namespace: ingress-nginx + labels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx + +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRole +metadata: + name: nginx-ingress-clusterrole + labels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx +rules: + - apiGroups: + - "" + resources: + - configmaps + - endpoints + - nodes + - pods + - secrets + verbs: + - list + - watch + - apiGroups: + - "" + resources: + - nodes + verbs: + - get + - apiGroups: + - "" + resources: + - services + verbs: + - get + - list + - watch + - apiGroups: + - "extensions" + resources: + - ingresses + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - events + verbs: + - create + - patch + - apiGroups: + - "extensions" + resources: + - ingresses/status + verbs: + - update + +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: Role +metadata: + name: nginx-ingress-role + namespace: ingress-nginx + labels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx +rules: + - apiGroups: + - "" + resources: + - configmaps + - pods + - secrets + - namespaces + verbs: + - get + - apiGroups: + - "" + resources: + - configmaps + resourceNames: + # Defaults to "-" + # Here: "-" + # This has to be adapted if you change either parameter + # when launching the nginx-ingress-controller. + - "ingress-controller-leader-nginx" + verbs: + - get + - update + - apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - apiGroups: + - "" + resources: + - endpoints + verbs: + - get + +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: RoleBinding +metadata: + name: nginx-ingress-role-nisa-binding + namespace: ingress-nginx + labels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: nginx-ingress-role +subjects: + - kind: ServiceAccount + name: nginx-ingress-serviceaccount + namespace: ingress-nginx + +--- +apiVersion: rbac.authorization.k8s.io/v1beta1 +kind: ClusterRoleBinding +metadata: + name: nginx-ingress-clusterrole-nisa-binding + labels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: nginx-ingress-clusterrole +subjects: + - kind: ServiceAccount + name: nginx-ingress-serviceaccount + namespace: ingress-nginx + +--- + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: nginx-ingress-controller + namespace: ingress-nginx + labels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx + template: + metadata: + labels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx + annotations: + prometheus.io/port: "10254" + prometheus.io/scrape: "true" + spec: + serviceAccountName: nginx-ingress-serviceaccount + containers: + - name: nginx-ingress-controller + image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.20.0 + args: + - /nginx-ingress-controller + - --configmap=$(POD_NAMESPACE)/nginx-configuration + - --publish-service=$(POD_NAMESPACE)/ingress-nginx + - --annotations-prefix=nginx.ingress.kubernetes.io + securityContext: + capabilities: + drop: + - ALL + add: + - NET_BIND_SERVICE + # www-data -> 33 + runAsUser: 33 + env: + - name: POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + ports: + - name: http + containerPort: 80 + - name: https + containerPort: 443 + livenessProbe: + failureThreshold: 3 + httpGet: + path: /healthz + port: 10254 + scheme: HTTP + initialDelaySeconds: 10 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + readinessProbe: + failureThreshold: 3 + httpGet: + path: /healthz + port: 10254 + scheme: HTTP + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 diff --git a/deploy/k8s/archived/nginx-ingress/service-nodeport.yaml b/deploy/k8s/archived/nginx-ingress/service-nodeport.yaml new file mode 100644 index 000000000..dd82ed3ed --- /dev/null +++ b/deploy/k8s/archived/nginx-ingress/service-nodeport.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +kind: Service +metadata: + name: ingress-nginx + namespace: ingress-nginx + labels: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx +spec: + type: NodePort + ports: + - name: http + port: 80 + targetPort: 80 + protocol: TCP + - name: https + port: 443 + targetPort: 443 + protocol: TCP + selector: + app.kubernetes.io/name: ingress-nginx + app.kubernetes.io/part-of: ingress-nginx diff --git a/deploy/k8s/archived/nodeports/rabbitmq-admin.yaml b/deploy/k8s/archived/nodeports/rabbitmq-admin.yaml new file mode 100644 index 000000000..30d2facf1 --- /dev/null +++ b/deploy/k8s/archived/nodeports/rabbitmq-admin.yaml @@ -0,0 +1,12 @@ +kind: Service +apiVersion: v1 +metadata: + name: rabbitmq-admin +spec: + type: NodePort + selector: + app: rabbitmq + ports: + - port: 15672 + nodePort: 31672 + name: rabbitmq-port diff --git a/deploy/k8s/archived/nodeports/sql-service.yaml b/deploy/k8s/archived/nodeports/sql-service.yaml new file mode 100644 index 000000000..7b0233b68 --- /dev/null +++ b/deploy/k8s/archived/nodeports/sql-service.yaml @@ -0,0 +1,12 @@ +kind: Service +apiVersion: v1 +metadata: + name: sql-service +spec: + type: NodePort + selector: + app: sql-data + ports: + - port: 1433 + nodePort: 31433 + name: sql-port diff --git a/deploy/k8s/helm/apigwmm/templates/deployment.yaml b/deploy/k8s/helm/apigwmm/templates/deployment.yaml index f93706bb9..70b4ffa8f 100644 --- a/deploy/k8s/helm/apigwmm/templates/deployment.yaml +++ b/deploy/k8s/helm/apigwmm/templates/deployment.yaml @@ -1,7 +1,7 @@ {{- $name := include "apigwmm.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} {{- $envoycfgname := printf "%s-%s" "envoy" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "apigwmm.fullname" . }} diff --git a/deploy/k8s/helm/apigwms/templates/deployment.yaml b/deploy/k8s/helm/apigwms/templates/deployment.yaml index 2c5703103..c62751f1c 100644 --- a/deploy/k8s/helm/apigwms/templates/deployment.yaml +++ b/deploy/k8s/helm/apigwms/templates/deployment.yaml @@ -1,7 +1,7 @@ {{- $name := include "apigwms.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} {{- $envoycfgname := printf "%s-%s" "envoy" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "apigwms.fullname" . }} diff --git a/deploy/k8s/helm/apigwwm/templates/deployment.yaml b/deploy/k8s/helm/apigwwm/templates/deployment.yaml index 6ceb1fa1b..8c8619f8a 100644 --- a/deploy/k8s/helm/apigwwm/templates/deployment.yaml +++ b/deploy/k8s/helm/apigwwm/templates/deployment.yaml @@ -1,7 +1,7 @@ {{- $name := include "apigwwm.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} {{- $envoycfgname := printf "%s-%s" "envoy" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "apigwwm.fullname" . }} diff --git a/deploy/k8s/helm/apigwws/templates/deployment.yaml b/deploy/k8s/helm/apigwws/templates/deployment.yaml index 3aedde6dd..bbe7fedf8 100644 --- a/deploy/k8s/helm/apigwws/templates/deployment.yaml +++ b/deploy/k8s/helm/apigwws/templates/deployment.yaml @@ -1,7 +1,7 @@ {{- $name := include "apigwws.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} {{- $envoycfgname := printf "%s-%s" "envoy" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "apigwws.fullname" . }} diff --git a/deploy/k8s/helm/basket-api/templates/deployment.yaml b/deploy/k8s/helm/basket-api/templates/deployment.yaml index dc90666f5..b9fd26204 100644 --- a/deploy/k8s/helm/basket-api/templates/deployment.yaml +++ b/deploy/k8s/helm/basket-api/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "basket-api.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "basket-api.fullname" . }} diff --git a/deploy/k8s/helm/basket-data/templates/deployment.yaml b/deploy/k8s/helm/basket-data/templates/deployment.yaml index 8ccceceeb..00f3a8cd0 100644 --- a/deploy/k8s/helm/basket-data/templates/deployment.yaml +++ b/deploy/k8s/helm/basket-data/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "basket-data.fullname" . }} diff --git a/deploy/k8s/helm/catalog-api/templates/deployment.yaml b/deploy/k8s/helm/catalog-api/templates/deployment.yaml index 33a0ad5b4..266d89407 100644 --- a/deploy/k8s/helm/catalog-api/templates/deployment.yaml +++ b/deploy/k8s/helm/catalog-api/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "catalog-api.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "catalog-api.fullname" . }} diff --git a/deploy/k8s/helm/deploy-all-mac.ps1 b/deploy/k8s/helm/deploy-all-mac.ps1 new file mode 100644 index 000000000..c74b7e05e --- /dev/null +++ b/deploy/k8s/helm/deploy-all-mac.ps1 @@ -0,0 +1,156 @@ +Param( + [parameter(Mandatory=$false)][string]$registry, + [parameter(Mandatory=$false)][string]$dockerUser, + [parameter(Mandatory=$false)][string]$dockerPassword, + [parameter(Mandatory=$false)][string]$externalDns, + [parameter(Mandatory=$false)][string]$appName="eshop", + [parameter(Mandatory=$false)][bool]$deployInfrastructure=$true, + [parameter(Mandatory=$false)][bool]$deployCharts=$true, + [parameter(Mandatory=$false)][bool]$clean=$true, + [parameter(Mandatory=$false)][string]$aksName="", + [parameter(Mandatory=$false)][string]$aksRg="", + [parameter(Mandatory=$false)][string]$imageTag="latest", + [parameter(Mandatory=$false)][bool]$useLocalk8s=$false, + [parameter(Mandatory=$false)][bool]$useMesh=$false, + [parameter(Mandatory=$false)][string][ValidateSet('Always','IfNotPresent','Never', IgnoreCase=$false)]$imagePullPolicy="Always", + [parameter(Mandatory=$false)][string][ValidateSet('prod','staging','none','custom', IgnoreCase=$false)]$sslSupport = "none", + [parameter(Mandatory=$false)][string]$tlsSecretName = "eshop-tls-custom", + [parameter(Mandatory=$false)][string]$chartsToDeploy="*", + [parameter(Mandatory=$false)][string]$ingressMeshAnnotationsFile="ingress_values_linkerd.yaml" + ) + +function Install-Chart { + Param([string]$chart,[string]$initialOptions, [bool]$customRegistry) + $options=$initialOptions + if ($sslEnabled) { + $options = "$options --set ingress.tls[0].secretName=$tlsSecretName --set ingress.tls[0].hosts=`{$dns`}" + if ($sslSupport -ne "custom") { + $options = "$options --set inf.tls.issuer=$sslIssuer" + } + } + if ($customRegistry) { + $options = "$options --set inf.registry.server=$registry --set inf.registry.login=$dockerUser --set inf.registry.pwd=$dockerPassword --set inf.registry.secretName=eshop-docker-scret" + } + + if ($chart -ne "eshop-common" -or $customRegistry) { # eshop-common is ignored when no secret must be deployed + + $command = "helm install $appName-$chart $options $chart" + Write-Host "Helm Command: $command" -ForegroundColor Gray + Invoke-Expression $command + } +} + +$dns = $externalDns +$sslEnabled=$false +$sslIssuer="" + +if ($sslSupport -eq "staging") { + $sslEnabled=$true + $tlsSecretName="eshop-letsencrypt-staging" + $sslIssuer="letsencrypt-staging" +} +elseif ($sslSupport -eq "prod") { + $sslEnabled=$true + $tlsSecretName="eshop-letsencrypt-prod" + $sslIssuer="letsencrypt-prod" +} +elseif ($sslSupport -eq "custom") { + $sslEnabled=$true +} + +$ingressValuesFile="ingress_values.yaml" + +if ($useLocalk8s -eq $true) { + $ingressValuesFile="ingress_values_dockerk8s.yaml" + $dns="localhost" +} + +if ($externalDns -eq "aks") { + if ([string]::IsNullOrEmpty($aksName) -or [string]::IsNullOrEmpty($aksRg)) { + Write-Host "Error: When using -dns aks, MUST set -aksName and -aksRg too." -ForegroundColor Red + exit 1 + } + Write-Host "Getting DNS of AKS of AKS $aksName (in resource group $aksRg)..." -ForegroundColor Green + $dns = $(az aks show -n $aksName -g $aksRg --query addonProfiles.httpApplicationRouting.config.HTTPApplicationRoutingZoneName) + if ([string]::IsNullOrEmpty($dns)) { + Write-Host "Error getting DNS of AKS $aksName (in resource group $aksRg). Please ensure AKS has httpRouting enabled AND Azure CLI is logged & in version 2.0.37 or higher" -ForegroundColor Red + exit 1 + } + $dns = $dns -replace '[\"]' + Write-Host "DNS base found is $dns. Will use $appName.$dns for the app!" -ForegroundColor Green + $dns = "$appName.$dns" +} + +# Initialization & check commands +if ([string]::IsNullOrEmpty($dns)) { + Write-Host "No DNS specified. Ingress resources will be bound to public ip" -ForegroundColor Yellow + if ($sslEnabled) { + Write-Host "Can't bound SSL to public IP. DNS is mandatory when using TLS" -ForegroundColor Red + exit 1 + } +} + +if ($useLocalk8s -and $sslEnabled) { + Write-Host "SSL can'be enabled on local K8s." -ForegroundColor Red + exit 1 +} + +if ($clean) { + $listOfReleases=$(helm ls --filter eshop -q) + if ([string]::IsNullOrEmpty($listOfReleases)) { + Write-Host "No previous releases found!" -ForegroundColor Green + }else{ + Write-Host "Previous releases found" -ForegroundColor Green + Write-Host "Cleaning previous helm releases..." -ForegroundColor Green + helm uninstall $listOfReleases + Write-Host "Previous releases deleted" -ForegroundColor Green + } +} + +$useCustomRegistry=$false + +if (-not [string]::IsNullOrEmpty($registry)) { + $useCustomRegistry=$true + if ([string]::IsNullOrEmpty($dockerUser) -or [string]::IsNullOrEmpty($dockerPassword)) { + Write-Host "Error: Must use -dockerUser AND -dockerPassword if specifying custom registry" -ForegroundColor Red + exit 1 + } +} + +Write-Host "Begin eShopOnContainers installation using Helm" -ForegroundColor Green + +$infras = ("sql-data", "nosql-data", "rabbitmq", "keystore-data", "basket-data") +$charts = ("eshop-common", "basket-api","catalog-api", "identity-api", "locations-api", "marketing-api", "mobileshoppingagg","ordering-api","ordering-backgroundtasks","ordering-signalrhub", "payment-api", "webmvc", "webshoppingagg", "webspa", "webstatus", "webhooks-api", "webhooks-web") +$gateways = ("apigwmm", "apigwms", "apigwwm", "apigwws") + +if ($deployInfrastructure) { + foreach ($infra in $infras) { + Write-Host "Installing infrastructure: $infra" -ForegroundColor Green + helm install "$appName-$infra" --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set "ingress.hosts={$dns}" $infra + } +} +else { + Write-Host "eShopOnContainers infrastructure (bbdd, redis, ...) charts aren't installed (-deployCharts is false)" -ForegroundColor Yellow +} + +if ($deployCharts) { + foreach ($chart in $charts) { + if ($chartsToDeploy -eq "*" -or $chartsToDeploy.Contains($chart)) { + Write-Host "Installing: $chart" -ForegroundColor Green + Install-Chart $chart "--values app.yaml --values inf.yaml --values $ingressValuesFile --values $ingressMeshAnnotationsFile --set app.name=$appName --set inf.k8s.dns=$dns --set ingress.hosts=``{$dns``} --set image.tag=$imageTag --set image.pullPolicy=$imagePullPolicy --set inf.tls.enabled=$sslEnabled --set inf.mesh.enabled=$useMesh --set inf.k8s.local=$useLocalk8s" $useCustomRegistry + } + } + + foreach ($chart in $gateways) { + if ($chartsToDeploy -eq "*" -or $chartsToDeploy.Contains($chart)) { + Write-Host "Installing Api Gateway Chart: $chart" -ForegroundColor Green + Install-Chart $chart "--values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set image.pullPolicy=$imagePullPolicy --set inf.mesh.enabled=$useMesh --set ingress.hosts=``{$dns``} --set inf.tls.enabled=$sslEnabled" $false + + } + } +} +else { + Write-Host "eShopOnContainers non-infrastructure charts aren't installed (-deployCharts is false)" -ForegroundColor Yellow +} + +Write-Host "helm charts installed." -ForegroundColor Green diff --git a/deploy/k8s/helm/deploy-all.ps1 b/deploy/k8s/helm/deploy-all.ps1 index 1711c0c2c..da0424195 100644 --- a/deploy/k8s/helm/deploy-all.ps1 +++ b/deploy/k8s/helm/deploy-all.ps1 @@ -33,7 +33,7 @@ function Install-Chart { } if ($chart -ne "eshop-common" -or $customRegistry) { # eshop-common is ignored when no secret must be deployed - $command = "install $options --name=$appName-$chart $chart" + $command = "install $appName-$chart $options $chart" Write-Host "Helm Command: helm $command" -ForegroundColor Gray Invoke-Expression 'cmd /c "helm $command"' } @@ -94,10 +94,16 @@ if ($useLocalk8s -and $sslEnabled) { exit 1 } -if ($clean) { - Write-Host "Cleaning previous helm releases..." -ForegroundColor Green - helm delete --purge $(helm ls -q eshop) - Write-Host "Previous releases deleted" -ForegroundColor Green +if ($clean) { + $listOfReleases=$(helm ls --filter eshop -q) + if ([string]::IsNullOrEmpty($listOfReleases)) { + Write-Host "No previous releases found!" -ForegroundColor Green + }else{ + Write-Host "Previous releases found" -ForegroundColor Green + Write-Host "Cleaning previous helm releases..." -ForegroundColor Green + helm uninstall $listOfReleases + Write-Host "Previous releases deleted" -ForegroundColor Green + } } $useCustomRegistry=$false @@ -119,7 +125,7 @@ $gateways = ("apigwmm", "apigwms", "apigwwm", "apigwws") if ($deployInfrastructure) { foreach ($infra in $infras) { Write-Host "Installing infrastructure: $infra" -ForegroundColor Green - helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set "ingress.hosts={$dns}" --name="$appName-$infra" $infra + helm install "$appName-$infra" --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set "ingress.hosts={$dns}" $infra } } else { diff --git a/deploy/k8s/helm/deploy-all.sh b/deploy/k8s/helm/deploy-all.sh index 6f6d868aa..bf07105ef 100644 --- a/deploy/k8s/helm/deploy-all.sh +++ b/deploy/k8s/helm/deploy-all.sh @@ -201,7 +201,7 @@ if [[ $clean ]]; then if [[ -z $(helm ls -q --namespace $namespace) ]]; then echo "No previous releases found" else - helm delete --purge $(helm ls -q --namespace $namespace) + helm uninstall $(helm ls -q --namespace $namespace) echo "Previous releases deleted" waitsecs=10; while [ $waitsecs -gt 0 ]; do echo -ne "$waitsecs\033[0K\r"; sleep 1; : $((waitsecs--)); done fi @@ -215,7 +215,7 @@ if [[ !$skip_infrastructure ]]; then for infra in "${infras[@]}" do echo "Installing infrastructure: $infra" - helm install --namespace $namespace --set "ingress.hosts={$dns}" --values app.yaml --values inf.yaml --values $ingress_values_file --set app.name=$app_name --set inf.k8s.dns=$dns --name="$app_name-$infra" $infra + helm install "$app_name-$infra" --namespace $namespace --set "ingress.hosts={$dns}" --values app.yaml --values inf.yaml --values $ingress_values_file --set app.name=$app_name --set inf.k8s.dns=$dns $infra done fi @@ -223,9 +223,9 @@ for chart in "${charts[@]}" do echo "Installing: $chart" if [[ $use_custom_registry ]]; then - helm install --namespace $namespace --set "ingress.hosts={$dns}" --set inf.registry.server=$container_registry --set inf.registry.login=$docker_username --set inf.registry.pwd=$docker_password --set inf.registry.secretName=eshop-docker-scret --values app.yaml --values inf.yaml --values $ingress_values_file --set app.name=$app_name --set inf.k8s.dns=$dns --set image.tag=$image_tag --set image.pullPolicy=Always --name="$app_name-$chart" $chart + helm install "$app_name-$chart" --namespace $namespace --set "ingress.hosts={$dns}" --set inf.registry.server=$container_registry --set inf.registry.login=$docker_username --set inf.registry.pwd=$docker_password --set inf.registry.secretName=eshop-docker-scret --values app.yaml --values inf.yaml --values $ingress_values_file --set app.name=$app_name --set inf.k8s.dns=$dns --set image.tag=$image_tag --set image.pullPolicy=Always $chart elif [[ $chart != "eshop-common" ]]; then # eshop-common is ignored when no secret must be deployed - helm install --namespace $namespace --set "ingress.hosts={$dns}" --values app.yaml --values inf.yaml --values $ingress_values_file --set app.name=$app_name --set inf.k8s.dns=$dns --set image.tag=$image_tag --set image.pullPolicy=Always --name="$app_name-$chart" $chart + helm install "$app_name-$chart" --namespace $namespace --set "ingress.hosts={$dns}" --values app.yaml --values inf.yaml --values $ingress_values_file --set app.name=$app_name --set inf.k8s.dns=$dns --set image.tag=$image_tag --set image.pullPolicy=Always $chart fi done diff --git a/deploy/k8s/helm/identity-api/templates/deployment.yaml b/deploy/k8s/helm/identity-api/templates/deployment.yaml index c6ad69067..f2e7d6078 100644 --- a/deploy/k8s/helm/identity-api/templates/deployment.yaml +++ b/deploy/k8s/helm/identity-api/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "identity-api.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "identity-api.fullname" . }} diff --git a/deploy/k8s/helm/keystore-data/templates/deployment.yaml b/deploy/k8s/helm/keystore-data/templates/deployment.yaml index 34f1fe074..d3604c212 100644 --- a/deploy/k8s/helm/keystore-data/templates/deployment.yaml +++ b/deploy/k8s/helm/keystore-data/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "keystore-data.fullname" . }} diff --git a/deploy/k8s/helm/locations-api/templates/deployment.yaml b/deploy/k8s/helm/locations-api/templates/deployment.yaml index 9a5bb608c..1dba5d166 100644 --- a/deploy/k8s/helm/locations-api/templates/deployment.yaml +++ b/deploy/k8s/helm/locations-api/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "locations-api.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "locations-api.fullname" . }} diff --git a/deploy/k8s/helm/marketing-api/templates/deployment.yaml b/deploy/k8s/helm/marketing-api/templates/deployment.yaml index 60d4cd1a3..6b833eb8c 100644 --- a/deploy/k8s/helm/marketing-api/templates/deployment.yaml +++ b/deploy/k8s/helm/marketing-api/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "marketing-api.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "marketing-api.fullname" . }} diff --git a/deploy/k8s/helm/mobileshoppingagg/templates/deployment.yaml b/deploy/k8s/helm/mobileshoppingagg/templates/deployment.yaml index 41e1fa75c..eb0f4f536 100644 --- a/deploy/k8s/helm/mobileshoppingagg/templates/deployment.yaml +++ b/deploy/k8s/helm/mobileshoppingagg/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "mobileshoppingagg.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "mobileshoppingagg.fullname" . }} diff --git a/deploy/k8s/helm/nosql-data/templates/deployment.yaml b/deploy/k8s/helm/nosql-data/templates/deployment.yaml index 9b1f32319..c1f5c9a8e 100644 --- a/deploy/k8s/helm/nosql-data/templates/deployment.yaml +++ b/deploy/k8s/helm/nosql-data/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "nosql-data.fullname" . }} diff --git a/deploy/k8s/helm/ordering-api/templates/deployment.yaml b/deploy/k8s/helm/ordering-api/templates/deployment.yaml index 327040701..4e25dcbb6 100644 --- a/deploy/k8s/helm/ordering-api/templates/deployment.yaml +++ b/deploy/k8s/helm/ordering-api/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "ordering-api.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "ordering-api.fullname" . }} diff --git a/deploy/k8s/helm/ordering-backgroundtasks/templates/deployment.yaml b/deploy/k8s/helm/ordering-backgroundtasks/templates/deployment.yaml index d93c7f764..cbb06ffdc 100644 --- a/deploy/k8s/helm/ordering-backgroundtasks/templates/deployment.yaml +++ b/deploy/k8s/helm/ordering-backgroundtasks/templates/deployment.yaml @@ -1,7 +1,7 @@ {{- $name := include "ordering-backgroundtasks.fullname" . -}} {{- $cfgname := printf "cfg-%s" $name | trunc 63 }} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "ordering-backgroundtasks.fullname" . }} diff --git a/deploy/k8s/helm/ordering-signalrhub/templates/deployment.yaml b/deploy/k8s/helm/ordering-signalrhub/templates/deployment.yaml index af3867ea5..87fd51da6 100644 --- a/deploy/k8s/helm/ordering-signalrhub/templates/deployment.yaml +++ b/deploy/k8s/helm/ordering-signalrhub/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "ordering-signalrhub.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "ordering-signalrhub.fullname" . }} diff --git a/deploy/k8s/helm/payment-api/templates/deployment.yaml b/deploy/k8s/helm/payment-api/templates/deployment.yaml index f83eb37da..df0bbe7d1 100644 --- a/deploy/k8s/helm/payment-api/templates/deployment.yaml +++ b/deploy/k8s/helm/payment-api/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "payment-api.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "payment-api.fullname" . }} diff --git a/deploy/k8s/helm/rabbitmq/templates/deployment.yaml b/deploy/k8s/helm/rabbitmq/templates/deployment.yaml index 9819a6455..1e81d34c5 100644 --- a/deploy/k8s/helm/rabbitmq/templates/deployment.yaml +++ b/deploy/k8s/helm/rabbitmq/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "rabbitmq.fullname" . }} diff --git a/deploy/k8s/helm/sql-data/templates/deployment.yaml b/deploy/k8s/helm/sql-data/templates/deployment.yaml index 4b2f589ef..bc94d2e9e 100644 --- a/deploy/k8s/helm/sql-data/templates/deployment.yaml +++ b/deploy/k8s/helm/sql-data/templates/deployment.yaml @@ -1,4 +1,4 @@ -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "sql-data.fullname" . }} diff --git a/deploy/k8s/helm/webhooks-api/templates/deployment.yaml b/deploy/k8s/helm/webhooks-api/templates/deployment.yaml index 2ecb885bf..16aeecd91 100644 --- a/deploy/k8s/helm/webhooks-api/templates/deployment.yaml +++ b/deploy/k8s/helm/webhooks-api/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "webhooks-api.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "webhooks-api.fullname" . }} diff --git a/deploy/k8s/helm/webhooks-web/templates/deployment.yaml b/deploy/k8s/helm/webhooks-web/templates/deployment.yaml index 43d406524..7ee3572f5 100644 --- a/deploy/k8s/helm/webhooks-web/templates/deployment.yaml +++ b/deploy/k8s/helm/webhooks-web/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "webhooks-web.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "webhooks-web.fullname" . }} diff --git a/deploy/k8s/helm/webmvc/templates/deployment.yaml b/deploy/k8s/helm/webmvc/templates/deployment.yaml index 2889dc757..2e1162be1 100644 --- a/deploy/k8s/helm/webmvc/templates/deployment.yaml +++ b/deploy/k8s/helm/webmvc/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "webmvc.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "webmvc.fullname" . }} diff --git a/deploy/k8s/helm/webshoppingagg/templates/deployment.yaml b/deploy/k8s/helm/webshoppingagg/templates/deployment.yaml index ab5bfc0c9..3e82f1a0e 100644 --- a/deploy/k8s/helm/webshoppingagg/templates/deployment.yaml +++ b/deploy/k8s/helm/webshoppingagg/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "webshoppingagg.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "webshoppingagg.fullname" . }} diff --git a/deploy/k8s/helm/webspa/templates/deployment.yaml b/deploy/k8s/helm/webspa/templates/deployment.yaml index 20dc696bf..4cffcdb8f 100644 --- a/deploy/k8s/helm/webspa/templates/deployment.yaml +++ b/deploy/k8s/helm/webspa/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "webspa.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "webspa.fullname" . }} diff --git a/deploy/k8s/helm/webstatus/templates/deployment.yaml b/deploy/k8s/helm/webstatus/templates/deployment.yaml index 70b953577..33ab7e056 100644 --- a/deploy/k8s/helm/webstatus/templates/deployment.yaml +++ b/deploy/k8s/helm/webstatus/templates/deployment.yaml @@ -1,6 +1,6 @@ {{- $name := include "webstatus.fullname" . -}} {{- $cfgname := printf "%s-%s" "cfg" $name -}} -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: {{ template "webstatus.fullname" . }} diff --git a/deploy/k8s/nginx-ingress/mandatory.yaml b/deploy/k8s/nginx-ingress/mandatory.yaml index 56b1cc3b5..2e63edd59 100644 --- a/deploy/k8s/nginx-ingress/mandatory.yaml +++ b/deploy/k8s/nginx-ingress/mandatory.yaml @@ -163,7 +163,7 @@ subjects: --- -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: nginx-ingress-controller From 17e838263fcf6dd112c30827fb4c9b859c10592d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2020 16:25:09 +0530 Subject: [PATCH 11/44] Bump elliptic from 6.4.1 to 6.5.3 in /src/Web/WebSPA (#1381) Bumps [elliptic](https://github.com/indutny/elliptic) from 6.4.1 to 6.5.3. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.4.1...v6.5.3) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/Web/WebSPA/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json index eba515ab7..43ab8fbcd 100644 --- a/src/Web/WebSPA/package-lock.json +++ b/src/Web/WebSPA/package-lock.json @@ -6860,9 +6860,9 @@ "dev": true }, "elliptic": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", - "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", "dev": true, "requires": { "bn.js": "^4.4.0", From 736320b92064d5bc7f90cc9e2bb4ae57f5b0d13d Mon Sep 17 00:00:00 2001 From: Viswanatha Swamy Date: Tue, 4 Aug 2020 16:26:29 +0530 Subject: [PATCH 12/44] Swamy/remove unused using and refactoring entity classes (#1371) * Removed Unused Usings * Code Refactoring for readbility. Added spaces and moved the classes to separate file --- .../aggregator/Config/UrlsConfig.cs | 12 +++++++---- .../aggregator/Controllers/HomeController.cs | 4 ---- .../Filters/AuthorizeCheckOperationFilter.cs | 13 ++++++------ .../aggregator/Models/AddBasketItemRequest.cs | 8 ++----- .../aggregator/Models/BasketData.cs | 13 +----------- .../aggregator/Models/BasketDataItem.cs | 21 +++++++++++++++++++ .../aggregator/Models/OrderData.cs | 17 +++++++++++++++ .../aggregator/Models/OrderItemData.cs | 7 +++++++ .../aggregator/Models/UpdateBasketItemData.cs | 16 ++++++++++++++ .../Models/UpdateBasketItemsRequest.cs | 11 +--------- .../aggregator/Models/UpdateBasketRequest.cs | 7 +------ .../Models/UpdateBasketRequestItemData.cs | 13 ++++++++++++ .../Mobile.Bff.Shopping/aggregator/Program.cs | 2 -- .../aggregator/Services/BasketService.cs | 4 +--- .../aggregator/Services/CatalogService.cs | 1 - .../aggregator/Services/GrpcCallerService.cs | 9 ++++---- .../aggregator/Services/OrderingService.cs | 3 +-- .../aggregator/Config/UrlsConfig.cs | 16 ++++++++++---- .../Controllers/BasketController.cs | 3 --- .../aggregator/Controllers/HomeController.cs | 4 ---- .../aggregator/Controllers/OrderController.cs | 3 --- .../Filters/AuthorizeCheckOperationFilter.cs | 14 ++++++------- .../aggregator/Models/AddBasketItemRequest.cs | 10 ++++----- .../aggregator/Models/BasketData.cs | 13 +----------- .../aggregator/Models/BasketDataItem.cs | 21 +++++++++++++++++++ .../aggregator/Models/CatalogItem.cs | 2 ++ .../aggregator/Models/OrderData.cs | 19 +++++++++++++++-- .../aggregator/Models/OrderItemData.cs | 14 +++++++------ .../aggregator/Models/UpdateBasketItemData.cs | 16 ++++++++++++++ .../Models/UpdateBasketItemsRequest.cs | 17 ++------------- .../aggregator/Models/UpdateBasketRequest.cs | 12 ++--------- .../Models/UpdateBasketRequestItemData.cs | 11 ++++++++++ .../aggregator/Services/BasketService.cs | 7 +++---- .../aggregator/Services/CatalogService.cs | 8 +++---- .../aggregator/Services/GrpcCallerService.cs | 8 +++---- .../aggregator/Services/OrderingService.cs | 5 +---- .../Web.Bff.Shopping/aggregator/Startup.cs | 1 - 37 files changed, 214 insertions(+), 151 deletions(-) create mode 100644 src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/BasketDataItem.cs create mode 100644 src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/UpdateBasketItemData.cs create mode 100644 src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/UpdateBasketRequestItemData.cs create mode 100644 src/ApiGateways/Web.Bff.Shopping/aggregator/Models/BasketDataItem.cs create mode 100644 src/ApiGateways/Web.Bff.Shopping/aggregator/Models/UpdateBasketItemData.cs create mode 100644 src/ApiGateways/Web.Bff.Shopping/aggregator/Models/UpdateBasketRequestItemData.cs diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Config/UrlsConfig.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Config/UrlsConfig.cs index c0bb9502e..90fa010cd 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Config/UrlsConfig.cs +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Config/UrlsConfig.cs @@ -1,7 +1,4 @@ -ļ»æusing System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +ļ»æusing System.Collections.Generic; namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config { @@ -10,12 +7,14 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config public class CatalogOperations { public static string GetItemById(int id) => $"/api/v1/catalog/items/{id}"; + public static string GetItemsById(IEnumerable ids) => $"/api/v1/catalog/items?ids={string.Join(',', ids)}"; } public class BasketOperations { public static string GetItemById(string id) => $"/api/v1/basket/{id}"; + public static string UpdateBasket() => "/api/v1/basket"; } @@ -25,10 +24,15 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config } public string Basket { get; set; } + public string Catalog { get; set; } + public string Orders { get; set; } + public string GrpcBasket { get; set; } + public string GrpcCatalog { get; set; } + public string GrpcOrdering { get; set; } } } diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Controllers/HomeController.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Controllers/HomeController.cs index 48a71480a..e72e23ca7 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Controllers/HomeController.cs +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Controllers/HomeController.cs @@ -1,8 +1,4 @@ ļ»æusing Microsoft.AspNetCore.Mvc; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Controllers { diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Filters/AuthorizeCheckOperationFilter.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Filters/AuthorizeCheckOperationFilter.cs index 3b8298bfe..e975edb23 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Filters/AuthorizeCheckOperationFilter.cs +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Filters/AuthorizeCheckOperationFilter.cs @@ -1,10 +1,11 @@ -ļ»ænamespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Filters +ļ»æusing Microsoft.AspNetCore.Authorization; +using Microsoft.OpenApi.Models; +using Swashbuckle.AspNetCore.SwaggerGen; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Filters { - using Microsoft.AspNetCore.Authorization; - using Microsoft.OpenApi.Models; - using Swashbuckle.AspNetCore.SwaggerGen; - using System.Collections.Generic; - using System.Linq; namespace Basket.API.Infrastructure.Filters { diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/AddBasketItemRequest.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/AddBasketItemRequest.cs index f81842c09..d0271d84b 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/AddBasketItemRequest.cs +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/AddBasketItemRequest.cs @@ -1,13 +1,9 @@ -ļ»æusing System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models +ļ»ænamespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models { public class AddBasketItemRequest { public int CatalogItemId { get; set; } + public string BasketId { get; set; } public int Quantity { get; set; } diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/BasketData.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/BasketData.cs index 426b8d2b5..7a43d58e5 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/BasketData.cs +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/BasketData.cs @@ -2,6 +2,7 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models { + public class BasketData { public string BuyerId { get; set; } @@ -10,7 +11,6 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models public BasketData() { - } public BasketData(string buyerId) @@ -19,15 +19,4 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models } } - public class BasketDataItem - { - public string Id { get; set; } - public int ProductId { get; set; } - public string ProductName { get; set; } - public decimal UnitPrice { get; set; } - public decimal OldUnitPrice { get; set; } - public int Quantity { get; set; } - public string PictureUrl { get; set; } - - } } diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/BasketDataItem.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/BasketDataItem.cs new file mode 100644 index 000000000..3ff91df4f --- /dev/null +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/BasketDataItem.cs @@ -0,0 +1,21 @@ +ļ»ænamespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models +{ + + public class BasketDataItem + { + public string Id { get; set; } + + public int ProductId { get; set; } + + public string ProductName { get; set; } + + public decimal UnitPrice { get; set; } + + public decimal OldUnitPrice { get; set; } + + public int Quantity { get; set; } + + public string PictureUrl { get; set; } + } + +} diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/OrderData.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/OrderData.cs index e63b453a4..44749ff6c 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/OrderData.cs +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/OrderData.cs @@ -3,23 +3,39 @@ using System.Collections.Generic; namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models { + public class OrderData { public string OrderNumber { get; set; } + public DateTime Date { get; set; } + public string Status { get; set; } + public decimal Total { get; set; } + public string Description { get; set; } + public string City { get; set; } + public string Street { get; set; } + public string State { get; set; } + public string Country { get; set; } + public string ZipCode { get; set; } + public string CardNumber { get; set; } + public string CardHolderName { get; set; } + public bool IsDraft { get; set; } + public DateTime CardExpiration { get; set; } + public string CardExpirationShort { get; set; } + public string CardSecurityNumber { get; set; } public int CardTypeId { get; set; } @@ -28,4 +44,5 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models public List OrderItems { get; } = new List(); } + } diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/OrderItemData.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/OrderItemData.cs index 023cf20e5..b3832fa21 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/OrderItemData.cs +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/OrderItemData.cs @@ -1,12 +1,19 @@ ļ»ænamespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models { + public class OrderItemData { public int ProductId { get; set; } + public string ProductName { get; set; } + public decimal UnitPrice { get; set; } + public decimal Discount { get; set; } + public int Units { get; set; } + public string PictureUrl { get; set; } } + } diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/UpdateBasketItemData.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/UpdateBasketItemData.cs new file mode 100644 index 000000000..f8ec70d5f --- /dev/null +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/UpdateBasketItemData.cs @@ -0,0 +1,16 @@ +ļ»ænamespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models +{ + + public class UpdateBasketItemData + { + public string BasketItemId { get; set; } + + public int NewQty { get; set; } + + public UpdateBasketItemData() + { + NewQty = 0; + } + } + +} diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/UpdateBasketItemsRequest.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/UpdateBasketItemsRequest.cs index 35b3e76c0..c5a6ccb3e 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/UpdateBasketItemsRequest.cs +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/UpdateBasketItemsRequest.cs @@ -2,6 +2,7 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models { + public class UpdateBasketItemsRequest { @@ -15,14 +16,4 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models } } - public class UpdateBasketItemData - { - public string BasketItemId { get; set; } - public int NewQty { get; set; } - - public UpdateBasketItemData() - { - NewQty = 0; - } - } } diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/UpdateBasketRequest.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/UpdateBasketRequest.cs index b377921be..a1c255551 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/UpdateBasketRequest.cs +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/UpdateBasketRequest.cs @@ -2,6 +2,7 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models { + public class UpdateBasketRequest { public string BuyerId { get; set; } @@ -9,10 +10,4 @@ namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models public IEnumerable Items { get; set; } } - public class UpdateBasketRequestItemData - { - public string Id { get; set; } // Basket id - public int ProductId { get; set; } // Catalog item id - public int Quantity { get; set; } // Quantity - } } diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/UpdateBasketRequestItemData.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/UpdateBasketRequestItemData.cs new file mode 100644 index 000000000..af28e0157 --- /dev/null +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Models/UpdateBasketRequestItemData.cs @@ -0,0 +1,13 @@ +ļ»ænamespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models +{ + + public class UpdateBasketRequestItemData + { + public string Id { get; set; } // Basket id + + public int ProductId { get; set; } // Catalog item id + + public int Quantity { get; set; } // Quantity + } + +} diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Program.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Program.cs index f536ec19a..2fc86c51f 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Program.cs +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Program.cs @@ -1,10 +1,8 @@ ļ»æusing Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Server.Kestrel.Core; using Microsoft.Extensions.Configuration; using Serilog; using System.IO; -using System.Net; namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator { diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Services/BasketService.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Services/BasketService.cs index 609b6cdd9..8bd4c8948 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Services/BasketService.cs +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Services/BasketService.cs @@ -1,14 +1,12 @@ ļ»æusing Grpc.Net.Client; +using GrpcBasket; using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config; using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using System; using System.Linq; using System.Net.Http; using System.Threading.Tasks; -using GrpcBasket; -using Grpc.Core; namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services { diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Services/CatalogService.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Services/CatalogService.cs index 2cf160d80..f98b90989 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Services/CatalogService.cs +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Services/CatalogService.cs @@ -1,5 +1,4 @@ ļ»æusing CatalogApi; -using Grpc.Net.Client; using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config; using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models; using Microsoft.Extensions.Options; diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Services/GrpcCallerService.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Services/GrpcCallerService.cs index fe857c6cc..55f3df3ee 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Services/GrpcCallerService.cs +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Services/GrpcCallerService.cs @@ -1,9 +1,8 @@ -ļ»æusing System.Net.Http; -using System.Threading.Tasks; -using System; -using Grpc.Core; -using Serilog; +ļ»æusing Grpc.Core; using Grpc.Net.Client; +using Serilog; +using System; +using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services { diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Services/OrderingService.cs b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Services/OrderingService.cs index a48c942de..d34a5338a 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Services/OrderingService.cs +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Services/OrderingService.cs @@ -1,4 +1,4 @@ -ļ»æusing Grpc.Net.Client; +ļ»æusing GrpcOrdering; using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Config; using Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Models; using Microsoft.Extensions.Logging; @@ -6,7 +6,6 @@ using Microsoft.Extensions.Options; using System.Linq; using System.Net.Http; using System.Threading.Tasks; -using GrpcOrdering; namespace Microsoft.eShopOnContainers.Mobile.Shopping.HttpAggregator.Services { diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Config/UrlsConfig.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Config/UrlsConfig.cs index dccccab35..b16530e1b 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Config/UrlsConfig.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Config/UrlsConfig.cs @@ -1,17 +1,18 @@ -ļ»æusing System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +ļ»æusing System.Collections.Generic; namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config { + public class UrlsConfig { + public class CatalogOperations { // grpc call under REST must go trough port 80 public static string GetItemById(int id) => $"/api/v1/catalog/items/{id}"; + public static string GetItemById(string ids) => $"/api/v1/catalog/items/ids/{string.Join(',', ids)}"; + // REST call standard must go through port 5000 public static string GetItemsById(IEnumerable ids) => $":5000/api/v1/catalog/items?ids={string.Join(',', ids)}"; } @@ -19,6 +20,7 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config public class BasketOperations { public static string GetItemById(string id) => $"/api/v1/basket/{id}"; + public static string UpdateBasket() => "/api/v1/basket"; } @@ -28,10 +30,16 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config } public string Basket { get; set; } + public string Catalog { get; set; } + public string Orders { get; set; } + public string GrpcBasket { get; set; } + public string GrpcCatalog { get; set; } + public string GrpcOrdering { get; set; } } + } diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Controllers/BasketController.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Controllers/BasketController.cs index dd5d4e85c..9471c6e09 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Controllers/BasketController.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Controllers/BasketController.cs @@ -3,12 +3,9 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services; using System; -using System.Collections.Generic; using System.Linq; using System.Net; using System.Threading.Tasks; -using Serilog; -using Newtonsoft.Json; namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Controllers { diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Controllers/HomeController.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Controllers/HomeController.cs index 58ed48d1a..e742e2bd6 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Controllers/HomeController.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Controllers/HomeController.cs @@ -1,8 +1,4 @@ ļ»æusing Microsoft.AspNetCore.Mvc; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Controllers { diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Controllers/OrderController.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Controllers/OrderController.cs index 4b88c45b6..e528b478f 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Controllers/OrderController.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Controllers/OrderController.cs @@ -2,9 +2,6 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services; -using System; -using System.Collections.Generic; -using System.Linq; using System.Net; using System.Threading.Tasks; diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Filters/AuthorizeCheckOperationFilter.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Filters/AuthorizeCheckOperationFilter.cs index 45c191104..c273fd19e 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Filters/AuthorizeCheckOperationFilter.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Filters/AuthorizeCheckOperationFilter.cs @@ -1,11 +1,11 @@ -ļ»ænamespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Filters -{ - using Microsoft.AspNetCore.Authorization; - using Microsoft.OpenApi.Models; - using Swashbuckle.AspNetCore.SwaggerGen; - using System.Collections.Generic; - using System.Linq; +ļ»æusing Microsoft.AspNetCore.Authorization; +using Microsoft.OpenApi.Models; +using Swashbuckle.AspNetCore.SwaggerGen; +using System.Collections.Generic; +using System.Linq; +namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Filters +{ namespace Basket.API.Infrastructure.Filters { public class AuthorizeCheckOperationFilter : IOperationFilter diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/AddBasketItemRequest.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/AddBasketItemRequest.cs index 88aff245f..e9a6492c0 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/AddBasketItemRequest.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/AddBasketItemRequest.cs @@ -1,13 +1,10 @@ -ļ»æusing System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models +ļ»ænamespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models { + public class AddBasketItemRequest { public int CatalogItemId { get; set; } + public string BasketId { get; set; } public int Quantity { get; set; } @@ -17,4 +14,5 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models Quantity = 1; } } + } diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/BasketData.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/BasketData.cs index 507c7cdb7..18e855837 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/BasketData.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/BasketData.cs @@ -2,6 +2,7 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models { + public class BasketData { public string BuyerId { get; set; } @@ -10,7 +11,6 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models public BasketData() { - } public BasketData(string buyerId) @@ -19,15 +19,4 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models } } - public class BasketDataItem - { - public string Id { get; set; } - public int ProductId { get; set; } - public string ProductName { get; set; } - public decimal UnitPrice { get; set; } - public decimal OldUnitPrice { get; set; } - public int Quantity { get; set; } - public string PictureUrl { get; set; } - - } } diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/BasketDataItem.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/BasketDataItem.cs new file mode 100644 index 000000000..05fed054e --- /dev/null +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/BasketDataItem.cs @@ -0,0 +1,21 @@ +ļ»ænamespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models +{ + + public class BasketDataItem + { + public string Id { get; set; } + + public int ProductId { get; set; } + + public string ProductName { get; set; } + + public decimal UnitPrice { get; set; } + + public decimal OldUnitPrice { get; set; } + + public int Quantity { get; set; } + + public string PictureUrl { get; set; } + } + +} diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/CatalogItem.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/CatalogItem.cs index 43e8e1cd1..68c856970 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/CatalogItem.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/CatalogItem.cs @@ -1,5 +1,6 @@ ļ»ænamespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models { + public class CatalogItem { public int Id { get; set; } @@ -10,4 +11,5 @@ public string PictureUri { get; set; } } + } diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/OrderData.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/OrderData.cs index e9d5982b9..c4536d697 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/OrderData.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/OrderData.cs @@ -1,27 +1,41 @@ ļ»æusing System; using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models { + public class OrderData { public string OrderNumber { get; set; } + public DateTime Date { get; set; } + public string Status { get; set; } + public decimal Total { get; set; } + public string Description { get; set; } + public string City { get; set; } + public string Street { get; set; } + public string State { get; set; } + public string Country { get; set; } + public string ZipCode { get; set; } + public string CardNumber { get; set; } + public string CardHolderName { get; set; } + public bool IsDraft { get; set; } + public DateTime CardExpiration { get; set; } + public string CardExpirationShort { get; set; } + public string CardSecurityNumber { get; set; } public int CardTypeId { get; set; } @@ -30,4 +44,5 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models public List OrderItems { get; } = new List(); } + } diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/OrderItemData.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/OrderItemData.cs index 1a40cb8cb..0c2082fa2 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/OrderItemData.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/OrderItemData.cs @@ -1,17 +1,19 @@ -ļ»æusing System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models +ļ»ænamespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models { + public class OrderItemData { public int ProductId { get; set; } + public string ProductName { get; set; } + public decimal UnitPrice { get; set; } + public decimal Discount { get; set; } + public int Units { get; set; } + public string PictureUrl { get; set; } } + } diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/UpdateBasketItemData.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/UpdateBasketItemData.cs new file mode 100644 index 000000000..b75784aa2 --- /dev/null +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/UpdateBasketItemData.cs @@ -0,0 +1,16 @@ +ļ»ænamespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models +{ + + public class UpdateBasketItemData + { + public string BasketItemId { get; set; } + + public int NewQty { get; set; } + + public UpdateBasketItemData() + { + NewQty = 0; + } + } + +} diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/UpdateBasketItemsRequest.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/UpdateBasketItemsRequest.cs index b41c069bc..3e356dfe1 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/UpdateBasketItemsRequest.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/UpdateBasketItemsRequest.cs @@ -1,13 +1,10 @@ -ļ»æusing System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +ļ»æusing System.Collections.Generic; namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models { + public class UpdateBasketItemsRequest { - public string BasketId { get; set; } public ICollection Updates { get; set; } @@ -18,14 +15,4 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models } } - public class UpdateBasketItemData - { - public string BasketItemId { get; set; } - public int NewQty { get; set; } - - public UpdateBasketItemData() - { - NewQty = 0; - } - } } diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/UpdateBasketRequest.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/UpdateBasketRequest.cs index 9beeeade4..070016f70 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/UpdateBasketRequest.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/UpdateBasketRequest.cs @@ -1,10 +1,8 @@ -ļ»æusing System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; +ļ»æusing System.Collections.Generic; namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models { + public class UpdateBasketRequest { public string BuyerId { get; set; } @@ -12,10 +10,4 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models public IEnumerable Items { get; set; } } - public class UpdateBasketRequestItemData - { - public string Id { get; set; } // Basket id - public int ProductId { get; set; } // Catalog item id - public int Quantity { get; set; } // Quantity - } } diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/UpdateBasketRequestItemData.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/UpdateBasketRequestItemData.cs new file mode 100644 index 000000000..90800374d --- /dev/null +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Models/UpdateBasketRequestItemData.cs @@ -0,0 +1,11 @@ +ļ»ænamespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models +{ + public class UpdateBasketRequestItemData + { + public string Id { get; set; } // Basket id + + public int ProductId { get; set; } // Catalog item id + + public int Quantity { get; set; } // Quantity + } +} diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/BasketService.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/BasketService.cs index b289e98d6..7e85132cd 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/BasketService.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/BasketService.cs @@ -1,12 +1,11 @@ -ļ»æusing Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config; +ļ»æusing GrpcBasket; +using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config; using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using System.Threading.Tasks; -using Grpc.Net.Client; using System.Linq; -using GrpcBasket; using System.Net.Http; +using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services { diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/CatalogService.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/CatalogService.cs index c10094928..059e1d046 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/CatalogService.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/CatalogService.cs @@ -1,15 +1,13 @@ -ļ»æusing Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config; +ļ»æusing CatalogApi; +using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config; using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using System.Collections.Generic; +using System.Linq; using System.Net.Http; using System.Threading.Tasks; -using CatalogApi; -using Grpc.Net.Client; -using System; using static CatalogApi.Catalog; -using System.Linq; namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services { diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/GrpcCallerService.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/GrpcCallerService.cs index 43138f987..2039c7c4f 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/GrpcCallerService.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/GrpcCallerService.cs @@ -1,8 +1,8 @@ -ļ»æusing System.Threading.Tasks; -using System; -using Grpc.Core; -using Serilog; +ļ»æusing Grpc.Core; using Grpc.Net.Client; +using Serilog; +using System; +using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services { diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/OrderingService.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/OrderingService.cs index 8075a507c..b460f4864 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/OrderingService.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Services/OrderingService.cs @@ -1,14 +1,11 @@ -ļ»æusing Grpc.Net.Client; +ļ»æusing GrpcOrdering; using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config; using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Models; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using System; using System.Linq; using System.Net.Http; using System.Threading.Tasks; -using GrpcOrdering; -using Grpc.Core; namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Services { diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs b/src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs index f9cd93819..1ea6c0f4f 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Startup.cs @@ -5,7 +5,6 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Diagnostics.HealthChecks; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config; using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Filters.Basket.API.Infrastructure.Filters; using Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Infrastructure; From ae01a5c1763ad1e6e50cfacad863e8ab1587b6ad Mon Sep 17 00:00:00 2001 From: Mark Harwood <47503138+markharwood101@users.noreply.github.com> Date: Tue, 4 Aug 2020 11:56:56 +0100 Subject: [PATCH 13/44] Removed unused usings from ModelDTOs (#1373) --- src/Web/WebMVC/Services/ModelDTOs/LocationDTO.cs | 7 +------ src/Web/WebMVC/Services/ModelDTOs/OrderDTO.cs | 3 +-- src/Web/WebMVC/Services/ModelDTOs/OrderProcessAction.cs | 7 +------ 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/src/Web/WebMVC/Services/ModelDTOs/LocationDTO.cs b/src/Web/WebMVC/Services/ModelDTOs/LocationDTO.cs index 40c9f07a8..0bff03604 100644 --- a/src/Web/WebMVC/Services/ModelDTOs/LocationDTO.cs +++ b/src/Web/WebMVC/Services/ModelDTOs/LocationDTO.cs @@ -1,9 +1,4 @@ -ļ»æusing System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace WebMVC.Services.ModelDTOs +ļ»ænamespace WebMVC.Services.ModelDTOs { public class LocationDTO { diff --git a/src/Web/WebMVC/Services/ModelDTOs/OrderDTO.cs b/src/Web/WebMVC/Services/ModelDTOs/OrderDTO.cs index 5f925a8ee..aabfb5b5f 100644 --- a/src/Web/WebMVC/Services/ModelDTOs/OrderDTO.cs +++ b/src/Web/WebMVC/Services/ModelDTOs/OrderDTO.cs @@ -1,5 +1,4 @@ -ļ»æusing System; -using System.ComponentModel.DataAnnotations; +ļ»æusing System.ComponentModel.DataAnnotations; namespace WebMVC.Services.ModelDTOs { diff --git a/src/Web/WebMVC/Services/ModelDTOs/OrderProcessAction.cs b/src/Web/WebMVC/Services/ModelDTOs/OrderProcessAction.cs index c1309d59b..065f53dbc 100644 --- a/src/Web/WebMVC/Services/ModelDTOs/OrderProcessAction.cs +++ b/src/Web/WebMVC/Services/ModelDTOs/OrderProcessAction.cs @@ -1,9 +1,4 @@ -ļ»æusing System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace WebMVC.Services.ModelDTOs +ļ»ænamespace WebMVC.Services.ModelDTOs { public class OrderProcessAction { From 7161f547941af095c022a2a44ff4f4af82258081 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Tue, 4 Aug 2020 16:27:37 +0530 Subject: [PATCH 14/44] Updated dot-prop version to 5.1.1 (#1382) --- src/Web/WebSPA/package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json index 43ab8fbcd..61a0ffda1 100644 --- a/src/Web/WebSPA/package-lock.json +++ b/src/Web/WebSPA/package-lock.json @@ -6812,8 +6812,8 @@ "integrity": "sha512-l70mlQ7IjPKC8kT7GljQXJZmt5OqFL+RE91ik5y5WWQtsd9wP8R7gpFnNu96fK5MqAAZRXfLLsnzKtkty5fWGQ==" }, "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.1.1.tgz", "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", "dev": true, "requires": { From 5644d8eeeb6fe1db0df9e619fd376b1961ae7c1a Mon Sep 17 00:00:00 2001 From: Nish Anil Date: Tue, 4 Aug 2020 16:30:52 +0530 Subject: [PATCH 15/44] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c6f869f1e..c8f1969f5 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Sample .NET Core reference application, powered by Microsoft, based on a simplif _**Dev** branch contains the latest **beta** code and their images are tagged with `:linux-dev` in our [Docker Hub](https://hub.docker.com/u/eshop)_ -## New to **microservices** and **cloud-native development** !! +## Are you new to **microservices** and **cloud-native development**? Please take a look at this free course : [Create and deploy a cloud-native ASP.NET Core microservice](https://docs.microsoft.com/en-us/learn/modules/microservices-aspnet-core/). This MS Learn module will explain microservices concepts, cloud-native technologies, and reduce the friction in getting started with `eShopOnContainers`. ## Getting Started From 15c80dab3838fa3913247491252addfb5a06fb3d Mon Sep 17 00:00:00 2001 From: Nish Anil Date: Tue, 4 Aug 2020 16:32:43 +0530 Subject: [PATCH 16/44] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c8f1969f5..d296203a7 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Sample .NET Core reference application, powered by Microsoft, based on a simplif _**Dev** branch contains the latest **beta** code and their images are tagged with `:linux-dev` in our [Docker Hub](https://hub.docker.com/u/eshop)_ ## Are you new to **microservices** and **cloud-native development**? -Please take a look at this free course : [Create and deploy a cloud-native ASP.NET Core microservice](https://docs.microsoft.com/en-us/learn/modules/microservices-aspnet-core/). This MS Learn module will explain microservices concepts, cloud-native technologies, and reduce the friction in getting started with `eShopOnContainers`. +Take a look at the free course [Create and deploy a cloud-native ASP.NET Core microservice](https://docs.microsoft.com/en-us/learn/modules/microservices-aspnet-core/) on MS Learn. This module explains microservices concepts, cloud-native technologies, and reduce the friction in getting started with `eShopOnContainers`. ## Getting Started From 87552cf73a8d04cc6d4bb851a2c30af6cbc3d79c Mon Sep 17 00:00:00 2001 From: Sumit Ghosh <13281246+sughosneo@users.noreply.github.com> Date: Wed, 5 Aug 2020 11:00:18 +0530 Subject: [PATCH 17/44] Updated Readme. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 83832b343..d1a3d2e87 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Take a look at the free course [Create and deploy a cloud-native ASP.NET Core mi ### Basic scenario -The basic scenario can be run locally using docker compose, and also deployed to a local Kubernetes cluster. Refer to these Wiki pages to Get Started: +The basic scenario can be run locally using docker-compose, and also deployed to a local Kubernetes cluster. Refer to these Wiki pages to Get Started: - [CLI or Visual Studio Code](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Windows-setup) - [Visual Studio (F5 experience)](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Windows-setup#optional---use-visual-studio) From 6c3ab903ed82d3331bf7091d9593bec87302617c Mon Sep 17 00:00:00 2001 From: edmondshtogu Date: Fri, 7 Aug 2020 13:20:34 +0200 Subject: [PATCH 18/44] Fixed firewall rules check and improved the script the check shall be like ~ Get-NetFirewallRule -DisplayName eShopOnContainers-* -ErrorAction Stop --- ...irewall-rules-for-sts-auth-thru-docker.ps1 | 63 +++++++++++++------ 1 file changed, 45 insertions(+), 18 deletions(-) diff --git a/deploy/windows/add-firewall-rules-for-sts-auth-thru-docker.ps1 b/deploy/windows/add-firewall-rules-for-sts-auth-thru-docker.ps1 index 271b6a77d..9aad3e45c 100644 --- a/deploy/windows/add-firewall-rules-for-sts-auth-thru-docker.ps1 +++ b/deploy/windows/add-firewall-rules-for-sts-auth-thru-docker.ps1 @@ -1,26 +1,53 @@ -ļ»æparam([switch]$Elevated) +param( + [string]$Name = "eShopOnContainers", + [string]$InboundDisplayName = "eShopOnContainers-Inbound", + [string]$OutboundDisplayName = "eShopOnContainers-Outbound", + [switch]$Elevated + ) + function Check-Admin { -$currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent()) -$currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) + $currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent()) + $currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) } -if ((Check-Admin) -eq $false) { -if ($elevated) -{ -# could not elevate, quit +function Add-InboundRule { + New-NetFirewallRule -DisplayName $InboundDisplayName -Confirm -Description "$Name Inbound Rule for port range 5100-5150" -LocalAddress Any -LocalPort 5100-5150 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Inbound } - -else { - -Start-Process powershell.exe -Verb RunAs -ArgumentList ('-noprofile -noexit -file "{0}" -elevated' -f ($myinvocation.MyCommand.Definition)) +function Add-OutboundRule { + New-NetFirewallRule -DisplayName $OutboundDisplayName -Confirm -Description "$Name Outbound Rule for port range 5100-5150" -LocalAddress Any -LocalPort 5100-5150 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Outbound } -exit + +if ((Check-Admin) -eq $false) { + if ($elevated) + { + # could not elevate, quit + } + else { + Start-Process powershell.exe -Verb RunAs -ArgumentList ('-noprofile -noexit -file "{0}" -elevated' -f ($myinvocation.MyCommand.Definition)) + } + exit } + try { - Get-NetFirewallRule -DisplayName EshopDocker -ErrorAction Stop - Write-Host "Rule found" + $rules = $(Get-NetFirewallRule -DisplayName $Name-* -ErrorAction Stop | Out-String) + if (!$rules.Contains($InboundDisplayName) -and !$rules.Contains($OutboundDisplayName)) + { + Add-InboundRule + Add-OutboundRule + } + elseif (!$rules.Contains($InboundDisplayName)) + { + Add-InboundRule + } + elseif (!$rules.Contains($OutboundDisplayName)) + { + Add-OutboundRule + } + else{ + Write-Host "Rules found!" + } +} +catch [Exception] { + Add-InboundRule + Add-OutboundRule } - catch [Exception] { - New-NetFirewallRule -DisplayName eShopOnContainers-Inbound -Confirm -Description "eShopOnContainers Inbound Rule for port range 5100-5150" -LocalAddress Any -LocalPort 5100-5150 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Inbound - New-NetFirewallRule -DisplayName eShopOnContainers-Outbound -Confirm -Description "eShopOnContainers Outbound Rule for port range 5100-5150" -LocalAddress Any -LocalPort 5100-5150 -Protocol tcp -RemoteAddress Any -RemotePort Any -Direction Outbound -} \ No newline at end of file From 3a693de9dd655c6f5bb298d3928cd96c4788b9b1 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Wed, 12 Aug 2020 20:51:36 +0530 Subject: [PATCH 19/44] Updated serialize-javascript version to 3.1.0 (#1396) --- src/Web/WebSPA/package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json index 61a0ffda1..da6088a58 100644 --- a/src/Web/WebSPA/package-lock.json +++ b/src/Web/WebSPA/package-lock.json @@ -1478,8 +1478,8 @@ } }, "serialize-javascript": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.1.0.tgz", "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==", "dev": true }, From 8c0da9ab28e09f35070d6adbc0b351cee8558c83 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Thu, 13 Aug 2020 02:05:11 +0530 Subject: [PATCH 20/44] Update "minimist" version to 1.2.5 (#1398) --- src/Web/WebSPA/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json index da6088a58..c3e6ed779 100644 --- a/src/Web/WebSPA/package-lock.json +++ b/src/Web/WebSPA/package-lock.json @@ -687,7 +687,7 @@ } }, "minimist": { - "version": "0.0.8", + "version": "1.2.5", "bundled": true, "dev": true, "optional": true @@ -10185,8 +10185,8 @@ } }, "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, From 844348c48b8c627fdd265eb425f524480787f26b Mon Sep 17 00:00:00 2001 From: InstanceFactory Date: Tue, 18 Aug 2020 14:01:58 +0200 Subject: [PATCH 21/44] #1397: Replaced deprecated docker.for.win.localhost by host.docker.internal in src/.env (#1400) --- src/.env | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/.env b/src/.env index c802f18eb..96b801650 100644 --- a/src/.env +++ b/src/.env @@ -5,9 +5,9 @@ # The IP below should be swapped to your real IP or DNS name, like 192.168.88.248, etc. if testing from remote browsers or mobile devices # Use this values to run the app locally in Windows -ESHOP_EXTERNAL_DNS_NAME_OR_IP=docker.for.win.localhost -ESHOP_STORAGE_CATALOG_URL=http://docker.for.win.localhost:5202/c/api/v1/catalog/items/[0]/pic/ -ESHOP_STORAGE_MARKETING_URL=http://docker.for.win.localhost:5110/api/v1/campaigns/[0]/pic/ +ESHOP_EXTERNAL_DNS_NAME_OR_IP=host.docker.internal +ESHOP_STORAGE_CATALOG_URL=http://host.docker.internal:5202/c/api/v1/catalog/items/[0]/pic/ +ESHOP_STORAGE_MARKETING_URL=http://host.docker.internal:5110/api/v1/campaigns/[0]/pic/ # Use this values to run the app locally in Mac # ESHOP_EXTERNAL_DNS_NAME_OR_IP=docker.for.mac.localhost From 7dad5c0c2724cb282f0fc7edea509bad710e8844 Mon Sep 17 00:00:00 2001 From: Yosef Herskovitz <34112131+H3RSKO@users.noreply.github.com> Date: Thu, 20 Aug 2020 05:20:20 -0400 Subject: [PATCH 22/44] Updated Readme (#1402) Fixed sentence structure in Readme. Changed "and a several" to "with several." --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d1a3d2e87..ad35a6d2b 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Do you want to be up-to-date on .NET Architecture guidance and reference apps li ## Updated for .NET Core 3.1 (LTS) -eShopOnContainers is updated to .NET Core 3.1 "wave" of technologies. Not just compilation but also new recommended code in EF Core, ASP.NET Core, and other new related versions and a several significant changes. +eShopOnContainers is updated to .NET Core 3.1 "wave" of technologies. Not just compilation but also new recommended code in EF Core, ASP.NET Core, and other new related versions with several significant changes. **See more details in the [Release notes](https://github.com/dotnet-architecture/eShopOnContainers/wiki/Release-notes) wiki page**. From b426909d3619b27589aff0f1771c198b13262435 Mon Sep 17 00:00:00 2001 From: Dmytro Hridin Date: Thu, 20 Aug 2020 16:25:04 +0300 Subject: [PATCH 23/44] CatalogService: Fix issue with Status set when items list is empty (#1304) * Fix issue with Status set when items list is empty * Change method Count() call to Count property Co-authored-by: Dmytro Hridin --- .../Catalog/Catalog.API/Grpc/CatalogService.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Services/Catalog/Catalog.API/Grpc/CatalogService.cs b/src/Services/Catalog/Catalog.API/Grpc/CatalogService.cs index 13c7c8d2e..ef22b5be2 100644 --- a/src/Services/Catalog/Catalog.API/Grpc/CatalogService.cs +++ b/src/Services/Catalog/Catalog.API/Grpc/CatalogService.cs @@ -68,11 +68,10 @@ namespace Catalog.API.Grpc { var items = await GetItemsByIdsAsync(request.Ids); - if (!items.Any()) - { - context.Status = new Status(StatusCode.NotFound, $"ids value invalid. Must be comma-separated list of numbers"); - } - context.Status = new Status(StatusCode.OK, string.Empty); + context.Status = !items.Any() ? + new Status(StatusCode.NotFound, $"ids value invalid. Must be comma-separated list of numbers") : + new Status(StatusCode.OK, string.Empty); + return this.MapToResponse(items); } @@ -104,7 +103,7 @@ namespace Catalog.API.Grpc private PaginatedItemsResponse MapToResponse(List items) { - return this.MapToResponse(items, items.Count(), 1, items.Count()); + return this.MapToResponse(items, items.Count, 1, items.Count); } private PaginatedItemsResponse MapToResponse(List items, long count, int pageIndex, int pageSize) From 921de69418e3e980bea1bf69c2c72a2cf90b50e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Tue, 25 Aug 2020 11:52:08 +0100 Subject: [PATCH 24/44] refactored Equals() method on ValueObject (#1316) --- .../AggregatesModel/OrderAggregate/Address.cs | 2 +- .../Ordering.Domain/SeedWork/ValueObject.cs | 23 +-- .../Domain/SeedWork/ValueObjectTests.cs | 190 ++++++++++++++++++ 3 files changed, 197 insertions(+), 18 deletions(-) create mode 100644 src/Services/Ordering/Ordering.UnitTests/Domain/SeedWork/ValueObjectTests.cs diff --git a/src/Services/Ordering/Ordering.Domain/AggregatesModel/OrderAggregate/Address.cs b/src/Services/Ordering/Ordering.Domain/AggregatesModel/OrderAggregate/Address.cs index b552f5546..e2c78094d 100644 --- a/src/Services/Ordering/Ordering.Domain/AggregatesModel/OrderAggregate/Address.cs +++ b/src/Services/Ordering/Ordering.Domain/AggregatesModel/OrderAggregate/Address.cs @@ -23,7 +23,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.O ZipCode = zipcode; } - protected override IEnumerable GetAtomicValues() + protected override IEnumerable GetEqualityComponents() { // Using a yield return statement to return each element one at a time yield return Street; diff --git a/src/Services/Ordering/Ordering.Domain/SeedWork/ValueObject.cs b/src/Services/Ordering/Ordering.Domain/SeedWork/ValueObject.cs index 40fb117e1..5f36900ee 100644 --- a/src/Services/Ordering/Ordering.Domain/SeedWork/ValueObject.cs +++ b/src/Services/Ordering/Ordering.Domain/SeedWork/ValueObject.cs @@ -19,7 +19,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork return !(EqualOperator(left, right)); } - protected abstract IEnumerable GetAtomicValues(); + protected abstract IEnumerable GetEqualityComponents(); public override bool Equals(object obj) { @@ -27,26 +27,15 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork { return false; } - ValueObject other = (ValueObject)obj; - IEnumerator thisValues = GetAtomicValues().GetEnumerator(); - IEnumerator otherValues = other.GetAtomicValues().GetEnumerator(); - while (thisValues.MoveNext() && otherValues.MoveNext()) - { - if (ReferenceEquals(thisValues.Current, null) ^ ReferenceEquals(otherValues.Current, null)) - { - return false; - } - if (thisValues.Current != null && !thisValues.Current.Equals(otherValues.Current)) - { - return false; - } - } - return !thisValues.MoveNext() && !otherValues.MoveNext(); + + var other = (ValueObject)obj; + + return this.GetEqualityComponents().SequenceEqual(other.GetEqualityComponents()); } public override int GetHashCode() { - return GetAtomicValues() + return GetEqualityComponents() .Select(x => x != null ? x.GetHashCode() : 0) .Aggregate((x, y) => x ^ y); } diff --git a/src/Services/Ordering/Ordering.UnitTests/Domain/SeedWork/ValueObjectTests.cs b/src/Services/Ordering/Ordering.UnitTests/Domain/SeedWork/ValueObjectTests.cs new file mode 100644 index 000000000..7eed01fe6 --- /dev/null +++ b/src/Services/Ordering/Ordering.UnitTests/Domain/SeedWork/ValueObjectTests.cs @@ -0,0 +1,190 @@ +ļ»æusing Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Xunit; + +namespace Ordering.UnitTests.Domain.SeedWork +{ + public class ValueObjectTests + { + public ValueObjectTests() + { } + + [Theory] + [MemberData(nameof(EqualValueObjects))] + public void Equals_EqualValueObjects_ReturnsTrue(ValueObject instanceA, ValueObject instanceB, string reason) + { + // Act + var result = EqualityComparer.Default.Equals(instanceA, instanceB); + + // Assert + Assert.True(result, reason); + } + + [Theory] + [MemberData(nameof(NonEqualValueObjects))] + public void Equals_NonEqualValueObjects_ReturnsFalse(ValueObject instanceA, ValueObject instanceB, string reason) + { + // Act + var result = EqualityComparer.Default.Equals(instanceA, instanceB); + + // Assert + Assert.False(result, reason); + } + + private static readonly ValueObject APrettyValueObject = new ValueObjectA(1, "2", Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), new ComplexObject(2, "3")); + + public static readonly TheoryData EqualValueObjects = new TheoryData + { + { + null, + null, + "they should be equal because they are both null" + }, + { + APrettyValueObject, + APrettyValueObject, + "they should be equal because they are the same object" + }, + { + new ValueObjectA(1, "2", Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), new ComplexObject(2, "3")), + new ValueObjectA(1, "2", Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), new ComplexObject(2, "3")), + "they should be equal because they have equal members" + }, + { + new ValueObjectA(1, "2", Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), new ComplexObject(2, "3"), notAnEqualityComponent: "xpto"), + new ValueObjectA(1, "2", Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), new ComplexObject(2, "3"), notAnEqualityComponent: "xpto2"), + "they should be equal because all equality components are equal, even though an additional member was set" + }, + { + new ValueObjectB(1, "2", 1, 2, 3 ), + new ValueObjectB(1, "2", 1, 2, 3 ), + "they should be equal because all equality components are equal, including the 'C' list" + } + }; + + public static readonly TheoryData NonEqualValueObjects = new TheoryData + { + { + new ValueObjectA(a: 1, b: "2", c: Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), d: new ComplexObject(2, "3")), + new ValueObjectA(a: 2, b: "2", c: Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), d: new ComplexObject(2, "3")), + "they should not be equal because the 'A' member on ValueObjectA is different among them" + }, + { + new ValueObjectA(a: 1, b: "2", c: Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), d: new ComplexObject(2, "3")), + new ValueObjectA(a: 1, b: null, c: Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), d: new ComplexObject(2, "3")), + "they should not be equal because the 'B' member on ValueObjectA is different among them" + }, + { + new ValueObjectA(a: 1, b: "2", c: Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), d: new ComplexObject(a: 2, b: "3")), + new ValueObjectA(a: 1, b: "2", c: Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), d: new ComplexObject(a: 3, b: "3")), + "they should not be equal because the 'A' member on ValueObjectA's 'D' member is different among them" + }, + { + new ValueObjectA(a: 1, b: "2", c: Guid.Parse("97ea43f0-6fef-4fb7-8c67-9114a7ff6ec0"), d: new ComplexObject(a: 2, b: "3")), + new ValueObjectB(a: 1, b: "2"), + "they should not be equal because they are not of the same type" + }, + { + new ValueObjectB(1, "2", 1, 2, 3 ), + new ValueObjectB(1, "2", 1, 2, 3, 4 ), + "they should be not be equal because the 'C' list contains one additional value" + }, + { + new ValueObjectB(1, "2", 1, 2, 3, 5 ), + new ValueObjectB(1, "2", 1, 2, 3 ), + "they should be not be equal because the 'C' list contains one additional value" + }, + { + new ValueObjectB(1, "2", 1, 2, 3, 5 ), + new ValueObjectB(1, "2", 1, 2, 3, 4 ), + "they should be not be equal because the 'C' lists are not equal" + } + + }; + + private class ValueObjectA : ValueObject + { + public ValueObjectA(int a, string b, Guid c, ComplexObject d, string notAnEqualityComponent = null) + { + A = a; + B = b; + C = c; + D = d; + NotAnEqualityComponent = notAnEqualityComponent; + } + + public int A { get; } + public string B { get; } + public Guid C { get; } + public ComplexObject D { get; } + public string NotAnEqualityComponent { get; } + + protected override IEnumerable GetEqualityComponents() + { + yield return A; + yield return B; + yield return C; + yield return D; + } + } + + private class ValueObjectB : ValueObject + { + public ValueObjectB(int a, string b, params int[] c) + { + A = a; + B = b; + C = c.ToList(); + } + + public int A { get; } + public string B { get; } + + public List C { get; } + + protected override IEnumerable GetEqualityComponents() + { + yield return A; + yield return B; + + foreach (var c in C) + { + yield return c; + } + } + } + + private class ComplexObject : IEquatable + { + public ComplexObject(int a, string b) + { + A = a; + B = b; + } + + public int A { get; set; } + + public string B { get; set; } + + public override bool Equals(object obj) + { + return Equals(obj as ComplexObject); + } + + public bool Equals(ComplexObject other) + { + return other != null && + A == other.A && + B == other.B; + } + + public override int GetHashCode() + { + return HashCode.Combine(A, B); + } + } + } +} From df2c2bb10ee9942e98aecb1be2d15c8404262bd4 Mon Sep 17 00:00:00 2001 From: InstanceFactory Date: Wed, 26 Aug 2020 16:36:44 +0200 Subject: [PATCH 25/44] Fix/1403and1404 removed duplicate Key SubscriptionClientName and added app.UseAuthorization() call (#1406) * #1403 removed duplicate Key SubscriptionClientName Removed duplicate key SubscriptionClientName from Tests/Services/Application.FunctionalTests/Services/Marketing/appsettings.json and sorted its content in asc order. * #1404 Added app.UseAuthorization() call Added app.UseAuthorization() call to BasketTestsStartup, LocationsTestsStartup, and MarketingTestsStartup to fix failed unit tests IntegrationEventsScenarios.Post_update_product_price_and_catalog_and_basket_list_modified and MarketingScenarios.Set_new_user_location_and_get_location_campaign_by_user_id (see #1404) --- .../Services/Basket/BasketTestsStartup.cs | 1 + .../Services/Location/LocationsTestsStartup.cs | 1 + .../Services/Marketing/MarketingTestsStartup.cs | 1 + .../Services/Marketing/appsettings.json | 9 ++++----- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Basket/BasketTestsStartup.cs b/src/Tests/Services/Application.FunctionalTests/Services/Basket/BasketTestsStartup.cs index cfb91fd40..6043a7ab3 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Basket/BasketTestsStartup.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Basket/BasketTestsStartup.cs @@ -16,6 +16,7 @@ namespace FunctionalTests.Services.Basket if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant()) { app.UseMiddleware(); + app.UseAuthorization(); } else { diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs b/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs index fce808759..709c4e7eb 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Location/LocationsTestsStartup.cs @@ -19,6 +19,7 @@ if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant()) { app.UseMiddleware(); + app.UseAuthorization(); } else { diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingTestsStartup.cs b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingTestsStartup.cs index ae5f4453b..d5d824867 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingTestsStartup.cs +++ b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/MarketingTestsStartup.cs @@ -16,6 +16,7 @@ if (Configuration["isTest"] == bool.TrueString.ToLowerInvariant()) { app.UseMiddleware(); + app.UseAuthorization(); } else { diff --git a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/appsettings.json b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/appsettings.json index 2aa46abe6..6d2d7870d 100644 --- a/src/Tests/Services/Application.FunctionalTests/Services/Marketing/appsettings.json +++ b/src/Tests/Services/Application.FunctionalTests/Services/Marketing/appsettings.json @@ -1,12 +1,11 @@ ļ»æ{ + "AzureServiceBusEnabled": false, "ConnectionString": "Server=tcp:127.0.0.1,5433;Initial Catalog=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word", - "MongoConnectionString": "mongodb://localhost:27017", - "MongoDatabase": "MarketingDb", + "EventBusConnection": "localhost", "IdentityUrl": "http://localhost:5105", "isTest": "true", - "EventBusConnection": "localhost", - "AzureServiceBusEnabled": false, - "SubscriptionClientName": "Marketing", + "MongoConnectionString": "mongodb://localhost:27017", + "MongoDatabase": "MarketingDb", "PicBaseUrl": "http://localhost:5110/api/v1/campaigns/[0]/pic/", "SubscriptionClientName": "Marketing" } From 85aea20046ef495ba44c5d6031c75960aa316eb4 Mon Sep 17 00:00:00 2001 From: hfz-r <39443205+hfz-r@users.noreply.github.com> Date: Thu, 27 Aug 2020 17:57:18 +0800 Subject: [PATCH 26/44] Fix for Campaigns exception and SignalR 401 Unauthorized (#1374) * update API Gateway - /locations-api/ @ webmarketing/envoy.yaml * updated signalr services - envoy: webmarketingapigw - latest client: webmvc - service hub: ordering-signalrhub Co-authored-by: hfz-r --- .../Envoy/config/webmarketing/envoy.yaml | 13 ++++++++++++ .../Envoy/config/webshopping/envoy.yaml | 3 +++ .../Ordering/Ordering.SignalrHub/Startup.cs | 21 ++++++++++++++++--- .../WebMVC/Controllers/AccountController.cs | 3 ++- src/Web/WebMVC/Services/LocationService.cs | 2 +- src/Web/WebMVC/libman.json | 2 +- 6 files changed, 38 insertions(+), 6 deletions(-) diff --git a/src/ApiGateways/Envoy/config/webmarketing/envoy.yaml b/src/ApiGateways/Envoy/config/webmarketing/envoy.yaml index c6f3421de..11ef504da 100644 --- a/src/ApiGateways/Envoy/config/webmarketing/envoy.yaml +++ b/src/ApiGateways/Envoy/config/webmarketing/envoy.yaml @@ -36,6 +36,19 @@ static_resources: route: auto_host_rewrite: true cluster: marketing + - name: "l-short" + match: + prefix: "/l/" + route: + auto_host_rewrite: true + prefix_rewrite: "/locations-api/" + cluster: locations + - name: "l-long" + match: + prefix: "/locations-api/" + route: + auto_host_rewrite: true + cluster: locations http_filters: - name: envoy.router access_log: diff --git a/src/ApiGateways/Envoy/config/webshopping/envoy.yaml b/src/ApiGateways/Envoy/config/webshopping/envoy.yaml index 1ae8c45a1..688fb740c 100644 --- a/src/ApiGateways/Envoy/config/webshopping/envoy.yaml +++ b/src/ApiGateways/Envoy/config/webshopping/envoy.yaml @@ -56,6 +56,9 @@ static_resources: auto_host_rewrite: true cluster: signalr-hub timeout: 300s + upgrade_configs: + upgrade_type: "websocket" + enabled: true - name: "b-short" match: prefix: "/b/" diff --git a/src/Services/Ordering/Ordering.SignalrHub/Startup.cs b/src/Services/Ordering/Ordering.SignalrHub/Startup.cs index a20a1a196..23aaa7c78 100644 --- a/src/Services/Ordering/Ordering.SignalrHub/Startup.cs +++ b/src/Services/Ordering/Ordering.SignalrHub/Startup.cs @@ -19,6 +19,7 @@ using Ordering.SignalrHub.IntegrationEvents.EventHandling; using Ordering.SignalrHub.IntegrationEvents.Events; using RabbitMQ.Client; using System; +using System.Threading.Tasks; using System.IdentityModel.Tokens.Jwt; namespace Ordering.SignalrHub @@ -109,7 +110,7 @@ namespace Ordering.SignalrHub RegisterEventBus(services); services.AddOptions(); - + //configure autofac var container = new ContainerBuilder(); container.RegisterModule(new ApplicationModule()); @@ -133,7 +134,7 @@ namespace Ordering.SignalrHub loggerFactory.CreateLogger().LogDebug("Using PATH BASE '{pathBase}'", pathBase); app.UsePathBase(pathBase); } - + app.UseRouting(); app.UseCors("CorsPolicy"); app.UseAuthentication(); @@ -150,7 +151,7 @@ namespace Ordering.SignalrHub { Predicate = r => r.Name.Contains("self") }); - endpoints.MapHub("/hub/notificationhub", options => options.Transports = Microsoft.AspNetCore.Http.Connections.HttpTransports.All); + endpoints.MapHub("/hub/notificationhub"); }); ConfigureEventBus(app); @@ -185,6 +186,20 @@ namespace Ordering.SignalrHub options.Authority = identityUrl; options.RequireHttpsMetadata = false; options.Audience = "orders.signalrhub"; + options.Events = new JwtBearerEvents + { + OnMessageReceived = context => + { + var accessToken = context.Request.Query["access_token"]; + + var path = context.HttpContext.Request.Path; + if (!string.IsNullOrEmpty(accessToken) && (path.StartsWithSegments("/hub/notificationhub"))) + { + context.Token = accessToken; + } + return Task.CompletedTask; + } + }; }); } diff --git a/src/Web/WebMVC/Controllers/AccountController.cs b/src/Web/WebMVC/Controllers/AccountController.cs index 8b82498ba..68dd166db 100644 --- a/src/Web/WebMVC/Controllers/AccountController.cs +++ b/src/Web/WebMVC/Controllers/AccountController.cs @@ -20,7 +20,8 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers _logger = logger ?? throw new ArgumentNullException(nameof(logger)); } - [Authorize(AuthenticationSchemes = "OpenIdConnect")] public async Task SignIn(string returnUrl) + [Authorize(AuthenticationSchemes = "OpenIdConnect")] + public async Task SignIn(string returnUrl) { var user = User as ClaimsPrincipal; var token = await HttpContext.GetTokenAsync("access_token"); diff --git a/src/Web/WebMVC/Services/LocationService.cs b/src/Web/WebMVC/Services/LocationService.cs index 8d81cbd22..4619cfd6a 100644 --- a/src/Web/WebMVC/Services/LocationService.cs +++ b/src/Web/WebMVC/Services/LocationService.cs @@ -23,7 +23,7 @@ namespace WebMVC.Services _settings = settings; _logger = logger; - _remoteServiceBaseUrl = $"{_settings.Value.MarketingUrl}/api/v1/l/locations/"; + _remoteServiceBaseUrl = $"{_settings.Value.MarketingUrl}/l/api/v1/locations/"; } public async Task CreateOrUpdateUserLocation(LocationDTO location) diff --git a/src/Web/WebMVC/libman.json b/src/Web/WebMVC/libman.json index f7b9d3763..b80fb4ecc 100644 --- a/src/Web/WebMVC/libman.json +++ b/src/Web/WebMVC/libman.json @@ -37,7 +37,7 @@ }, { "provider": "unpkg", - "library": "@microsoft/signalr@3.0.1", + "library": "@microsoft/signalr@latest", "destination": "wwwroot/lib/@microsoft/signalr/", "files": [ "dist/browser/signalr.js", From 7617ee48805a989b328cb837820529d303d379d3 Mon Sep 17 00:00:00 2001 From: Majid Ali Khan Quaid Date: Thu, 27 Aug 2020 15:00:59 +0500 Subject: [PATCH 27/44] Mis-Spelled 'client' (#1411) --- src/Services/Location/Locations.API/appsettings.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Services/Location/Locations.API/appsettings.json b/src/Services/Location/Locations.API/appsettings.json index 7fbe98b3e..3ee24b242 100644 --- a/src/Services/Location/Locations.API/appsettings.json +++ b/src/Services/Location/Locations.API/appsettings.json @@ -23,7 +23,7 @@ "UseVault": false, "Vault": { "Name": "eshop", - "ClientId": "your-clien-id", + "ClientId": "your-client-id", "ClientSecret": "your-client-secret" } -} \ No newline at end of file +} From 66d81f6ea9c47c88096df4c48ea2b858498451b8 Mon Sep 17 00:00:00 2001 From: Javier Vela Date: Fri, 28 Aug 2020 08:00:02 +0200 Subject: [PATCH 28/44] fix parameter error in multiarch job (#1413) --- build/azure-devops/multiarch.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/azure-devops/multiarch.yaml b/build/azure-devops/multiarch.yaml index 162128d0a..1639fff87 100644 --- a/build/azure-devops/multiarch.yaml +++ b/build/azure-devops/multiarch.yaml @@ -26,7 +26,7 @@ jobs: mkdir -p ~/.docker sed '$ s/.$//' $DOCKER_CONFIG/config.json > ~/.docker/config.json echo ',"experimental": "enabled" }' >> ~/.docker/config.json - docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:{{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:linux-${{ parameters.branch }} + docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }} ${{ parameters.registry }}/${{ parameters.image }}:linux-${{ parameters.branch }} docker --config ~/.docker manifest create ${{ parameters.registry }}/${{ parameters.image }}:latest ${{ parameters.registry }}/${{ parameters.image }}:linux-latest docker --config ~/.docker manifest push ${{ parameters.registry }}/${{ parameters.image }}:${{ parameters.branch }} docker --config ~/.docker manifest push ${{ parameters.registry }}/${{ parameters.image }}:latest From 8f84bd3d09773fc28426e9f58cc538f492031404 Mon Sep 17 00:00:00 2001 From: Facundo La Rocca Date: Fri, 28 Aug 2020 07:37:41 -0300 Subject: [PATCH 29/44] Private readonly string changed to private const string (#1288) --- .../EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs index 5623549d5..6ee3032a8 100644 --- a/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs +++ b/src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.cs @@ -21,12 +21,12 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ public class EventBusRabbitMQ : IEventBus, IDisposable { const string BROKER_NAME = "eshop_event_bus"; + const string AUTOFAC_SCOPE_NAME = "eshop_event_bus"; private readonly IRabbitMQPersistentConnection _persistentConnection; private readonly ILogger _logger; private readonly IEventBusSubscriptionsManager _subsManager; private readonly ILifetimeScope _autofac; - private readonly string AUTOFAC_SCOPE_NAME = "eshop_event_bus"; private readonly int _retryCount; private IModel _consumerChannel; @@ -86,7 +86,6 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ using (var channel = _persistentConnection.CreateModel()) { - _logger.LogTrace("Declaring RabbitMQ exchange to publish event: {EventId}", @event.Id); channel.ExchangeDeclare(exchange: BROKER_NAME, type: "direct"); From 313879e52b7e80490860470885f2b2da973bbf8d Mon Sep 17 00:00:00 2001 From: Nabil Sedoud Date: Mon, 31 Aug 2020 09:42:34 +0100 Subject: [PATCH 30/44] fix disposing of direct instantiated objects in calalog service #1392 (#1395) --- .../Services/IntegrationEventLogService.cs | 23 ++++++++++++++++++- .../CatalogIntegrationEventService.cs | 22 +++++++++++++++++- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/src/BuildingBlocks/EventBus/IntegrationEventLogEF/Services/IntegrationEventLogService.cs b/src/BuildingBlocks/EventBus/IntegrationEventLogEF/Services/IntegrationEventLogService.cs index 800b99a38..22c5e1fba 100644 --- a/src/BuildingBlocks/EventBus/IntegrationEventLogEF/Services/IntegrationEventLogService.cs +++ b/src/BuildingBlocks/EventBus/IntegrationEventLogEF/Services/IntegrationEventLogService.cs @@ -15,11 +15,12 @@ using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Services { - public class IntegrationEventLogService : IIntegrationEventLogService + public class IntegrationEventLogService : IIntegrationEventLogService,IDisposable { private readonly IntegrationEventLogContext _integrationEventLogContext; private readonly DbConnection _dbConnection; private readonly List _eventTypes; + private volatile bool disposedValue; public IntegrationEventLogService(DbConnection dbConnection) { @@ -89,5 +90,25 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Servi return _integrationEventLogContext.SaveChangesAsync(); } + + protected virtual void Dispose(bool disposing) + { + if (!disposedValue) + { + if (disposing) + { + _integrationEventLogContext?.Dispose(); + } + + + disposedValue = true; + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } } } diff --git a/src/Services/Catalog/Catalog.API/IntegrationEvents/CatalogIntegrationEventService.cs b/src/Services/Catalog/Catalog.API/IntegrationEvents/CatalogIntegrationEventService.cs index bb3a23d40..3e7ba9868 100644 --- a/src/Services/Catalog/Catalog.API/IntegrationEvents/CatalogIntegrationEventService.cs +++ b/src/Services/Catalog/Catalog.API/IntegrationEvents/CatalogIntegrationEventService.cs @@ -14,13 +14,14 @@ using System.Threading.Tasks; namespace Catalog.API.IntegrationEvents { - public class CatalogIntegrationEventService : ICatalogIntegrationEventService + public class CatalogIntegrationEventService : ICatalogIntegrationEventService,IDisposable { private readonly Func _integrationEventLogServiceFactory; private readonly IEventBus _eventBus; private readonly CatalogContext _catalogContext; private readonly IIntegrationEventLogService _eventLogService; private readonly ILogger _logger; + private volatile bool disposedValue; public CatalogIntegrationEventService( ILogger logger, @@ -65,5 +66,24 @@ namespace Catalog.API.IntegrationEvents await _eventLogService.SaveEventAsync(evt, _catalogContext.Database.CurrentTransaction); }); } + + protected virtual void Dispose(bool disposing) + { + if (!disposedValue) + { + if (disposing) + { + (_eventLogService as IDisposable)?.Dispose(); + } + + disposedValue = true; + } + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } } } From 0cb8424fdca35f99e859cfdd72f6311469545fe4 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Tue, 8 Sep 2020 17:15:02 +0530 Subject: [PATCH 31/44] Updated version of different packages. (#1420) --- src/Web/WebSPA/package-lock.json | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json index c3e6ed779..4514d955f 100644 --- a/src/Web/WebSPA/package-lock.json +++ b/src/Web/WebSPA/package-lock.json @@ -1863,8 +1863,8 @@ } }, "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", "dev": true, "requires": { @@ -2943,9 +2943,9 @@ } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -8541,13 +8541,20 @@ "integrity": "sha512-cZdEF7r4gfRIq7ezX9J0T+kQmJNOub71dWbgAXVHDct80TKP4MCETtZQ31xyv38UwgzkWPYF/Xc0ge55dW9Z9w==" }, "http-proxy": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz", - "integrity": "sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g==", + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", + "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", "requires": { - "eventemitter3": "^3.0.0", + "eventemitter3": "^4.0.0", "follow-redirects": "^1.0.0", "requires-port": "^1.0.0" + }, + "dependencies": { + "eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" + } } }, "http-proxy-agent": { @@ -17255,9 +17262,9 @@ } }, "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "requires": { "camelcase": "^4.1.0" } From 7c1261bf6983ee6c04f181c60455d483791b3e62 Mon Sep 17 00:00:00 2001 From: jeremiahflaga Date: Mon, 14 Sep 2020 17:26:22 +0800 Subject: [PATCH 32/44] for issue #1423: changed literal string "OpenIdConnect" to constant string (#1424) Co-authored-by: Jeremiah Flaga --- src/Web/WebMVC/Controllers/AccountController.cs | 4 ++-- src/Web/WebMVC/Controllers/CampaignsController.cs | 3 ++- src/Web/WebMVC/Controllers/CartController.cs | 3 ++- src/Web/WebMVC/Controllers/OrderController.cs | 3 ++- src/Web/WebMVC/Controllers/OrderManagementController.cs | 3 ++- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Web/WebMVC/Controllers/AccountController.cs b/src/Web/WebMVC/Controllers/AccountController.cs index 68dd166db..fba04f26d 100644 --- a/src/Web/WebMVC/Controllers/AccountController.cs +++ b/src/Web/WebMVC/Controllers/AccountController.cs @@ -10,7 +10,7 @@ using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.WebMVC.Controllers { - [Authorize(AuthenticationSchemes = "OpenIdConnect")] + [Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)] public class AccountController : Controller { private readonly ILogger _logger; @@ -20,7 +20,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers _logger = logger ?? throw new ArgumentNullException(nameof(logger)); } - [Authorize(AuthenticationSchemes = "OpenIdConnect")] + [Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)] public async Task SignIn(string returnUrl) { var user = User as ClaimsPrincipal; diff --git a/src/Web/WebMVC/Controllers/CampaignsController.cs b/src/Web/WebMVC/Controllers/CampaignsController.cs index cf210318b..920269467 100644 --- a/src/Web/WebMVC/Controllers/CampaignsController.cs +++ b/src/Web/WebMVC/Controllers/CampaignsController.cs @@ -11,8 +11,9 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers using System.Threading.Tasks; using ViewModels; using ViewModels.Pagination; + using Microsoft.AspNetCore.Authentication.OpenIdConnect; - [Authorize(AuthenticationSchemes = "OpenIdConnect")] + [Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)] public class CampaignsController : Controller { private readonly ICampaignService _campaignService; diff --git a/src/Web/WebMVC/Controllers/CartController.cs b/src/Web/WebMVC/Controllers/CartController.cs index 78cec5670..d7e577c25 100644 --- a/src/Web/WebMVC/Controllers/CartController.cs +++ b/src/Web/WebMVC/Controllers/CartController.cs @@ -1,3 +1,4 @@ +using Microsoft.AspNetCore.Authentication.OpenIdConnect; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.eShopOnContainers.WebMVC.Services; @@ -8,7 +9,7 @@ using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.WebMVC.Controllers { - [Authorize(AuthenticationSchemes = "OpenIdConnect")] + [Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)] public class CartController : Controller { private readonly IBasketService _basketSvc; diff --git a/src/Web/WebMVC/Controllers/OrderController.cs b/src/Web/WebMVC/Controllers/OrderController.cs index f308d0bdc..d5e98552a 100644 --- a/src/Web/WebMVC/Controllers/OrderController.cs +++ b/src/Web/WebMVC/Controllers/OrderController.cs @@ -1,3 +1,4 @@ +using Microsoft.AspNetCore.Authentication.OpenIdConnect; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.eShopOnContainers.WebMVC.Services; @@ -7,7 +8,7 @@ using System.Threading.Tasks; namespace Microsoft.eShopOnContainers.WebMVC.Controllers { - [Authorize(AuthenticationSchemes = "OpenIdConnect")] + [Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)] public class OrderController : Controller { private IOrderingService _orderSvc; diff --git a/src/Web/WebMVC/Controllers/OrderManagementController.cs b/src/Web/WebMVC/Controllers/OrderManagementController.cs index a488dc4ae..6963c469d 100644 --- a/src/Web/WebMVC/Controllers/OrderManagementController.cs +++ b/src/Web/WebMVC/Controllers/OrderManagementController.cs @@ -7,10 +7,11 @@ using WebMVC.Services.ModelDTOs; using Microsoft.eShopOnContainers.WebMVC.Services; using Microsoft.eShopOnContainers.WebMVC.ViewModels; using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Authentication.OpenIdConnect; namespace WebMVC.Controllers { - [Authorize(AuthenticationSchemes = "OpenIdConnect")] + [Authorize(AuthenticationSchemes = OpenIdConnectDefaults.AuthenticationScheme)] public class OrderManagementController : Controller { private IOrderingService _orderSvc; From 6a9a78132310abb54c4fbaccfc8dcc55c2b24ac7 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Tue, 15 Sep 2020 16:34:07 +0530 Subject: [PATCH 33/44] Updated node-fetch package version. (#1426) * Updated node-fetch package version. * Updated node-forge version. --- src/Web/WebSPA/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json index 4514d955f..052f24469 100644 --- a/src/Web/WebSPA/package-lock.json +++ b/src/Web/WebSPA/package-lock.json @@ -1236,8 +1236,8 @@ "dev": true }, "node-forge": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", "integrity": "sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==", "dev": true }, @@ -10388,8 +10388,8 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, "node-fetch": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", "requires": { "encoding": "^0.1.11", @@ -10408,8 +10408,8 @@ } }, "node-forge": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==" }, "node-libs-browser": { From 04ab1279d92f1dcda64e1e40468bd4680a0223c8 Mon Sep 17 00:00:00 2001 From: Wojciech Rak Date: Fri, 18 Sep 2020 20:59:57 +0200 Subject: [PATCH 34/44] Fixes #1474: webspa container does not build when running docker-compose up.Updated sha hashes in packages-lock.json (#1475) --- src/Web/WebSPA/package-lock.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json index 052f24469..09a5d0707 100644 --- a/src/Web/WebSPA/package-lock.json +++ b/src/Web/WebSPA/package-lock.json @@ -1238,8 +1238,7 @@ "node-forge": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", - "integrity": "sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==", - "dev": true + "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" }, "node-libs-browser": { "version": "2.2.1", @@ -10410,7 +10409,7 @@ "node-forge": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", - "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ==" + "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==" }, "node-libs-browser": { "version": "2.2.1", From 0b4f44659dc7e8fc6e2a942b16caf02c87532b9a Mon Sep 17 00:00:00 2001 From: Zakaria <23211915+zakaria-c@users.noreply.github.com> Date: Wed, 23 Sep 2020 07:45:53 +0200 Subject: [PATCH 35/44] Change ReadAllBytes to ReadAllBytesAsync in PicController (#1425) --- src/Services/Catalog/Catalog.API/Controllers/PicController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Services/Catalog/Catalog.API/Controllers/PicController.cs b/src/Services/Catalog/Catalog.API/Controllers/PicController.cs index 0aa376832..31c93683c 100644 --- a/src/Services/Catalog/Catalog.API/Controllers/PicController.cs +++ b/src/Services/Catalog/Catalog.API/Controllers/PicController.cs @@ -46,7 +46,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers string imageFileExtension = Path.GetExtension(item.PictureFileName); string mimetype = GetImageMimeTypeFromImageFileExtension(imageFileExtension); - var buffer = System.IO.File.ReadAllBytes(path); + var buffer = await System.IO.File.ReadAllBytesAsync(path); return File(buffer, mimetype); } From 78db4b758c57cb2767131b5f434b3e3232b91ed2 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Wed, 21 Oct 2020 16:33:29 +0530 Subject: [PATCH 36/44] Fixed parameter bug create resource script (#1494) --- deploy/azure/az/createresources.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/azure/az/createresources.sh b/deploy/azure/az/createresources.sh index 3a71ca8fd..096befe6c 100644 --- a/deploy/azure/az/createresources.sh +++ b/deploy/azure/az/createresources.sh @@ -51,8 +51,8 @@ if [ ! -f "$1.json" ]; then exit 1 fi -if [ ! -f "$2.parameters.json" ]; then - echo "$2.parameters.json doesn't exist" +if [ ! -f "$1.parameters.json" ]; then + echo "$1.parameters.json doesn't exist" exit 1 fi From d910eb416d0f36fc36558e7b4832c93b910401ac Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Wed, 21 Oct 2020 16:34:21 +0530 Subject: [PATCH 37/44] Fixed invalid number format in webspa (#1496) --- src/Web/WebSPA/Client/modules/catalog/catalog.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Web/WebSPA/Client/modules/catalog/catalog.component.html b/src/Web/WebSPA/Client/modules/catalog/catalog.component.html index 96f05db56..d03b8433b 100644 --- a/src/Web/WebSPA/Client/modules/catalog/catalog.component.html +++ b/src/Web/WebSPA/Client/modules/catalog/catalog.component.html @@ -40,7 +40,7 @@ {{item.name}}
- {{item.price | number:'3.2-2'}} + {{item.price | number:'.2-2'}}
From b196622846ec9de2309d22e4ae91232edc7cf9a1 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Wed, 21 Oct 2020 16:34:55 +0530 Subject: [PATCH 38/44] Updated package version of webpack-subresource-integrity (#1497) --- src/Web/WebSPA/package-lock.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json index 09a5d0707..3c3a97fda 100644 --- a/src/Web/WebSPA/package-lock.json +++ b/src/Web/WebSPA/package-lock.json @@ -74,7 +74,7 @@ "webpack-dev-server": "3.9.0", "webpack-merge": "4.2.1", "webpack-sources": "1.4.3", - "webpack-subresource-integrity": "1.1.0-rc.6", + "webpack-subresource-integrity": "1.5.1", "worker-plugin": "3.2.0" }, "dependencies": { @@ -16876,9 +16876,9 @@ } }, "webpack-subresource-integrity": { - "version": "1.1.0-rc.6", - "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.1.0-rc.6.tgz", - "integrity": "sha512-Az7y8xTniNhaA0620AV1KPwWOqawurVVDzQSpPAeR5RwNbL91GoBSJAAo9cfd+GiFHwsS5bbHepBw1e6Hzxy4w==", + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-1.5.1.tgz", + "integrity": "sha512-uekbQ93PZ9e7BFB8Hl9cFIVYQyQqiXp2ExKk9Zv+qZfH/zHXHrCFAfw1VW0+NqWbTWrs/HnuDrto3+tiPXh//Q==", "dev": true, "requires": { "webpack-core": "^0.6.8" From 388d0b7b5d6f983728dca3d9e1fb8fb9fc9f450e Mon Sep 17 00:00:00 2001 From: ansonzhang <3143422472@qq.com> Date: Thu, 5 Nov 2020 06:12:21 -0600 Subject: [PATCH 39/44] Fixed #1495 bug : UseLoadTest missing claimsType (#1508) * Update ByPassAuthMiddleware.cs * Update ByPassAuthMiddleware.cs * remove WebMVC/ByPassAuthMiddleware duplicate cliam * remove Ordering.API/ByPassAuthMid duplicate cliam * remove Location.API/ByPassAuthMid duplicate cliam * remove Market.API/ByPassAuthMid duplicate cliam * change webmvc bypassauth: claimType of sub * change ordering bypassauth: claimType of sub * change location bypassauth: claimType of sub * change market bypassauth: claimType of sub --- .../Infrastructure/Middlewares/ByPassAuthMiddleware.cs | 6 +++--- .../Infrastructure/Middlewares/ByPassAuthMiddleware.cs | 6 +++--- .../Infrastructure/Middlewares/ByPassAuthMiddleware.cs | 6 +++--- .../Infrastructure/Middlewares/ByPassAuthMiddleware.cs | 4 ++-- .../Infrastructure/Middlewares/ByPassAuthMiddleware.cs | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs index dfe690f6f..2f5eb28b6 100644 --- a/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs +++ b/src/Services/Basket/Basket.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs @@ -61,11 +61,11 @@ namespace Basket.API.Infrastructure.Middlewares var user = new ClaimsIdentity(new[] { new Claim("emails", currentUserId), new Claim("name", "Test user"), + new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/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.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"), - new Claim("sub", "1234"), + new Claim("sub", currentUserId), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")} , "ByPassAuth"); diff --git a/src/Services/Location/Locations.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs b/src/Services/Location/Locations.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs index ae21d10cc..e6b43d109 100644 --- a/src/Services/Location/Locations.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs +++ b/src/Services/Location/Locations.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs @@ -61,10 +61,10 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Midd var user = new ClaimsIdentity(new[] { new Claim("emails", currentUserId), new Claim("name", "Test user"), + new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/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("sub", "1234"), + new Claim("http://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), + new Claim("sub", currentUserId), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")} , "ByPassAuth"); diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs b/src/Services/Marketing/Marketing.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs index d89e15a7c..6f4ff16e2 100644 --- a/src/Services/Marketing/Marketing.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs +++ b/src/Services/Marketing/Marketing.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs @@ -60,10 +60,10 @@ namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Midd var user = new ClaimsIdentity(new[] { new Claim("emails", currentUserId), new Claim("name", "Test user"), + new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/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("sub", "1234"), + new Claim("http://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), + new Claim("sub", currentUserId), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")} , "ByPassAuth"); diff --git a/src/Services/Ordering/Ordering.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs b/src/Services/Ordering/Ordering.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs index 5a419e7fc..a76b79a21 100644 --- a/src/Services/Ordering/Ordering.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs +++ b/src/Services/Ordering/Ordering.API/Infrastructure/Middlewares/ByPassAuthMiddleware.cs @@ -61,10 +61,10 @@ namespace Ordering.API.Infrastructure.Middlewares var user = new ClaimsIdentity(new[] { new Claim("emails", currentUserId), new Claim("name", "Test user"), + new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", "Test user"), new Claim("nonce", Guid.NewGuid().ToString()), new Claim("http://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), - new Claim("nonce", Guid.NewGuid().ToString()), - new Claim("sub", "1234"), + new Claim("sub", currentUserId), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")} , "ByPassAuth"); diff --git a/src/Web/WebMVC/Infrastructure/Middlewares/ByPassAuthMiddleware.cs b/src/Web/WebMVC/Infrastructure/Middlewares/ByPassAuthMiddleware.cs index 72adaaa4d..e39ebfc0a 100644 --- a/src/Web/WebMVC/Infrastructure/Middlewares/ByPassAuthMiddleware.cs +++ b/src/Web/WebMVC/Infrastructure/Middlewares/ByPassAuthMiddleware.cs @@ -62,10 +62,10 @@ namespace WebMVC.Infrastructure.Middlewares 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/name", "Test user"), + new Claim("http://schemas.microsoft.com/identity/claims/identityprovider", "ByPassAuthMiddleware"), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname","User"), - new Claim("sub", "1234"), + new Claim("sub", currentUserId), new Claim("card_expiration", "12/20"), new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname","Microsoft")} , "ByPassAuth"); From 385318c00f035ddedd9ea9a2f50b7830164c469b Mon Sep 17 00:00:00 2001 From: m-knet <10815022+m-knet@users.noreply.github.com> Date: Tue, 10 Nov 2020 11:40:35 +0100 Subject: [PATCH 40/44] Update solution items (#1515) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Manuel CaƱete --- src/Mobile/eShopOnContainers-Android.sln | 5 ++--- src/Mobile/eShopOnContainers-MobileApps.sln | 5 ++--- src/eShopOnContainers-ServicesAndWebApps.sln | 1 - 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Mobile/eShopOnContainers-Android.sln b/src/Mobile/eShopOnContainers-Android.sln index 1ef76e772..3782286c0 100644 --- a/src/Mobile/eShopOnContainers-Android.sln +++ b/src/Mobile/eShopOnContainers-Android.sln @@ -7,9 +7,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{932D8224-11F EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3AF739CD-81D8-428D-A08A-0A58372DEBF6}" ProjectSection(SolutionItems) = preProject - docker-compose.yml = docker-compose.yml - global.json = global.json - NuGet.config = NuGet.config + ..\docker-compose.yml = ..\docker-compose.yml + ..\NuGet.config = ..\NuGet.config EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mobile Apps", "Mobile Apps", "{F61357CE-1CC2-410E-8776-B16EEBC98EB8}" diff --git a/src/Mobile/eShopOnContainers-MobileApps.sln b/src/Mobile/eShopOnContainers-MobileApps.sln index 04a0fa223..b10b8a818 100644 --- a/src/Mobile/eShopOnContainers-MobileApps.sln +++ b/src/Mobile/eShopOnContainers-MobileApps.sln @@ -7,9 +7,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{932D8224-11F EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3AF739CD-81D8-428D-A08A-0A58372DEBF6}" ProjectSection(SolutionItems) = preProject - docker-compose.yml = docker-compose.yml - global.json = global.json - NuGet.config = NuGet.config + ..\docker-compose.yml = ..\docker-compose.yml + ..\NuGet.config = ..\NuGet.config EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mobile Apps", "Mobile Apps", "{F61357CE-1CC2-410E-8776-B16EEBC98EB8}" diff --git a/src/eShopOnContainers-ServicesAndWebApps.sln b/src/eShopOnContainers-ServicesAndWebApps.sln index 3a1dec68a..55d5b7359 100644 --- a/src/eShopOnContainers-ServicesAndWebApps.sln +++ b/src/eShopOnContainers-ServicesAndWebApps.sln @@ -10,7 +10,6 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3AF739CD-81D8-428D-A08A-0A58372DEBF6}" ProjectSection(SolutionItems) = preProject .env = .env - Local.testsettings = Local.testsettings NuGet.config = NuGet.config EndProjectSection EndProject From 07d36e3188f8e22d5d8d3010b5e1b23472fb5df6 Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Tue, 10 Nov 2020 19:33:28 +0530 Subject: [PATCH 41/44] Updated solution file. (#1514) --- src/eShopOnContainers-ServicesAndWebApps.sln | 143 +++++++++---------- 1 file changed, 64 insertions(+), 79 deletions(-) diff --git a/src/eShopOnContainers-ServicesAndWebApps.sln b/src/eShopOnContainers-ServicesAndWebApps.sln index 55d5b7359..95a8ad397 100644 --- a/src/eShopOnContainers-ServicesAndWebApps.sln +++ b/src/eShopOnContainers-ServicesAndWebApps.sln @@ -73,27 +73,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebHost.Customization", "Bu EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ApiGateways", "ApiGateways", "{77849D35-37D4-4802-81DC-9477B2775A40}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mobile.Bff.Marketing", "Mobile.Bff.Marketing", "{DB813A36-11BA-41FE-B258-CA9A7152247B}" - ProjectSection(SolutionItems) = preProject - ApiGateways\Mobile.Bff.Marketing\apigw\configuration.json = ApiGateways\Mobile.Bff.Marketing\apigw\configuration.json - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mobile.Bff.Shopping", "Mobile.Bff.Shopping", "{0189E4FB-6E2B-4F2E-9B1D-5473D23FC6DB}" - ProjectSection(SolutionItems) = preProject - ApiGateways\Mobile.Bff.Shopping\apigw\configuration.json = ApiGateways\Mobile.Bff.Shopping\apigw\configuration.json - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Web.Bff.Marketing", "Web.Bff.Marketing", "{F8F0921C-EE5D-4AED-A4D6-5BF5FAE02CB5}" - ProjectSection(SolutionItems) = preProject - ApiGateways\Web.Bff.Marketing\apigw\configuration.json = ApiGateways\Web.Bff.Marketing\apigw\configuration.json - EndProjectSection -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Web.Bff.Shopping", "Web.Bff.Shopping", "{28C0F5C8-4849-4035-80AB-45639424E73F}" - ProjectSection(SolutionItems) = preProject - ApiGateways\Web.Bff.Shopping\apigw\configuration.json = ApiGateways\Web.Bff.Shopping\apigw\configuration.json - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mobile.Shopping.HttpAggregator", "ApiGateways\Mobile.Bff.Shopping\aggregator\Mobile.Shopping.HttpAggregator.csproj", "{BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web.Shopping.HttpAggregator", "ApiGateways\Web.Bff.Shopping\aggregator\Web.Shopping.HttpAggregator.csproj", "{AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}" EndProject @@ -142,19 +122,24 @@ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Devspaces.Support", "BuildingBlocks\Devspaces.Support\Devspaces.Support.csproj", "{56C2EF0B-6BF2-41D9-BE07-6E6D08D06B35}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Envoy", "Envoy", "{882A8F3A-C61F-4C44-86DD-A5A258714BF2}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{3ABEEE8C-35E0-4185-9825-C44326151F5B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.BackgroundTasks", "Services\Ordering\Ordering.BackgroundTasks\Ordering.BackgroundTasks.csproj", "{D4DBA4A3-E4A5-4D9D-8ACF-F38F7D506191}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "webmarketing", "webmarketing", "{4AB8D97B-1A96-434D-A10F-2A646A687859}" ProjectSection(SolutionItems) = preProject - ApiGateways\Envoy\Dockerfile = ApiGateways\Envoy\Dockerfile + ApiGateways\Envoy\config\webmarketing\envoy.yaml = ApiGateways\Envoy\config\webmarketing\envoy.yaml EndProjectSection EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{3ABEEE8C-35E0-4185-9825-C44326151F5B}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "webshopping", "webshopping", "{966B1B0B-2AE0-4438-8741-1C5A05556095}" ProjectSection(SolutionItems) = preProject - ApiGateways\Envoy\config\catalog.proto = ApiGateways\Envoy\config\catalog.proto - ApiGateways\Envoy\config\catalog.proto-descriptor.pb = ApiGateways\Envoy\config\catalog.proto-descriptor.pb - ApiGateways\Envoy\Dockerfile = ApiGateways\Envoy\Dockerfile - ApiGateways\Envoy\config\envoy.yaml = ApiGateways\Envoy\config\envoy.yaml + ApiGateways\Envoy\config\webshopping\envoy.yaml = ApiGateways\Envoy\config\webshopping\envoy.yaml EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.BackgroundTasks", "Services\Ordering\Ordering.BackgroundTasks\Ordering.BackgroundTasks.csproj", "{D4DBA4A3-E4A5-4D9D-8ACF-F38F7D506191}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mobile.Bff.Shopping", "Mobile.Bff.Shopping", "{798BFC44-2CCD-45FA-B37A-5173B03C2B30}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mobile.Shopping.HttpAggregator", "ApiGateways\Mobile.Bff.Shopping\aggregator\Mobile.Shopping.HttpAggregator.csproj", "{B62E859F-825E-4C8B-93EC-5966EACFD026}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -890,54 +875,6 @@ Global {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 - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|x64.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Ad-Hoc|x86.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|ARM.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|ARM.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|iPhone.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|iPhone.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|x64.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|x64.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|x86.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.AppStore|x86.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|ARM.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|ARM.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|iPhone.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|iPhone.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|x64.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|x64.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|x86.ActiveCfg = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Debug|x86.Build.0 = Debug|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|Any CPU.Build.0 = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|ARM.ActiveCfg = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|ARM.Build.0 = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|iPhone.ActiveCfg = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|iPhone.Build.0 = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|iPhoneSimulator.Build.0 = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|x64.ActiveCfg = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|x64.Build.0 = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|x86.ActiveCfg = Release|Any CPU - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0}.Release|x86.Build.0 = Release|Any CPU {AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU {AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU {AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU @@ -1706,6 +1643,54 @@ Global {D4DBA4A3-E4A5-4D9D-8ACF-F38F7D506191}.Release|x64.Build.0 = Release|Any CPU {D4DBA4A3-E4A5-4D9D-8ACF-F38F7D506191}.Release|x86.ActiveCfg = Release|Any CPU {D4DBA4A3-E4A5-4D9D-8ACF-F38F7D506191}.Release|x86.Build.0 = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|x64.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Ad-Hoc|x86.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|Any CPU.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|ARM.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|ARM.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|iPhone.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|iPhone.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|x64.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|x64.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|x86.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.AppStore|x86.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|ARM.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|ARM.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|iPhone.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|iPhone.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|x64.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|x64.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|x86.ActiveCfg = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Debug|x86.Build.0 = Debug|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|Any CPU.Build.0 = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|ARM.ActiveCfg = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|ARM.Build.0 = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|iPhone.ActiveCfg = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|iPhone.Build.0 = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|iPhoneSimulator.Build.0 = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|x64.ActiveCfg = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|x64.Build.0 = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|x86.ActiveCfg = Release|Any CPU + {B62E859F-825E-4C8B-93EC-5966EACFD026}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1740,11 +1725,7 @@ Global {1815B651-941C-466B-AE33-D1D7EEB8F77F} = {DB0EFB20-B024-4E5E-A75C-52143C131D25} {15F4B3AA-89B6-4A0D-9051-414305974781} = {1815B651-941C-466B-AE33-D1D7EEB8F77F} {77849D35-37D4-4802-81DC-9477B2775A40} = {932D8224-11F6-4D07-B109-DA28AD288A63} - {DB813A36-11BA-41FE-B258-CA9A7152247B} = {77849D35-37D4-4802-81DC-9477B2775A40} - {0189E4FB-6E2B-4F2E-9B1D-5473D23FC6DB} = {77849D35-37D4-4802-81DC-9477B2775A40} - {F8F0921C-EE5D-4AED-A4D6-5BF5FAE02CB5} = {77849D35-37D4-4802-81DC-9477B2775A40} {28C0F5C8-4849-4035-80AB-45639424E73F} = {77849D35-37D4-4802-81DC-9477B2775A40} - {BEA37D6D-4CF2-4AE8-9575-72388E54FBD0} = {0189E4FB-6E2B-4F2E-9B1D-5473D23FC6DB} {AF0828DB-8BDD-411A-AEEF-B780FBB8D8C1} = {28C0F5C8-4849-4035-80AB-45639424E73F} {E1D2B260-4E7F-4A88-BC13-9910F7C44623} = {0BD0DB92-2D98-44D9-9AC0-C59186D59B0B} {9D9CE4E4-1DD0-4961-861F-219731DE06CE} = {2751AC5C-D148-4D7A-AE8F-149B47C9A82D} @@ -1771,6 +1752,10 @@ Global {882A8F3A-C61F-4C44-86DD-A5A258714BF2} = {77849D35-37D4-4802-81DC-9477B2775A40} {3ABEEE8C-35E0-4185-9825-C44326151F5B} = {882A8F3A-C61F-4C44-86DD-A5A258714BF2} {D4DBA4A3-E4A5-4D9D-8ACF-F38F7D506191} = {0BD0DB92-2D98-44D9-9AC0-C59186D59B0B} + {4AB8D97B-1A96-434D-A10F-2A646A687859} = {3ABEEE8C-35E0-4185-9825-C44326151F5B} + {966B1B0B-2AE0-4438-8741-1C5A05556095} = {3ABEEE8C-35E0-4185-9825-C44326151F5B} + {798BFC44-2CCD-45FA-B37A-5173B03C2B30} = {77849D35-37D4-4802-81DC-9477B2775A40} + {B62E859F-825E-4C8B-93EC-5966EACFD026} = {798BFC44-2CCD-45FA-B37A-5173B03C2B30} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {25728519-5F0F-4973-8A64-0A81EB4EA8D9} From 7e59cd1ffc7c7c7c6af7f823451819e09881476e Mon Sep 17 00:00:00 2001 From: ansonzhang <3143422472@qq.com> Date: Mon, 23 Nov 2020 19:26:09 +0800 Subject: [PATCH 42/44] Fixed #1518 bug (#1520) * Update CatalogContextModelSnapshot.cs * Update CatalogContextSeed.cs * Modify CSV data * Give PictureFileName assignment --- .../Catalog.API/Infrastructure/CatalogContextSeed.cs | 4 ++-- .../CatalogMigrations/CatalogContextModelSnapshot.cs | 9 +++++---- src/Services/Catalog/Catalog.API/Setup/CatalogItems.csv | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs index cd1ea4ab1..e425072e0 100644 --- a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs +++ b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs @@ -181,7 +181,7 @@ string[] csvheaders; try { - string[] requiredHeaders = { "catalogtypename", "catalogbrandname", "description", "name", "price", "pictureFileName" }; + string[] requiredHeaders = { "catalogtypename", "catalogbrandname", "description", "name", "price", "picturefilename" }; string[] optionalheaders = { "availablestock", "restockthreshold", "maxstockthreshold", "onreorder" }; csvheaders = GetHeaders(csvFileCatalogItems, requiredHeaders, optionalheaders ); } @@ -234,7 +234,7 @@ Description = column[Array.IndexOf(headers, "description")].Trim('"').Trim(), Name = column[Array.IndexOf(headers, "name")].Trim('"').Trim(), Price = price, - PictureUri = column[Array.IndexOf(headers, "pictureuri")].Trim('"').Trim(), + PictureFileName = column[Array.IndexOf(headers, "picturefilename")].Trim('"').Trim(), }; int availableStockIndex = Array.IndexOf(headers, "availablestock"); diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogMigrations/CatalogContextModelSnapshot.cs b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogMigrations/CatalogContextModelSnapshot.cs index 851cfefe6..7b72f3388 100644 --- a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogMigrations/CatalogContextModelSnapshot.cs +++ b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogMigrations/CatalogContextModelSnapshot.cs @@ -14,9 +14,10 @@ namespace Catalog.API.Infrastructure.Migrations { modelBuilder .HasAnnotation("ProductVersion", "1.1.1") - .HasAnnotation("SqlServer:Sequence:.catalog_brand_hilo", "'catalog_brand_hilo', '', '1', '10', '', '', 'Int64', 'False'") - .HasAnnotation("SqlServer:Sequence:.catalog_hilo", "'catalog_hilo', '', '1', '10', '', '', 'Int64', 'False'") - .HasAnnotation("SqlServer:Sequence:.catalog_type_hilo", "'catalog_type_hilo', '', '1', '10', '', '', 'Int64', 'False'") + .HasAnnotation("Relational:MaxIdentifierLength", 128) + .HasAnnotation("Relational:Sequence:.catalog_brand_hilo", "'catalog_brand_hilo', '', '1', '10', '', '', 'Int64', 'False'") + .HasAnnotation("Relational:Sequence:.catalog_hilo", "'catalog_hilo', '', '1', '10', '', '', 'Int64', 'False'") + .HasAnnotation("Relational:Sequence:.catalog_type_hilo", "'catalog_type_hilo', '', '1', '10', '', '', 'Int64', 'False'") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Catalog.API.Model.CatalogBrand", b => @@ -58,7 +59,7 @@ namespace Catalog.API.Infrastructure.Migrations b.Property("OnReorder"); - b.Property("PictureUri"); + b.Property("PictureFileName"); b.Property("Price"); diff --git a/src/Services/Catalog/Catalog.API/Setup/CatalogItems.csv b/src/Services/Catalog/Catalog.API/Setup/CatalogItems.csv index 0257216d4..430d52f20 100644 --- a/src/Services/Catalog/Catalog.API/Setup/CatalogItems.csv +++ b/src/Services/Catalog/Catalog.API/Setup/CatalogItems.csv @@ -5,7 +5,7 @@ T-Shirt,Other,Prism White T-Shirt,Prism White T-Shirt,12,3.png,56,false T-Shirt,.NET,.NET Foundation T-shirt,.NET Foundation T-shirt,12,4.png,120,false Sheet,Other,Roslyn Red Sheet,Roslyn Red Sheet,8.5,5.png,55,false T-Shirt,.NET,.NET Blue Hoodie,.NET Blue Hoodie,12,6.png,17,false -T-Shirt,Other,Roslyn Red T-Shirt,Roslyn Red T-Shirt",12,7.png,8,false +T-Shirt,Other,Roslyn Red T-Shirt,Roslyn Red T-Shirt,12,7.png,8,false T-Shirt,Other,Kudu Purple Hoodie,Kudu Purple Hoodie,8.5,8.png,34,false Mug,Other,Cup White Mug,Cup White Mug,12,9.png,76,false Sheet,.NET,.NET Foundation Sheet,.NET Foundation Sheet,12,10.png,11,false From 9dec3b16e826d91e64f2c33a4c5ae043bf0e9a98 Mon Sep 17 00:00:00 2001 From: n-stefan <38526229+n-stefan@users.noreply.github.com> Date: Tue, 24 Nov 2020 12:54:31 +0200 Subject: [PATCH 43/44] Fix PurchaseUrl port in WebSPA appsettings.json (#1525) --- src/Web/WebSPA/appsettings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Web/WebSPA/appsettings.json b/src/Web/WebSPA/appsettings.json index 5a65eecc0..4c829aad0 100644 --- a/src/Web/WebSPA/appsettings.json +++ b/src/Web/WebSPA/appsettings.json @@ -2,7 +2,7 @@ "IdentityUrl": "http://localhost:5105", "MarketingUrl": "http://localhost:5110", "CallBackUrl": "http://localhost:5104/", - "PurchaseUrl": "http://localhost:5200", + "PurchaseUrl": "http://localhost:5202", "PurchaseUrlHC": "http://localhost:5202/hc", "MarketingUrlHC": "http://localhost:5203/hc", "IdentityUrlHC": "http://localhost:5105/hc", From 0a4110a1e9145c56bb1752d09da65cf1f1e036ee Mon Sep 17 00:00:00 2001 From: Sumit Ghosh Date: Tue, 1 Dec 2020 17:16:37 +0530 Subject: [PATCH 44/44] Updated highlight version to latest. (#1531) --- src/Web/WebSPA/package-lock.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Web/WebSPA/package-lock.json b/src/Web/WebSPA/package-lock.json index 3c3a97fda..f4d8c16b2 100644 --- a/src/Web/WebSPA/package-lock.json +++ b/src/Web/WebSPA/package-lock.json @@ -8474,10 +8474,9 @@ } }, "highlight.js": { - "version": "9.18.1", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.18.1.tgz", - "integrity": "sha512-OrVKYz70LHsnCgmbXctv/bfuvntIKDz177h0Co37DQ5jamGZLVmoCVMtjMtNZY3X9DrCcKfklHPNeA0uPZhSJg==", - "dev": true + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.4.0.tgz", + "integrity": "sha512-EfrUGcQ63oLJbj0J0RI9ebX6TAITbsDBLbsjr881L/X5fMO9+oadKzEF21C7R3ULKG6Gv3uoab2HiqVJa/4+oA==" }, "hmac-drbg": { "version": "1.0.1",