Hello Eduardo,
Until now, we didn't really observed this kind of behaviour during decision server console and decision server runtime startup.
But, we can implement a not so complex solution using the init-container mechanism. If you have a look at the deployment templates, you can see that we already use one in order to be sure that internal database is up and ready before to start all ODM containers.
initContainers:
{{- if and (empty .Values.externalCustomDatabase.datasourceRef) (empty .Values.externalDatabase.serverName) }}
- name: init-decisionserverruntime
{{ include "image.tagOrDigest" (dict "containerName" "dbserver" "containerTag" .Values.internalDatabase.tagOrDigest "root" .) | indent 8 }}
{{ include "odm-security-context" . | indent 8 }}
command: ['sh','-c', '{{ template "odm-sql-internal-db-check" . }}']
env:
{{ include "odm-sql-internal-db-check-env" . | indent 8 }}
resources:
{{ include "odm-sql-internal-db-check-resources" . | indent 10 }}
{{- end }}using
{{- define "odm-sql-internal-db-check" -}}
until [ $CHECK_DB_SERVER -eq 0 ]; do echo {{ template "odm.dbserver.fullname" . }} on port 5432 state $CHECK_DB_SERVER; CHECK_DB_SERVER=$(psql -q -h {{ template "odm.dbserver.fullname" . }} -d $PGDATABASE -c "select 1" -p 5432 >/dev/null;echo $?); echo "Check $CHECK_DB_SERVER"; sleep 2; done;
{{- end -}}So, if I well understand that you need a dependancy between decision server console and decision server runtime, you can use a similar mechanism, meaning add a new init-container in the decision server runtime template that will make a curl call loop on the internal decision server console service and exiting when the console is responding.
BR,
Mathias
------------------------------
Mathias Mouly
------------------------------