From dc0238431b6e8f96c85527e0601c46265208ce72 Mon Sep 17 00:00:00 2001 From: Jens Reimann Date: Mon, 18 Nov 2024 16:16:49 +0100 Subject: [PATCH] feat: make the initial delay seconds configurable --- .../templates/helpers/_infrastructure.tpl | 16 ++++++++++++++-- charts/trustify/templates/helpers/_oidc.tpl | 2 ++ charts/trustify/values.schema.yaml | 6 ++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/charts/trustify/templates/helpers/_infrastructure.tpl b/charts/trustify/templates/helpers/_infrastructure.tpl index 5c56bc8..85529d0 100644 --- a/charts/trustify/templates/helpers/_infrastructure.tpl +++ b/charts/trustify/templates/helpers/_infrastructure.tpl @@ -10,6 +10,18 @@ Arguments: (dict) {{- $infra.port | default 9010 -}} {{- end }} +{{/* +Evaluate the infrastructure initial delay seconds. + +Arguments: (dict) + * root - . + * module - module object +*/}} +{{- define "trustification.application.infrastructure.initialDelaySeconds"}} +{{- $infra := merge (deepCopy .module.infrastructure ) .root.Values.infrastructure }} +{{- $infra.initialDelaySeconds | default 2 -}} +{{- end }} + {{/* Additional env-vars for configuring the infrastructure endpoint. @@ -58,13 +70,13 @@ Arguments (dict): */}} {{ define "trustification.application.infrastructure.probes" }} livenessProbe: - initialDelaySeconds: 2 + initialDelaySeconds: {{ include "trustification.application.infrastructure.initialDelaySeconds" . }} httpGet: path: /health/live port: {{ include "trustification.application.infrastructure.port" . }} readinessProbe: - initialDelaySeconds: 2 + initialDelaySeconds: {{ include "trustification.application.infrastructure.initialDelaySeconds" . }} httpGet: path: /health/ready port: {{ include "trustification.application.infrastructure.port" . }} diff --git a/charts/trustify/templates/helpers/_oidc.tpl b/charts/trustify/templates/helpers/_oidc.tpl index e01fdaa..71e4d2e 100644 --- a/charts/trustify/templates/helpers/_oidc.tpl +++ b/charts/trustify/templates/helpers/_oidc.tpl @@ -116,6 +116,8 @@ Arguments (dict): {{- if not .module.disableSwaggerOidc }} - name: SWAGGER_UI_OIDC_ISSUER_URL value: {{ include "trustification.oidc.frontendIssuerUrl" .root | quote }} +- name: SWAGGER_UI_OIDC_CLIENT_ID + value: {{ include "trustification.oidc.frontendClientId" .root }} {{- $client := required "Unable to find client for 'frontend'" (get .root.Values.oidc.clients "frontend" ) -}} diff --git a/charts/trustify/values.schema.yaml b/charts/trustify/values.schema.yaml index 9c7083b..8a60425 100644 --- a/charts/trustify/values.schema.yaml +++ b/charts/trustify/values.schema.yaml @@ -97,6 +97,12 @@ properties: description: | Port on which infrastructure services are exposed. + initialDelaySeconds: + type: integer + minimum: 0 + description: | + The initial delay seconds for the infrastructure probes. + metrics: type: object additionalProperties: false