feat: add razor web

This commit is contained in:
吴小白
2024-11-19 17:38:25 +08:00
parent 7e8f5ab97e
commit 5f43a98043
4 changed files with 26 additions and 0 deletions

View File

@@ -3,6 +3,7 @@
{{ $core := printf "http://%s-%s:%s" (include "jumpserver.fullname" $) "jms-core" ($.Values.core.service.web.port | toString) }} {{ $core := printf "http://%s-%s:%s" (include "jumpserver.fullname" $) "jms-core" ($.Values.core.service.web.port | toString) }}
{{ $chen := printf "http://%s-%s:%s" (include "jumpserver.fullname" $) "jms-chen" ($.Values.chen.service.web.port | toString) }} {{ $chen := printf "http://%s-%s:%s" (include "jumpserver.fullname" $) "jms-chen" ($.Values.chen.service.web.port | toString) }}
{{ $kael := printf "http://%s-%s:%s" (include "jumpserver.fullname" $) "jms-kael" ($.Values.kael.service.web.port | toString) }} {{ $kael := printf "http://%s-%s:%s" (include "jumpserver.fullname" $) "jms-kael" ($.Values.kael.service.web.port | toString) }}
{{ $razor := printf "http://%s-%s:%s" (include "jumpserver.fullname" $) "jms-razor" ($.Values.razor.service.web.port | toString) }}
server { server {
listen {{ $.Values.web.service.web.port }}; listen {{ $.Values.web.service.web.port }};
server_name _; server_name _;
@@ -28,6 +29,18 @@ server {
location /static/ { location /static/ {
root /opt/jumpserver/data/; root /opt/jumpserver/data/;
} }
{{- if .Values.xpack.enabled }}
location /razor/ {
proxy_pass {{ $razor }};
proxy_buffering off;
proxy_http_version 1.1;
proxy_request_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_ignore_client_abort on;
{{- end }}
{{- if .Values.koko.enabled }} {{- if .Values.koko.enabled }}
location /koko/ { location /koko/ {
proxy_pass {{ $koko }}; proxy_pass {{ $koko }};

View File

@@ -49,6 +49,10 @@ spec:
value: {{ $.Values.core.config.bootstrapToken | quote }} value: {{ $.Values.core.config.bootstrapToken | quote }}
- name: LOG_LEVEL - name: LOG_LEVEL
value: {{ .config.log.level | quote }} value: {{ .config.log.level | quote }}
- name: RAZOR_HTTP_PORT
value: {{ .service.web.port | quote }}
- name: RDP_PORT
value: {{ .service.rdp.port | quote }}
{{- if include "jumpserver.sentinel.hosts" $ }} {{- if include "jumpserver.sentinel.hosts" $ }}
- name: REDIS_SENTINEL_HOSTS - name: REDIS_SENTINEL_HOSTS
value: {{ include "jumpserver.sentinel.hosts" $ | quote }} value: {{ include "jumpserver.sentinel.hosts" $ | quote }}
@@ -78,6 +82,9 @@ spec:
value: {{ $val | quote }} value: {{ $val | quote }}
{{- end }} {{- end }}
ports: ports:
- name: web
containerPort: {{ .service.web.port }}
protocol: TCP
- name: rdp - name: rdp
containerPort: {{ .service.rdp.port }} containerPort: {{ .service.rdp.port }}
protocol: TCP protocol: TCP

View File

@@ -14,6 +14,10 @@ metadata:
spec: spec:
type: {{ .service.type }} type: {{ .service.type }}
ports: ports:
- port: {{ .service.web.port }}
targetPort: web
protocol: TCP
name: web
- port: {{ .service.rdp.port }} - port: {{ .service.rdp.port }}
targetPort: rdp targetPort: rdp
{{- if eq .service.type "NodePort" }} {{- if eq .service.type "NodePort" }}

View File

@@ -604,6 +604,8 @@ xrdp:
service: service:
type: ClusterIP type: ClusterIP
web:
port: 8084
rdp: rdp:
port: 3390 port: 3390