Skip to content

Commit

Permalink
fix: 添加 sqlserver 服务端口
Browse files Browse the repository at this point in the history
  • Loading branch information
wojiushixiaobai committed Nov 11, 2024
1 parent 68c8b6f commit f6ec663
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
3 changes: 3 additions & 0 deletions charts/jumpserver/templates/magnus/deployment-magnus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
{{- $mariadbPort := printf "%s" (include "jumpserver.magnus.mariadb.port" $) }}
{{- $redisPort := printf "%s" (include "jumpserver.magnus.redis.port" $) }}
{{- $postgresqlPort := printf "%s" (include "jumpserver.magnus.postgresql.port" $) }}
{{- $sqlserverPort := printf "%s" (include "jumpserver.magnus.sqlserver.port" $) }}
{{- $oraclePorts := printf "%s" (include "jumpserver.magnus.oracle.ports" $) }}
{{- $oraclePortStart := printf "%s" (include "jumpserver.magnus.oracle.port.start" $) | int }}
{{- $oraclePortEnd := printf "%s" (include "jumpserver.magnus.oracle.port.end" $) | int }}
Expand Down Expand Up @@ -91,6 +92,8 @@ spec:
value: {{ $redisPort | quote }}
- name: MAGNUS_POSTGRESQL_PORT
value: {{ $postgresqlPort | quote }}
- name: MAGNUS_SQLSERVER_PORT
value: {{ $sqlserverPort | quote }}
- name: MAGNUS_ORACLE_PORTS
value: {{ $oraclePorts | quote }}
{{- range $key, $val := .env }}
Expand Down
23 changes: 19 additions & 4 deletions charts/jumpserver/templates/magnus/service-magnus.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{{- if .Values.xpack.enabled }}
{{- with .Values.magnus }}
{{- $fullName := include "jumpserver.fullname" $ }}
{{- $mysqlPort := printf "%s" (include "jumpserver.magnus.mysql.port" $) }}
{{- $mariadbPort := printf "%s" (include "jumpserver.magnus.mariadb.port" $) }}
{{- $redisPort := printf "%s" (include "jumpserver.magnus.redis.port" $) }}
{{- $postgresqlPort := printf "%s" (include "jumpserver.magnus.postgresql.port" $) }}
{{- $oraclePortStart := printf "%s" (include "jumpserver.magnus.oracle.port.start" $) | int }}
{{- $oraclePortEnd := printf "%s" (include "jumpserver.magnus.oracle.port.end" $) | int}}

Expand All @@ -25,21 +21,40 @@ spec:
protocol: TCP
name: web
- port: {{ .service.mysql.port }}
{{- if eq .service.type "NodePort" }}
nodePort: {{ .service.mysql.port }}
{{- end }}
targetPort: mysql
protocol: TCP
name: mysql
- port: {{ .service.mariadb.port }}
{{- if eq .service.type "NodePort" }}
nodePort: {{ .service.mariadb.port }}
{{- end }}
targetPort: mariadb
protocol: TCP
name: mariadb
- port: {{ .service.redis.port }}
{{- if eq .service.type "NodePort" }}
nodePort: {{ .service.redis.port }}
{{- end }}
targetPort: redis
protocol: TCP
name: redis
- port: {{ .service.postgresql.port }}
{{- if eq .service.type "NodePort" }}
nodePort: {{ .service.postgresql.port }}
{{- end }}
targetPort: postgresql
protocol: TCP
name: postgresql
- port: {{ .service.sqlserver.port }}
{{- if eq .service.type "NodePort" }}
nodePort: {{ .service.sqlserver.port }}
{{- end }}
targetPort: sqlserver
protocol: TCP
name: sqlserver
{{- range $port := untilStep $oraclePortStart $oraclePortEnd 1 }}
- port: {{ $port }}
{{- if eq $.Values.magnus.service.type "NodePort" }}
Expand Down

0 comments on commit f6ec663

Please sign in to comment.