diff --git a/templates/NOTES.txt b/templates/NOTES.txt index 933c90d..9ba1b5d 100644 --- a/templates/NOTES.txt +++ b/templates/NOTES.txt @@ -2,10 +2,11 @@ {{- if .Values.ingress.enabled }} {{- range $host := .Values.ingress.hosts }} http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host }} + username: admin password: admin {{- end }} {{- end }} +{{- if eq .Values.koko.service.ssh.type "LoadBalancer" }} 2. Access the Jumpserver SSH server by running these commands: -{{- if eq .Values.koko.service.type "LoadBalancer" }} - ssh -p{{ .Values.koko.service.ssh.port }} admin@{{ .Values.koko.service.loadBalancerIP }} + ssh -p{{ .Values.koko.service.ssh.port }} admin@{{ .Values.koko.service.ssh.loadBalancerIP }} {{- end }} diff --git a/templates/koko/service-koko.yaml b/templates/koko/service-koko-ssh.yaml similarity index 84% rename from templates/koko/service-koko.yaml rename to templates/koko/service-koko-ssh.yaml index 268bd1d..8b4c257 100644 --- a/templates/koko/service-koko.yaml +++ b/templates/koko/service-koko-ssh.yaml @@ -1,6 +1,6 @@ {{- if .Values.koko.enabled }} {{- with .Values.koko }} -{{- $fullName := printf "%s-%s" (include "jumpserver.fullname" $) "jms-koko" }} +{{- $fullName := printf "%s-%s" (include "jumpserver.fullname" $) "jms-koko-ssh" }} apiVersion: v1 kind: Service metadata: @@ -11,12 +11,8 @@ metadata: annotations: {{- toYaml .service.annotations | nindent 4 }} spec: - type: {{ .service.type }} + type: {{ .service.ssh.type }} ports: - - port: {{ .service.web.port }} - targetPort: web - protocol: TCP - name: web - port: {{ .service.ssh.port }} targetPort: ssh protocol: TCP diff --git a/templates/koko/service-koko-web.yaml b/templates/koko/service-koko-web.yaml new file mode 100644 index 0000000..9e12a4e --- /dev/null +++ b/templates/koko/service-koko-web.yaml @@ -0,0 +1,29 @@ +{{- if .Values.koko.enabled }} +{{- with .Values.koko }} +{{- $fullName := printf "%s-%s" (include "jumpserver.fullname" $) "jms-koko-web" }} +apiVersion: v1 +kind: Service +metadata: + name: {{ $fullName }} + labels: + {{- include "jumpserver.labels" $ | nindent 4 }} + {{- toYaml .labels | nindent 4 }} + annotations: + {{- toYaml .service.annotations | nindent 4 }} +spec: + type: {{ .service.web.type }} + ports: + - port: {{ .service.web.port }} + targetPort: web + protocol: TCP + name: web + sessionAffinity: ClientIP + sessionAffinityConfig: + clientIP: + timeoutSeconds: 10800 + selector: + app.kubernetes.io/name: {{ include "jumpserver.name" $ }} + app.kubernetes.io/instance: {{ $.Release.Name }} + {{- toYaml .labels | nindent 4 }} +{{- end }} +{{- end }} diff --git a/values.yaml b/values.yaml index 466f18b..388dbef 100644 --- a/values.yaml +++ b/values.yaml @@ -202,10 +202,12 @@ koko: # runAsUser: 1000 service: - type: ClusterIP web: + type: ClusterIP port: 5000 ssh: + type: ClusterIP + # loadBalancerIP: port: 2222 resources: {}