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

adopt netxcloud.containerport in FPM deployment, allow rootless nginx - nd2 try #444

Merged
merged 3 commits into from
Sep 8, 2023

Conversation

poggenpower
Copy link
Contributor

replaces #440
as the old PR got stuck in git fanciness, simply resubmit as a new PR.
Seems to be the easiest way

is netxcloud.containerport is set, it will also configure the port for
nginx. This allows nginx running in a rootless container e.g. by using
their official `nginxinc/nginx-unprivileged` image.
pid is written to /tmp for that reason.
Some enhanced configs parameter for service.

Signed-off-by: poggenpower <[email protected]>
Signed-off-by: poggenpower <[email protected]>
charts/nextcloud/README.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@jessebot jessebot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the values.yaml and the one other comment I left and you should be good to go :)

Signed-off-by: poggenpower <[email protected]>
worker_processes auto;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
pid /tmp/nginx.pid;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will this break any normal flows not using a non-root container?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pid stuff is not really required in containers, as the container get removed if something goes wrong, to pid to check and kill afterwards etc. As root has also permission to /tmp this change doesn't harm.

@jessebot jessebot merged commit 12ea561 into nextcloud:main Sep 8, 2023
2 checks passed
@jessebot
Copy link
Collaborator

jessebot commented Sep 8, 2023

thanks for all you hard work, @poggenpower !

@@ -44,7 +32,7 @@ data:
}

server {
listen 80;
listen {{ .Values.nginx.containerPort | default "80" }};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to miss this before it merged, but I'm curious why not just .Values.nextcloud.containerPort? I'm not seeing a reason why a new variable was necessary, and now it seems like it's necessary to set both variables. The deployment.yaml template still uses .Values.nextcloud.containerPort for the containerPort of the nginx container.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the case in my original PR, but we discussed this here #440 (comment) and ended up with an extra var.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could change the default to be containerPort, so the new line would be like:

listen {{ .Values.nginx.containerPort | default .Values.nextcloud.containerPort }};

Would that help?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing out the previous discussion. I don't follow the argument for granularity here, but if that feels right to you both then we should keep it.

The template update to fall back to the primary container port variable seems convenient, but I'm fine to leave things as they are.

It's only because I didn't understand any current or future scenarios where these variables would ever have different values, and didn't see the previous discussion, that I suggested just removing the nginx one.

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 this pull request may close these issues.

3 participants