From 46e925e65520c7a096890e4bb2dabfb1753931c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Piliszek?= Date: Mon, 8 Apr 2024 10:07:27 +0200 Subject: [PATCH] [REVERTME] Make the admin-adding job quit The app hangs indefinitely after succeeding so force the timeout to quit it. Change-Id: I86c167a3a09a971a9eefb3121c6e459a7e36c72a --- .../nebulous-gui-controller/templates/add-user-to-csm.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/charts/nebulous-gui-controller/templates/add-user-to-csm.yaml b/charts/nebulous-gui-controller/templates/add-user-to-csm.yaml index 501275b..0a97476 100644 --- a/charts/nebulous-gui-controller/templates/add-user-to-csm.yaml +++ b/charts/nebulous-gui-controller/templates/add-user-to-csm.yaml @@ -19,8 +19,11 @@ spec: containers: - name: add-admin-user image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - command: ["node"] - args: ["app.js", "@apostrophecms/user:add", "{{ .Values.apostropheCMS.user.name }}", "{{ .Values.apostropheCMS.user.password }}"] + command: + - sh + - -c + # FIXME: timeout and true - an ugly hack to kill the process because it hangs otherwise - unfortunately it does not check for success now + - "timeout 30 node app.js @apostrophecms/user:add {{ .Values.apostropheCMS.user.name }} {{ .Values.apostropheCMS.user.password }} || true" env: {{- toYaml .Values.env | nindent 10 }} restartPolicy: Never