Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm Fails To Deploy Chart As Written #200

Open
CrosleyZack opened this issue Jan 6, 2025 · 0 comments
Open

Helm Fails To Deploy Chart As Written #200

CrosleyZack opened this issue Jan 6, 2025 · 0 comments

Comments

@CrosleyZack
Copy link

We are having issues deploying this helm chart to our local infrastructure. Following the deployment guide we have edited the values.yaml to:

  1. Have a valid licenseKey, encryptionKey, and jwtSecret
  2. Set the postgres host, port, db, user, password to our local postgres instance
  3. Set tag to 3.114.3-stable
  4. Set ingress.host and ingress.tls
  5. Updated resources.limits to match our dev environment limits (cpu: 2000m, memory: 84000Ki)
  6. set workflows.enabled and codeExecutor.enabled to true

After running helm install retool retool/retool -f values.yaml -n <namespace> we get the replica set created:

➜ kubectl get rs -n <namespace> -o custom-columns=":metadata.name" | grep retool
retool-55b87d976f
retool-code-executor-5f564f76d
retool-jobs-runner-54984cf5fc
retool-workflow-backend-bd884685f
retool-workflow-worker-c5c95c9b

With a created pod:

➜ kubectl describe rs -n <namepsace> retool-55b87d976f
Name:           retool-55b87d976f
...
Events:
  Type    Reason            Age   From                   Message
  ----    ------            ----  ----                   -------
  Normal  SuccessfulCreate  58m   replicaset-controller  Created pod: retool-55b87d976f-gfkbv

originally we encountered an issue with sed attempting to run on ./dist*/**/*.html

k logs -f -n <namespace> retool-7cfdc5c698-pcwqr
wait-for-it.sh: waiting for retool-postgresql:5432 without a timeout
wait-for-it.sh: retool-postgresql:5432 is available after 0 seconds
sed: can't read ./dist*/**/*.html: No such file or directory
Java dbconnector started on port 3007 with pid 36
./docker_scripts/start_api.sh: line 87:    37 Killed                  node --openssl-legacy-provider --no-experimental-fetch bundle/main.js

but failing from having no matching files:

retool_user@retool-cf86967c8-2srk6:/retool_backend$ ls -l ./dist*/**/*.html
ls: cannot access './dist*/**/*.html': No such file or directory

retool_user@retool-cf86967c8-2srk6:/retool_backend$ ls -l ./dist*/*.html
-rwxrwxrwx 1 retool_user retool_user_group 4912 Dec 16 23:47 ./dist/braintree-card-form.html
-rwxrwxrwx 1 retool_user retool_user_group  424 Dec 16 23:47 ./dist/custom-component-collections.html
-rwxrwxrwx 1 retool_user retool_user_group  181 Dec 16 23:47 ./dist/custom-components-doctype.html
-rwxrwxrwx 1 retool_user retool_user_group  255 Dec 16 23:47 ./dist/custom-components-resize.html
-rwxrwxrwx 1 retool_user retool_user_group  166 Dec 16 23:47 ./dist/custom-components.html
-rwxrwxrwx 1 retool_user retool_user_group 6730 Dec 16 23:47 ./dist/index.html
-rwxrwxrwx 1 retool_user retool_user_group 3340 Dec 16 23:47 ./dist/runtime.YjU0NTRk.html
-rwxrwxrwx 1 retool_user retool_user_group  301 Dec 16 23:47 ./dist/sandbox.html
-rwxrwxrwx 1 retool_user retool_user_group 3480 Dec 16 23:47 ./dist/stripe-card-form.html
-rwxrwxrwx 1 retool_user retool_user_group 5590 Dec 16 23:47 ./dist_webpack/braintree-card-form.html
-rwxrwxrwx 1 retool_user retool_user_group  521 Dec 16 23:47 ./dist_webpack/custom-component-collections.html
-rwxrwxrwx 1 retool_user retool_user_group  508 Dec 16 23:47 ./dist_webpack/custom-components-doctype.html
-rwxrwxrwx 1 retool_user retool_user_group  582 Dec 16 23:47 ./dist_webpack/custom-components-resize.html
-rwxrwxrwx 1 retool_user retool_user_group  493 Dec 16 23:47 ./dist_webpack/custom-components.html
-rwxrwxrwx 1 retool_user retool_user_group 7254 Dec 16 23:47 ./dist_webpack/index.html
-rwxrwxrwx 1 retool_user retool_user_group 6107 Dec 16 23:47 ./dist_webpack/runtime.cf9e15c4.html
-rwxrwxrwx 1 retool_user retool_user_group 1049 Dec 16 23:47 ./dist_webpack/sandbox.html
-rwxrwxrwx 1 retool_user retool_user_group 4068 Dec 16 23:47 ./dist_webpack/stripe-card-form.html

We attempted to resolve the issue by adding a matching html file:

$ k get deploy -n <namespace> retool -o json | jq '.spec.template.spec.containers[0].args'
[
  "bash",
  "-c",
  "chmod -R +x ./docker_scripts; sync; ./docker_scripts/wait-for-it.sh -t 0 \"retool-postgresql\":\"5432\"; sleep 1500; mkdir dist/stuff; touch dist/stuff/test.html; ./docker_scripts/start_api.sh"
]

but we now see the containing crash looping:

➜ kubectl logs -n <namepsace> retool-55b87d976f-gfkbv
wait-for-it.sh: waiting for retool-postgresql:5432 without a timeout
wait-for-it.sh: retool-postgresql:5432 is available after 0 seconds

➜ k exec -it -n <namespace> retool-55b87d976f-gfkbv -- /bin/sh
error: Internal error occurred: unable to upgrade connection: container not found ("main-backend")

➜ kubectl describe pods -n <namespace> retool-55b87d976f-gfkbv
Name:             retool-55b87d976f-gfkbv
...
Events:
  Type     Reason     Age                   From     Message
  ----     ------     ----                  ----     -------
  Warning  Unhealthy  46m (x25 over 65m)    kubelet  Liveness probe failed: Get "http://10.49.16.164:3000/api/checkHealth": dial tcp 10.49.16.164:3000: connect: connection refused
  Warning  Unhealthy  21m (x110 over 65m)   kubelet  Readiness probe failed: Get "http://10.49.16.164:3000/api/checkHealth": dial tcp 10.49.16.164:3000: connect: connection refused
  Normal   Pulled     6m26s (x19 over 66m)  kubelet  Container image "tryretool/backend:3.114.3-stable" already present on machine
  Warning  BackOff    83s (x180 over 56m)   kubelet  Back-off restarting failed container main-backend in pod retool-55b87d976f-gfkbv_accounts(bb5d06ff-798a-4052-884d-9af60e117bbf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant