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 -}} {{- $repositoryName := .imageRoot.repository -}}
{{- $tag := .imageRoot.tag | toString -}} {{- $tag := .imageRoot.tag | toString -}}
{{- if .global }} {{- if .global }}
{{- if .global.imageRegistry }} {{- if .global.imageRegistry }}
{{- $registryName = .global.imageRegistry -}} {{- $registryName = .global.imageRegistry -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- if $registryName }} {{- if $registryName }}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} {{- 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 ) -}} {{- include "common.images.image" ( dict "imageRoot" .Values.lion.image "global" .Values.global ) -}}
{{- end -}} {{- 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) 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) }} {{ include "common.images.pullSecrets" ( dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "global" .Values.global) }}
*/}} */}}
{{- define "common.images.pullSecrets" -}} {{- define "common.images.pullSecrets" -}}
{{- $pullSecrets := list }} {{- $pullSecrets := list }}
{{- if .global }} {{- if .global }}
{{- range .global.imagePullSecrets -}} {{- range .global.imagePullSecrets -}}
{{- $pullSecrets = append $pullSecrets . -}} {{- $pullSecrets = append $pullSecrets . -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- range .images -}} {{- range .images -}}
{{- range .pullSecrets -}} {{- range .pullSecrets -}}
{{- $pullSecrets = append $pullSecrets . -}} {{- $pullSecrets = append $pullSecrets . -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- if (not (empty $pullSecrets)) }} {{- if (not (empty $pullSecrets)) }}
imagePullSecrets: imagePullSecrets:
{{- range $pullSecrets }} {{- range $pullSecrets }}
- name: {{ . }} - name: {{ . }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end -}} {{- end -}}

View File

@ -2,7 +2,7 @@
{{- with .Values.omnidb }} {{- with .Values.omnidb }}
{{- $fullName := printf "%s-%s" (include "jumpserver.fullname" $) "jms-omnidb" }} {{- $fullName := printf "%s-%s" (include "jumpserver.fullname" $) "jms-omnidb" }}
{{- $containerName := "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 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:

View File

@ -2,7 +2,7 @@
{{- with .Values.xrdp }} {{- with .Values.xrdp }}
{{- $fullName := printf "%s-%s" (include "jumpserver.fullname" $) "jms-xrdp" }} {{- $fullName := printf "%s-%s" (include "jumpserver.fullname" $) "jms-xrdp" }}
{{- $containerName := "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 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata: