diff --git a/charts/tm-forum-api/Chart.yaml b/charts/tm-forum-api/Chart.yaml index b815332..2701ad7 100644 --- a/charts/tm-forum-api/Chart.yaml +++ b/charts/tm-forum-api/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: tm-forum-api -version: 0.5.3 +version: 0.6.0 appVersion: 0.13.2 kubeVersion: '>= 1.19-0' home: https://github.com/FIWARE/tmforum-api diff --git a/charts/tm-forum-api/README.md b/charts/tm-forum-api/README.md index be2c3c0..f472c94 100644 --- a/charts/tm-forum-api/README.md +++ b/charts/tm-forum-api/README.md @@ -1,6 +1,6 @@ # tm-forum-api -![Version: 0.5.3](https://img.shields.io/badge/Version-0.5.3-informational?style=flat-square) ![AppVersion: 0.13.2](https://img.shields.io/badge/AppVersion-0.13.2-informational?style=flat-square) +![Version: 0.6.0](https://img.shields.io/badge/Version-0.6.0-informational?style=flat-square) ![AppVersion: 0.13.2](https://img.shields.io/badge/AppVersion-0.13.2-informational?style=flat-square) A Helm chart for running the FIWARE TMForum-APIs ## Maintainers @@ -95,8 +95,8 @@ For all untouched values, the customized deployement will still use the defaults | autoscaling.metrics | list | `[]` | metrics to react on | | autoscaling.minReplicas | int | `1` | minimum number of running pods | | defaultConfig.additionalAnnotations | object | `{}` | additional annotations for the deployment, if required | +| defaultConfig.additionalEnvVars | list | `[]` | a list of additional env vars to be set, check the tm-forum api docu for all available options | | defaultConfig.additionalLabels | object | `{}` | additional labels for the deployment, if required | -| defaultConfig.additonalEnvVars | list | `[]` | a list of additional env vars to be set, check the tm-forum api docu for all available options | | defaultConfig.affinity | object | `{}` | affinity template ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity | | defaultConfig.cache | object | `{"entities":{"expireAfterAccess":"2s","expireAfterWrite":"2s","maximumSize":1000},"subscriptions":{"expireAfterAccess":"14d","expireAfterWrite":"14d","maximumSize":1000}}` | cache config for connecting the broker | | defaultConfig.cache.entities | object | `{"expireAfterAccess":"2s","expireAfterWrite":"2s","maximumSize":1000}` | entities cache | @@ -113,7 +113,7 @@ For all untouched values, the customized deployement will still use the defaults | defaultConfig.image.pullPolicy | string | `"IfNotPresent"` | pull policy to be used | | defaultConfig.image.repository | string | `"quay.io/fiware"` | repository to get the container from | | defaultConfig.image.tag | string | `"0.13.2"` | tag to be used, most of the time the apis will use the same version | -| defaultConfig.livenessProbe.healthPath | string | `"/health"` | path to be used for the health check | +| defaultConfig.livenessProbe.healthPath | string | `"/health/liveness"` | path to be used for the health check | | defaultConfig.livenessProbe.initialDelaySeconds | int | `30` | | | defaultConfig.livenessProbe.periodSeconds | int | `10` | | | defaultConfig.livenessProbe.successThreshold | int | `1` | | @@ -130,7 +130,7 @@ For all untouched values, the customized deployement will still use the defaults | defaultConfig.prometheus.path | string | `"/prometheus"` | path to get the metrics from | | defaultConfig.readinessProbe.initialDelaySeconds | int | `30` | | | defaultConfig.readinessProbe.periodSeconds | int | `10` | | -| defaultConfig.readinessProbe.readinessPath | string | `"/health"` | path to be used for the health check | +| defaultConfig.readinessProbe.readinessPath | string | `"/health/readiness"` | path to be used for the health check | | defaultConfig.readinessProbe.successThreshold | int | `1` | | | defaultConfig.readinessProbe.timeoutSeconds | int | `30` | | | defaultConfig.replicaCount | int | `1` | initial number of target replications, can be different if autoscaling is enabled | @@ -142,6 +142,10 @@ For all untouched values, the customized deployement will still use the defaults | defaultConfig.updateStrategy.rollingUpdate.maxUnavailable | int | `0` | number of pods that can be unavailable while updating | | defaultConfig.updateStrategy.type | string | `"RollingUpdate"` | type of the update | | fullnameOverride | string | `""` | option to override the fullname config in the _helpers.tpl | +| health.broker.allowedResponseCodes | list | `[200]` | broker health endpoint response codes to be acceptable as 'healthy' | +| health.broker.enabled | bool | `false` | enable including the broker state in the service's health state | +| health.broker.path | string | `"/q/health"` | path to be used for broker health endpoint | +| health.broker.urlOverride | string | `""` | to be set if the broker url differs from defaultConfig.ngsiLd.url | | ingress.annotations | object | `{}` | annotations to be added to the ingress | | ingress.className | string | `"nginx"` | class of the ingress controller to handle the ingress | | ingress.enabled | bool | `false` | should there be an ingress to connect tmforum with the public internet | diff --git a/charts/tm-forum-api/templates/deployment.yaml b/charts/tm-forum-api/templates/deployment.yaml index 5455a53..91dbfb3 100644 --- a/charts/tm-forum-api/templates/deployment.yaml +++ b/charts/tm-forum-api/templates/deployment.yaml @@ -239,7 +239,20 @@ spec: - name: MICRONAUT_CACHES_SUBSCRIPTIONS_EXPIRE_AFTER_ACCESS value: {{ $.Values.defaultConfig.cache.subscriptions.expireAfterAccess | quote}} {{- end }} - + {{- if $.Values.health.broker.enabled }} + - name: MICRONAUT_HTTP_SERVICES_NGSIHEALTH_URL + {{- if $.Values.health.broker.urlOverride }} + value: {{ $.Values.health.broker.urlOverride | quote }} + {{- else }} + value: {{ $.Values.defaultConfig.ngsiLd.url | quote }} + {{- end }} + - name: MICRONAUT_HTTP_SERVICES_NGSIHEALTH_PATH + value: {{ $.Values.health.broker.path | quote }} + - name: ENDPOINTS_HEALTH_BROKER_ENABLED + value: 'true' + - name: ENDPOINTS_HEALTH_BROKER_ALLOWED_RESPONSE_CODES + value: {{ $.Values.health.broker.allowedResponseCodes | quote }} + {{- end }} {{- if .additionalEnvVars }} {{- with .additionalEnvVars }} {{- toYaml . | nindent 12 }} diff --git a/charts/tm-forum-api/values.yaml b/charts/tm-forum-api/values.yaml index 9a34772..33d595d 100644 --- a/charts/tm-forum-api/values.yaml +++ b/charts/tm-forum-api/values.yaml @@ -122,21 +122,21 @@ defaultConfig: # if one of the values should be overwritten by the individual api, you need to provide all values. livenessProbe: # -- path to be used for the health check - healthPath: /health + healthPath: /health/liveness initialDelaySeconds: 30 periodSeconds: 10 successThreshold: 1 timeoutSeconds: 30 readinessProbe: # -- path to be used for the health check - readinessPath: /health + readinessPath: /health/readiness initialDelaySeconds: 30 periodSeconds: 10 successThreshold: 1 timeoutSeconds: 30 # -- a list of additional env vars to be set, check the tm-forum api docu for all available options - additonalEnvVars: [] + additionalEnvVars: [] # -- configuration to be used for the image of the container image: @@ -324,4 +324,18 @@ redis: podSecurityContext: enabled: false containerSecurityContext: - enabled: false \ No newline at end of file + enabled: false + +## controls the aspects of the health checks +health: + ## broker related health checks + broker: + # -- enable including the broker state in the service's health state + enabled: false + # -- path to be used for broker health endpoint + path: "/q/health" + # -- to be set if the broker url differs from defaultConfig.ngsiLd.url + urlOverride: "" + # -- broker health endpoint response codes to be acceptable as 'healthy' + allowedResponseCodes: + - 200