Skip to content

Commit

Permalink
added metrics-middleware (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mastaleru authored Dec 8, 2022
1 parent e9d7ad1 commit df52ac0
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 13 deletions.
10 changes: 6 additions & 4 deletions charts/iot/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
23 changes: 16 additions & 7 deletions charts/iot/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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 \
```
Expand Down Expand Up @@ -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 \
Expand All @@ -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 \
Expand All @@ -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 | | <https://github.com/tgip-work> |
| mastaleru | | <https://github.com/mastaleru> |
| paiuscatalin | | <https://github.com/paiuscatalin> |



## Values

Expand All @@ -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) <br/> For epi <= v1.1.2: Replace "module": "./../../gtin-resolver" with "module": "./../../epi-utils" <br/> For SSO (not enabled by default!): <br/> 1. "enableOAuth": true <br/> 2. "serverAuthentication": true <br/> 3. For SSO via OAuth with Azure AD, replace <TODO_*> 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 <br/> 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) <br/> For epi <= v1.1.2: Replace "module": "./../../gtin-resolver" with "module": "./../../epi-utils" <br/> For SSO (not enabled by default!): <br/> 1. "enableOAuth": true <br/> 2. "serverAuthentication": true <br/> 3. For SSO via OAuth with Azure AD, replace <TODO_*> 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 <br/> 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" |
Expand Down Expand Up @@ -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)
11 changes: 9 additions & 2 deletions charts/iot/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ config:
"port": 8080,
"preventRateLimit": true,
"activeComponents": [
"metrics-middleware",
"virtualMQ",
"messaging",
"notifications",
Expand All @@ -264,7 +265,10 @@ config:
]
},
"bricking": {},
"anchoring": {}
"anchoring": {},
"metrics-middleware": {
"module": "./../../metrics-middleware/middleware"
}
},
"responseHeaders": {
"X-Frame-Options": "SAMEORIGIN",
Expand All @@ -291,7 +295,10 @@ config:
"/files",
"/notifications",
"/mq"
]
],
"CORS": {
"Access-Control-Allow-Origin": "*"
}
}
ingress:
Expand Down

0 comments on commit df52ac0

Please sign in to comment.