Skip to content

[artifactory] allow to use proxy protocol for nginx#2156

Open
rufdoSICKAG wants to merge 1 commit intojfrog:masterfrom
rufdoSICKAG:proxy-protocol
Open

[artifactory] allow to use proxy protocol for nginx#2156
rufdoSICKAG wants to merge 1 commit intojfrog:masterfrom
rufdoSICKAG:proxy-protocol

Conversation

@rufdoSICKAG
Copy link

@rufdoSICKAG rufdoSICKAG commented Jan 9, 2026

When using a load balancer in front of nginx it is often required to enable proxy protocol.
This commit adds the required configuration options to enable proxy protocol support in the nginx configuration.

PR Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • Chart Version bumped
  • CHANGELOG.md updated
  • Variables and other changes are documented in the README.md
  • Title of the PR starts with chart name (e.g. [artifactory])

What this PR does / why we need it:

When using a load balancer in front of nginx it is often required to
enable proxy protocol.
This commit adds the required configuration options to enable proxy
protocol support in the nginx configuration.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@rufdoSICKAG
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@rufdoSICKAG
Copy link
Author

recheck

- sh
- -c
- curl -s -k --fail --max-time {{ .Values.probes.timeoutSeconds }} {{ include "nginx.scheme" . }}://localhost:{{ include "nginx.port" . }}/
- curl {{ if .Values.nginx.httpUseProxyProtocol }}--haproxy-protocol{{ end }} -s -k --fail --max-time {{ .Values.probes.timeoutSeconds }} {{ include "nginx.scheme" . }}://localhost:{{ include "nginx.port" . }}/
Copy link
Collaborator

Choose a reason for hiding this comment

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

The --haproxy-protocol flag is gated on httpUseProxyProtocol only, but the probe target is determined by nginx.scheme/nginx.port which may resolve to the HTTPS listener. If a user enables httpsUseProxyProtocol: true with HTTP disabled, probes hit the HTTPS port without --haproxy-protocol → nginx rejects every probe → CrashLoopBackOff
The condition should account for both.

ssh:
internalPort: 1339
externalPort: 1339
httpUseProxyProtocol: false
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add a comment that once proxy_protocol is enabled on a listener, all connections to that port must send a PROXY protocol header — including LB health checks and kubectl port-forward.
Users may need to reconfigure their LB health checks accordingly.

@shahiinn
Copy link
Collaborator

This PR only covers stable/artifactory. The stable/artifactory-ha/ chart has identical nginx config and probes. If possible, please include those changes as well.

When using a load balancer in front of nginx it is often required to
enable proxy protocol.
This commit adds the required configuration options to enable proxy
protocol support in the nginx configuration.

Signed-off-by: Dominik Ruf <dominik.ruf@sick.de>
@rufdoSICKAG
Copy link
Author

@shahiinn thanks for your review.
I updated my changes accordingly and rebased the commit to the current master branch.

@shahiinn
Copy link
Collaborator

Thanks for the contribution and for addressing the review feedback, @rufdoSICKAG!

The changes look good overall. One remaining item -- could you please update the CHANGELOG.md as well?

On our end, we will be picking this up internally and it will be part of one of the upcoming Artifactory chart releases. Once that release is out, this PR will be merged here.

@rufdoSICKAG
Copy link
Author

@shahiinn thanks for your feedback.
Regarding the CHANGELOG.md changes I'm unclear what exactly to do.
I don't know which new version will include my changes, so where exactly should I put my changes in CHANGELOG.md?
Also, changing CHANGELOG.md will make it harder to rebase my branch.
IMHO it would be much easier for everybody if the person who does the actual, final merge/rebase/release would make the CHANGELOG.md update.

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.

2 participants