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

Updated on top of fwdIT:Fix_for_ClusterIP_type_service #1926

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion stable/artifactory-ha/files/nginx-artifactory-conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,18 @@ location / {
proxy_cookie_path ~*^/.* /;
proxy_pass {{ include "artifactory-ha.scheme" . }}://{{ include "artifactory-ha.fullname" . }}:{{ .Values.artifactory.externalPort }}/;
{{- if .Values.nginx.service.ssloffload}}
{{- if .Values.nginx.service.ssloffloadForceHttps}}
proxy_set_header X-JFrog-Override-Base-Url https://$host;
proxy_set_header X-Forwarded-Proto https;
{{- else }}
proxy_set_header X-JFrog-Override-Base-Url $http_x_forwarded_proto://$host;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
{{- end }}
{{- else }}
proxy_set_header X-JFrog-Override-Base-Url $http_x_forwarded_proto://$host:$host_port;
proxy_set_header X-Forwarded-Port $server_port;
{{- end }}
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
{{- end }}
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
{{- if .Values.nginx.disableProxyBuffering}}
Expand Down
2 changes: 1 addition & 1 deletion stable/artifactory-ha/templates/nginx-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ spec:
{{- if .Values.nginx.https }}
{{- if or .Values.nginx.https.enabled .Values.nginx.service.ssloffload }}
- port: {{ .Values.nginx.https.externalPort }}
{{- if .Values.nginx.service.ssloffload }}
{{- if and .Values.nginx.service.ssloffload (not .Values.nginx.service.ssloffloadForceHttps) }}
targetPort: {{ .Values.nginx.http.internalPort }}
{{- else }}
targetPort: {{ .Values.nginx.https.internalPort}}
Expand Down
2 changes: 2 additions & 0 deletions stable/artifactory-ha/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1628,6 +1628,8 @@ nginx:
## @param service.ipFamilyPolicy Controller Service ipFamilyPolicy (optional, cloud specific)
## This can be either SingleStack, PreferDualStack or RequireDualStack
## ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services

ssloffloadForceHttps: false
##
ipFamilyPolicy: ""
## @param service.ipFamilies Controller Service ipFamilies (optional, cloud specific)
Expand Down
8 changes: 7 additions & 1 deletion stable/artifactory/files/nginx-artifactory-conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,18 @@ location / {
proxy_cookie_path ~*^/.* /;
proxy_pass {{ include "artifactory.scheme" . }}://{{ include "artifactory.fullname" . }}:{{ .Values.artifactory.externalPort }}/;
{{- if .Values.nginx.service.ssloffload}}
{{- if .Values.nginx.service.ssloffloadForceHttps}}
proxy_set_header X-JFrog-Override-Base-Url https://$host;
proxy_set_header X-Forwarded-Proto https;
{{- else }}
proxy_set_header X-JFrog-Override-Base-Url $http_x_forwarded_proto://$host;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
{{- end }}
{{- else }}
proxy_set_header X-JFrog-Override-Base-Url $http_x_forwarded_proto://$host:$host_port;
proxy_set_header X-Forwarded-Port $server_port;
{{- end }}
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
{{- end }}
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
{{- if .Values.nginx.disableProxyBuffering}}
Expand Down
2 changes: 1 addition & 1 deletion stable/artifactory/templates/nginx-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ spec:
{{- if .Values.nginx.https }}
{{- if or .Values.nginx.https.enabled .Values.nginx.service.ssloffload }}
- port: {{ .Values.nginx.https.externalPort }}
{{- if .Values.nginx.service.ssloffload }}
{{- if and .Values.nginx.service.ssloffload (not .Values.nginx.service.ssloffloadForceHttps) }}
targetPort: {{ .Values.nginx.http.internalPort }}
{{- else }}
targetPort: {{ .Values.nginx.https.internalPort}}
Expand Down
4 changes: 4 additions & 0 deletions stable/artifactory/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1481,6 +1481,10 @@ nginx:
## @param service.ipFamilyPolicy Controller Service ipFamilyPolicy (optional, cloud specific)
## This can be either SingleStack, PreferDualStack or RequireDualStack
## ref: https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services

## @param service.ssloffloadForceHttps Override http_x_forwarded_proto flag for external ingress (optional, likely OpenShift specific for ClusterIP based nginx service config)
ssloffloadForceHttps: false

##
ipFamilyPolicy: ""
## @param service.ipFamilies Controller Service ipFamilies (optional, cloud specific)
Expand Down
Loading