Merge pull request #17 from lvxiaohu/main

feat(xpack):  更新xpack镜像
This commit is contained in:
吴小白 2021-09-08 10:28:19 +08:00 committed by GitHub
commit 80d8ae9426
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 21 deletions

View File

@ -7,9 +7,9 @@ Return the proper image name
{{- $repositoryName := .imageRoot.repository -}}
{{- $tag := .imageRoot.tag | toString -}}
{{- if .global }}
{{- if .global.imageRegistry }}
{{- $registryName = .global.imageRegistry -}}
{{- end -}}
{{- if .global.imageRegistry }}
{{- $registryName = .global.imageRegistry -}}
{{- end -}}
{{- end -}}
{{- if $registryName }}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
@ -47,29 +47,43 @@ Return the proper JumpServer lion image name
{{- include "common.images.image" ( dict "imageRoot" .Values.lion.image "global" .Values.global ) -}}
{{- end -}}
{{/*
Return the proper JumpServer xrdp image name
*/}}
{{- define "jumpserver.xrdpImage" -}}
{{- include "common.images.image" ( dict "imageRoot" .Values.xrdp.image "global" .Values.global ) -}}
{{- end -}}
{{/*
Return the proper JumpServer omnidb image name
*/}}
{{- define "jumpserver.omnidbImage" -}}
{{- include "common.images.image" ( dict "imageRoot" .Values.omnidb.image "global" .Values.global ) -}}
{{- end -}}
{{/*
Return the proper Docker Image Registry Secret Names (deprecated: use common.images.renderPullSecrets instead)
{{ include "common.images.pullSecrets" ( dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "global" .Values.global) }}
*/}}
{{- define "common.images.pullSecrets" -}}
{{- $pullSecrets := list }}
{{- $pullSecrets := list }}
{{- if .global }}
{{- range .global.imagePullSecrets -}}
{{- $pullSecrets = append $pullSecrets . -}}
{{- end -}}
{{- end -}}
{{- range .images -}}
{{- range .pullSecrets -}}
{{- $pullSecrets = append $pullSecrets . -}}
{{- end -}}
{{- end -}}
{{- if (not (empty $pullSecrets)) }}
imagePullSecrets:
{{- range $pullSecrets }}
- name: {{ . }}
{{- end }}
{{- end }}
{{- if .global }}
{{- range .global.imagePullSecrets -}}
{{- $pullSecrets = append $pullSecrets . -}}
{{- end -}}
{{- end -}}
{{- range .images -}}
{{- range .pullSecrets -}}
{{- $pullSecrets = append $pullSecrets . -}}
{{- end -}}
{{- end -}}
{{- if (not (empty $pullSecrets)) }}
imagePullSecrets:
{{- range $pullSecrets }}
- name: {{ . }}
{{- end }}
{{- end }}
{{- end -}}

View File

@ -2,7 +2,7 @@
{{- with .Values.omnidb }}
{{- $fullName := printf "%s-%s" (include "jumpserver.fullname" $) "jms-omnidb" }}
{{- $containerName := "jms-omnidb" }}
{{- $image := printf "%s" (include "jumpserver.omnidbImage" $) }}
{{- $image := printf "%s:%s:%s" .image.registry .image.repository .image.tag }}
apiVersion: apps/v1
kind: Deployment
metadata:

View File

@ -2,7 +2,7 @@
{{- with .Values.xrdp }}
{{- $fullName := printf "%s-%s" (include "jumpserver.fullname" $) "jms-xrdp" }}
{{- $containerName := "jms-xrdp" }}
{{- $image := printf "%s" (include "jumpserver.xrdpImage" $) }}
{{- $image := printf "%s:%s:%s" .image.registry .image.repository .image.tag }}
apiVersion: apps/v1
kind: Deployment
metadata: