Skip to content

Commit

Permalink
feat: make the initial delay seconds configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
ctron committed Nov 18, 2024
1 parent 9fa31a1 commit dc02384
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
16 changes: 14 additions & 2 deletions charts/trustify/templates/helpers/_infrastructure.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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" . }}
Expand Down
2 changes: 2 additions & 0 deletions charts/trustify/templates/helpers/_oidc.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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" ) -}}

Expand Down
6 changes: 6 additions & 0 deletions charts/trustify/values.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dc02384

Please sign in to comment.