Skip to content

Commit

Permalink
Merge pull request #125 from wojiushixiaobai/main
Browse files Browse the repository at this point in the history
fix: 修正 api 接口
  • Loading branch information
wojiushixiaobai authored Feb 28, 2023
2 parents cffa5b9 + 840acd2 commit b0f9925
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 28 deletions.
19 changes: 4 additions & 15 deletions charts/jumpserver/configs/jms-web/default.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{{ $koko := printf "http://%s-%s:%s" (include "jumpserver.fullname" $) "jms-koko" ($.Values.koko.service.web.port | toString) }}
{{ $lion := printf "http://%s-%s:%s" (include "jumpserver.fullname" $) "jms-lion" ($.Values.lion.service.web.port | toString) }}
{{ $coreweb := printf "http://%s-%s:%s" (include "jumpserver.fullname" $) "jms-core" ($.Values.core.service.web.port | toString) }}
{{ $corews := printf "http://%s-%s:%s" (include "jumpserver.fullname" $) "jms-core" ($.Values.core.service.ws.port | toString) }}
{{ $core := printf "http://%s-%s:%s" (include "jumpserver.fullname" $) "jms-core" ($.Values.core.service.web.port | toString) }}
{{ $omnidb := printf "http://%s-%s:%s" (include "jumpserver.fullname" $) "jms-omnidb" ($.Values.omnidb.service.web.port | toString) }}
server {
listen {{ $.Values.web.service.web.port }};
Expand All @@ -25,9 +24,6 @@ server {
add_header Content-Encoding gzip;
root /opt/jumpserver/data/;
}
location /media/ {
root /opt/jumpserver/data/;
}
location /static/ {
root /opt/jumpserver/data/;
}
Expand Down Expand Up @@ -76,7 +72,7 @@ server {
}
{{- end }}
location /ws/ {
proxy_pass {{ $corews }};
proxy_pass {{ $core }};
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
Expand All @@ -85,15 +81,8 @@ server {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api/ {
proxy_pass {{ $coreweb }};
proxy_buffering off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /core/ {
proxy_pass {{ $coreweb }};
location ~ ^/(core|api|media)/ {
proxy_pass {{ $core }};
proxy_buffering off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
Expand Down
2 changes: 0 additions & 2 deletions charts/jumpserver/templates/celery/deployment-celery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ spec:
value: {{ .config.log.level | quote }}
- name: HTTP_LISTEN_PORT
value: {{ .service.web.port | quote }}
- name: WS_LISTEN_PORT
value: {{ .service.ws.port | quote }}
- name: DB_ENGINE
value: {{ include "jumpserver.database.engine" $ | quote }}
- name: DB_HOST
Expand Down
5 changes: 0 additions & 5 deletions charts/jumpserver/templates/core/deployment-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ spec:
value: {{ .config.log.level | quote }}
- name: HTTP_LISTEN_PORT
value: {{ .service.web.port | quote }}
- name: WS_LISTEN_PORT
value: {{ .service.ws.port | quote }}
- name: DB_ENGINE
value: {{ include "jumpserver.database.engine" $ | quote }}
- name: DB_HOST
Expand Down Expand Up @@ -96,9 +94,6 @@ spec:
- name: web
containerPort: {{ .service.web.port }}
protocol: TCP
- name: ws
containerPort: {{ .service.ws.port }}
protocol: TCP
livenessProbe:
{{- toYaml .livenessProbe | nindent 12 }}
readinessProbe:
Expand Down
4 changes: 0 additions & 4 deletions charts/jumpserver/templates/core/service-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ spec:
targetPort: web
protocol: TCP
name: web
- port: {{ .service.ws.port }}
targetPort: ws
protocol: TCP
name: ws
sessionAffinity: ClientIP
sessionAffinityConfig:
clientIP:
Expand Down
2 changes: 0 additions & 2 deletions charts/jumpserver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ core:
type: ClusterIP
web:
port: 8080
ws:
port: 8070

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
Expand Down

0 comments on commit b0f9925

Please sign in to comment.