Skip to content

Commit

Permalink
Merge pull request #42 from devops-ia/fix/41-release-name-service
Browse files Browse the repository at this point in the history
fix: release name on ready-checker
  • Loading branch information
ialejandro authored Aug 27, 2024
2 parents 32ce82f + 9d00ac5 commit 225e70a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion charts/opencti/templates/server/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,15 @@ spec:
command:
- 'sh'
- '-c'
- 'RETRY=0; until [ $RETRY -eq {{ $.Values.readyChecker.retries }} ]; do nc -zv {{ $.Values.fullnameOverride | default $.Release.Name }}-{{ $service.name }} {{ $service.port }} && break; echo "[$RETRY/{{ $.Values.readyChecker.retries }}] waiting service {{ $.Values.fullnameOverride | default $.Release.Name }}-{{ $service.name }}:{{ $service.port }} is ready"; sleep {{ $.Values.readyChecker.timeout }}; RETRY=$(($RETRY + 1)); done'
- |
RETRY=0;
until [ $RETRY -eq {{ $.Values.readyChecker.retries }} ];
do
nc -zv {{ $.Values.fullnameOverride | default $.Release.Name }}-{{ $service.name }} {{ $service.port }} && break;
echo "[$RETRY/{{ $.Values.readyChecker.retries }}] waiting service {{ $.Values.fullnameOverride | default $.Release.Name }}-{{ $service.name }}:{{ $service.port }} is ready";
sleep {{ $.Values.readyChecker.timeout }};
RETRY=$(($RETRY + 1));
done
{{- end }}
{{- end }}
containers:
Expand Down
10 changes: 9 additions & 1 deletion charts/opencti/templates/worker/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,15 @@ spec:
command:
- 'sh'
- '-c'
- 'RETRY=0; until [ $RETRY -eq {{ $.Values.worker.readyChecker.retries }} ]; do nc -zv {{ $.Values.fullnameOverride | default $.Release.Name }}-server {{ $.Values.service.port }} && break; echo "[$RETRY/{{ $.Values.worker.readyChecker.retries }}] waiting service {{ $.Values.fullnameOverride | default $.Release.Name }}-server:{{ $.Values.service.port }} is ready"; sleep {{ $.Values.worker.readyChecker.timeout }}; RETRY=$(($RETRY + 1)); done'
- >
RETRY=0;
until [ $RETRY -eq {{ $.Values.worker.readyChecker.retries }} ];
do
nc -zv {{ $.Values.fullnameOverride | default (include "opencti.fullname" .) }}-server {{ $.Values.service.port }} && break;
echo "[$RETRY/{{ $.Values.worker.readyChecker.retries }}] waiting service {{ $.Values.fullnameOverride | default (include "opencti.fullname" .) }}-server:{{ $.Values.service.port }} is ready";
sleep {{ $.Values.worker.readyChecker.timeout }};
RETRY=$(($RETRY + 1));
done
{{- end }}
containers:
- name: {{ .Chart.Name }}-worker
Expand Down

0 comments on commit 225e70a

Please sign in to comment.