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

Unable to set PENPOT_INTERNAL_RESOLVER env var on frontend deployment #12

Closed
a3nick opened this issue Dec 12, 2024 · 5 comments
Closed

Comments

@a3nick
Copy link

a3nick commented Dec 12, 2024

The Helm chart does not allow to set the environment variable PENPOT_INTERNAL_RESOLVER needed for the deployment of the frontend in a k8s cluster as described here penpot/penpot#3310.
The side effect is that assets (images, etc.) are saved correctly but are not served by the frontend due to the default value of the resolver in the nginx configuration file which is set to 127.0.0.11.

@vipinjn24
Copy link
Contributor

I am facing the same issue here, the logs says that the dns is not resolved and the connection times out.

2024/12/19 10:00:42 [error] 17#17: recv() failed (111: Connection refused) while resolving, resolver: 127.0.0.11:53
2024/12/19 10:00:47 [error] 17#17: recv() failed (111: Connection refused) while resolving, resolver: 127.0.0.11:53
2024/12/19 10:00:52 [error] 17#17: recv() failed (111: Connection refused) while resolving, resolver: 127.0.0.11:53
2024/12/19 10:00:57 [error] 17#17: recv() failed (111: Connection refused) while resolving, resolver: 127.0.0.11:53
2024/12/19 10:01:02 [error] 17#17: recv() failed (111: Connection refused) while resolving, resolver: 127.0.0.11:53
2024/12/19 10:01:07 [error] 17#17: recv() failed (111: Connection refused) while resolving, resolver: 127.0.0.11:53
2024/12/19 10:01:12 [error] 17#17: *47 minio.REDACTED could not be resolved (110: Operation timed out) while sending to client, client: 10.244.130.151, server: _, request: "GET /assets/by-id/1d7970d0-f032-45e4-9227-f199eda296d7 HTTP/1.1", host: "REDACTED", referrer: "https://REDACTED/"
10.244.130.151 - - [19/Dec/2024:10:01:12 +0000] "GET /assets/by-id/1d7970d0-f032-45e4-9227-f199eda296d7 HTTP/1.1" 502 552 "https://REDACTED/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"

@vipinjn24
Copy link
Contributor

I have prepared a PR to resolve this. This can be deployed in next version.

However if you need you can use the fork that i created and use the devel readme to deploy the modified chart for now.

@bameda
Copy link
Member

bameda commented Jan 7, 2025

Thank you for your contribution, @vipinjn24 and @a3nick. It will be available with the next release (hopefully tomorrow). But I think this solution does not work for some scenarios, for example using replicas, and It would be great if a suitable value could be set ‘automatically’ for each pot. We will work on it, but we are open to any suggestions.

@bameda
Copy link
Member

bameda commented Jan 8, 2025

I think I found a solution to set the default IP of the Pod so that you don't have to set it by hand. Try it out and let me know if it works for you. In my environment I can't reproduce the bug.

I will close the issue but feel free to reopen it if the error persists.

@bameda bameda closed this as completed Jan 8, 2025
@a3nick
Copy link
Author

a3nick commented Jan 9, 2025

I think I found a solution to set the default IP of the Pod so that you don't have to set it by hand. Try it out and let me know if it works for you. In my environment I can't reproduce the bug.

I will close the issue but feel free to reopen it if the error persists.

I tried the new helm chart version.

Using the config.internalResolver value works fine by specifying the ip address of the main k8s nameserver.
Usually, for CoreDns, is x.x.x.10, where x.x.x. is the base internal k8s CIDR

The solution you proposed, using the pod internal ip, doesn't work

2025/01/09 12:58:42 [error] 9#9: recv() failed (111: Connection refused) while resolving, resolver: 10.42.0.88:53

nothing is running on port 53, so the call fails

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

Successfully merging a pull request may close this issue.

3 participants