From df52ac0fbb26a64c3237506a851a376ab87c249f Mon Sep 17 00:00:00 2001 From: Mastaleru Rafael Date: Thu, 8 Dec 2022 12:26:24 +0200 Subject: [PATCH] added metrics-middleware (#197) --- charts/iot/Chart.yaml | 10 ++++++---- charts/iot/README.md | 23 ++++++++++++++++------- charts/iot/values.yaml | 11 +++++++++-- 3 files changed, 31 insertions(+), 13 deletions(-) diff --git a/charts/iot/Chart.yaml b/charts/iot/Chart.yaml index 09a97c92..bcb37703 100644 --- a/charts/iot/Chart.yaml +++ b/charts/iot/Chart.yaml @@ -15,15 +15,17 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.3 +version: 0.1.4 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. -appVersion: "v1.4.1" +appVersion: "v1.5.0" icon: https://avatars.githubusercontent.com/u/60230259?s=200&v=4 maintainers: - - name: tgip-work - url: https://github.com/tgip-work + - name: mastaleru + url: https://github.com/mastaleru + - name: paiuscatalin + url: https://github.com/paiuscatalin diff --git a/charts/iot/README.md b/charts/iot/README.md index b85cff7c..81fa4996 100644 --- a/charts/iot/README.md +++ b/charts/iot/README.md @@ -1,6 +1,7 @@ # eco-iot -![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.4.1](https://img.shields.io/badge/AppVersion-v1.4.1-informational?style=flat-square) + +![Version: 0.1.4](https://img.shields.io/badge/Version-0.1.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.5.0](https://img.shields.io/badge/AppVersion-v1.5.0-informational?style=flat-square) A Helm chart for Pharma Ledger e-Consent and I0T applications @@ -19,6 +20,8 @@ A Helm chart for Pharma Ledger e-Consent and I0T applications - [Here](./README.md#values) is a full list of all configuration values. - The [values.yaml file](./values.yaml) shows the raw view of all configuration values. + + ## Helm Lifecycle and Kubernetes Resources Lifetime This helm chart uses Helm [hooks](https://helm.sh/docs/topics/charts_hooks/) in order to install, upgrade and manage the application and its resources. @@ -60,6 +63,7 @@ The Init Job is required to run the build process and to store the SeedsBackup i - It is only necessary to run/deploy the Init Job on installation and on subsequent software changes (=helm upgrade in combination with use of a different image than before). - Therefore the Init Job will only be deployed on installation and on helm upgrades if the image has changed. + ### Init Job Details The pod consists an init containers and a main container. @@ -122,7 +126,7 @@ It is recommended to put non-sensitive configuration values in an configuration 2. Install via helm to namespace `default` ```bash - helm upgrade my-release-name pharmaledger-imi/iot --version=0.1.3 \ + helm upgrade my-release-name pharmaledger-imi/iot --version=0.1.4 \ --install \ --values my-config.yaml \ ``` @@ -222,7 +226,7 @@ Run `helm upgrade --helm` for full list of options. You can install into other namespace than `default` by setting the `--namespace` parameter, e.g. ```bash - helm upgrade my-release-name pharmaledger-imi/iot --version=0.1.3 \ + helm upgrade my-release-name pharmaledger-imi/iot --version=0.1.4 \ --install \ --namespace=my-namespace \ --values my-config.yaml \ @@ -233,7 +237,7 @@ Run `helm upgrade --helm` for full list of options. Provide the `--wait` argument and time to wait (default is 5 minutes) via `--timeout` ```bash - helm upgrade my-release-name pharmaledger-imi/iot --version=0.1.3 \ + helm upgrade my-release-name pharmaledger-imi/iot --version=0.1.4 \ --install \ --wait --timeout=600s \ --values my-config.yaml \ @@ -257,11 +261,15 @@ Run `helm upgrade --helm` for full list of options. [helm-unittest](https://github.com/quintush/helm-unittest) is being used for testing the output of the helm chart. Tests can be found in [tests](./tests) + ## Maintainers | Name | Email | Url | | ---- | ------ | --- | -| tgip-work | | | +| mastaleru | | | +| paiuscatalin | | | + + ## Values @@ -271,7 +279,7 @@ Tests can be found in [tests](./tests) |-----|------|---------|-------------| | affinity | object | `{}` | Affinity for scheduling a pod. See [https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/) | | apiHubWorkingFolder | string | `"iot-pmed-workspace"` | | -| config.apihub | string | `"{\n \"storage\": \"../apihub-root\",\n \"port\": 8080,\n \"preventRateLimit\": true,\n \"activeComponents\": [\n \"virtualMQ\",\n \"messaging\",\n \"notifications\",\n \"filesManager\",\n \"bdns\",\n \"bricksLedger\",\n \"bricksFabric\",\n \"bricking\",\n \"mq\",\n \"anchoring\",\n \"staticServer\"\n ],\n \"componentsConfig\": {\n \"staticServer\": {\n \"excludedFiles\": [\n \".*.secret\"\n ]\n },\n \"bricking\": {},\n \"anchoring\": {}\n },\n \"responseHeaders\": {\n \"X-Frame-Options\": \"SAMEORIGIN\",\n \"X-XSS-Protection\": \"1; mode=block\"\n },\n \"enableRequestLogger\": true,\n \"enableJWTAuthorisation\": false,\n \"enableLocalhostAuthorization\": false,\n \"serverAuthentication\": false,\n \"skipJWTAuthorisation\": [\n \"/assets\",\n \"/directory-summary\",\n \"/resources\",\n \"/bdns\",\n \"/anchor/default\",\n \"/anchor/vault\",\n \"/bricking\",\n \"/bricksFabric\",\n \"/bricksledger\",\n \"/create-channel\",\n \"/forward-zeromq\",\n \"/send-message\",\n \"/receive-message\",\n \"/files\",\n \"/notifications\",\n \"/mq\"\n ]\n}"` | Configuration file apihub.json. Settings: [https://docs.google.com/document/d/1mg35bb1UBUmTpL1Kt4GuZ7P0K_FMqt2Mb8B3iaDf52I/edit#heading=h.z84gh8sclah3](https://docs.google.com/document/d/1mg35bb1UBUmTpL1Kt4GuZ7P0K_FMqt2Mb8B3iaDf52I/edit#heading=h.z84gh8sclah3)
For epi <= v1.1.2: Replace "module": "./../../gtin-resolver" with "module": "./../../epi-utils"
For SSO (not enabled by default!):
1. "enableOAuth": true
2. "serverAuthentication": true
3. For SSO via OAuth with Azure AD, replace with appropriate values. For other identity providers (IdP) (e.g. Google, Ping, 0Auth), refer to documentation. "redirectPath" must match the redirect URL configured at IdP
4. Add these values to "skipOAuth": "/leaflet-wallet/", "/directory-summary/", "/iframe/" | +| config.apihub | string | `"{\n \"storage\": \"../apihub-root\",\n \"port\": 8080,\n \"preventRateLimit\": true,\n \"activeComponents\": [\n \"metrics-middleware\",\n \"virtualMQ\",\n \"messaging\",\n \"notifications\",\n \"filesManager\",\n \"bdns\",\n \"bricksLedger\",\n \"bricksFabric\",\n \"bricking\",\n \"mq\",\n \"anchoring\",\n \"staticServer\"\n ],\n \"componentsConfig\": {\n \"staticServer\": {\n \"excludedFiles\": [\n \".*.secret\"\n ]\n },\n \"bricking\": {},\n \"anchoring\": {},\n \"metrics-middleware\": {\n \"module\": \"./../../metrics-middleware/middleware\"\n }\n },\n \"responseHeaders\": {\n \"X-Frame-Options\": \"SAMEORIGIN\",\n \"X-XSS-Protection\": \"1; mode=block\"\n },\n \"enableRequestLogger\": true,\n \"enableJWTAuthorisation\": false,\n \"enableLocalhostAuthorization\": false,\n \"serverAuthentication\": false,\n \"skipJWTAuthorisation\": [\n \"/assets\",\n \"/directory-summary\",\n \"/resources\",\n \"/bdns\",\n \"/anchor/default\",\n \"/anchor/vault\",\n \"/bricking\",\n \"/bricksFabric\",\n \"/bricksledger\",\n \"/create-channel\",\n \"/forward-zeromq\",\n \"/send-message\",\n \"/receive-message\",\n \"/files\",\n \"/notifications\",\n \"/mq\"\n ],\n \"CORS\": {\n \"Access-Control-Allow-Origin\": \"*\"\n }\n}"` | Configuration file apihub.json. Settings: [https://docs.google.com/document/d/1mg35bb1UBUmTpL1Kt4GuZ7P0K_FMqt2Mb8B3iaDf52I/edit#heading=h.z84gh8sclah3](https://docs.google.com/document/d/1mg35bb1UBUmTpL1Kt4GuZ7P0K_FMqt2Mb8B3iaDf52I/edit#heading=h.z84gh8sclah3)
For epi <= v1.1.2: Replace "module": "./../../gtin-resolver" with "module": "./../../epi-utils"
For SSO (not enabled by default!):
1. "enableOAuth": true
2. "serverAuthentication": true
3. For SSO via OAuth with Azure AD, replace with appropriate values. For other identity providers (IdP) (e.g. Google, Ping, 0Auth), refer to documentation. "redirectPath" must match the redirect URL configured at IdP
4. Add these values to "skipOAuth": "/leaflet-wallet/", "/directory-summary/", "/iframe/" | | config.bdnsHosts | string | `"{\n \"default\": {\n \"replicas\": [],\n \"brickStorages\": [\n \"$ORIGIN\"\n ],\n \"anchoringServices\": [\n \"$ORIGIN\"\n ]\n },\n \"vault.my-company\": {\n \"replicas\": [],\n \"brickStorages\": [\n \"$ORIGIN\"\n ],\n \"anchoringServices\": [\n \"$ORIGIN\"\n ]\n },\n \"iot.my-company\":{\n \"replicas\":[],\n \"brickStorages\":[\n \"$ORIGIN\"\n ],\n \"anchoringServices\":[\n \"$ORIGIN\"\n ]\n },\n \"iot\":{\n \"replicas\":[],\n \"brickStorages\":[\n \"$ORIGIN\"\n ],\n \"anchoringServices\":[\n \"$ORIGIN\"\n ],\n \"mqEndpoints\":[\n \"$ORIGIN\"\n ]\n },\n \"eco\":{\n \"replicas\":[],\n \"brickStorages\":[\n \"http://localhost:8081\"\n ],\n \"anchoringServices\":[\n \"http://localhost:8081\"\n ],\n \"mqEndpoints\":[\n \"http://localhost:8081\"\n ]\n }\n}"` | Centrally managed and provided BDNS Hosts Config | | config.demiurgeMode | string | `"dev-secure"` | | | config.domain | string | `"iot"` | The Domain, e.g. "epipoc" | @@ -325,5 +333,6 @@ Tests can be found in [tests](./tests) | serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | | tolerations | list | `[]` | Tolerations for scheduling a pod. See [https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) | + ---------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.10.0](https://github.com/norwoodj/helm-docs/releases/v1.10.0) +Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) diff --git a/charts/iot/values.yaml b/charts/iot/values.yaml index 513cce27..51bda22f 100644 --- a/charts/iot/values.yaml +++ b/charts/iot/values.yaml @@ -245,6 +245,7 @@ config: "port": 8080, "preventRateLimit": true, "activeComponents": [ + "metrics-middleware", "virtualMQ", "messaging", "notifications", @@ -264,7 +265,10 @@ config: ] }, "bricking": {}, - "anchoring": {} + "anchoring": {}, + "metrics-middleware": { + "module": "./../../metrics-middleware/middleware" + } }, "responseHeaders": { "X-Frame-Options": "SAMEORIGIN", @@ -291,7 +295,10 @@ config: "/files", "/notifications", "/mq" - ] + ], + "CORS": { + "Access-Control-Allow-Origin": "*" + } } ingress: