diff --git a/templates/ingress.yaml b/templates/ingress.yaml index ed0762b..de03a49 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -1,9 +1,5 @@ {{- if .Values.ingress.enabled }} -{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} +apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ include "jumpserver.fullname" . }} @@ -29,9 +25,12 @@ spec: - host: {{ . }} http: paths: - - path: / + - pathType: Prefix + path: / backend: - serviceName: '{{printf "%s-%s" (include "jumpserver.fullname" $) "jms-nginx"}}' - servicePort: web + service: + name: '{{printf "%s-%s" (include "jumpserver.fullname" $) "jms-nginx"}}' + port: + number: 80 {{- end }} {{- end }} diff --git a/templates/service-core.yaml b/templates/service-core.yaml index 402ae9b..32c4af0 100644 --- a/templates/service-core.yaml +++ b/templates/service-core.yaml @@ -19,9 +19,13 @@ spec: targetPort: ws protocol: TCP name: ws + 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 }} \ No newline at end of file +{{- end }} diff --git a/templates/service-koko.yaml b/templates/service-koko.yaml index 1de8964..268bd1d 100644 --- a/templates/service-koko.yaml +++ b/templates/service-koko.yaml @@ -21,9 +21,13 @@ spec: targetPort: ssh protocol: TCP name: ssh + 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 }} \ No newline at end of file +{{- end }} diff --git a/templates/service-lion.yaml b/templates/service-lion.yaml index 685f1c6..d3e51d6 100644 --- a/templates/service-lion.yaml +++ b/templates/service-lion.yaml @@ -15,9 +15,13 @@ spec: 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 }} \ No newline at end of file +{{- end }} diff --git a/templates/service-nginx.yaml b/templates/service-nginx.yaml index 76ef85b..61d2503 100644 --- a/templates/service-nginx.yaml +++ b/templates/service-nginx.yaml @@ -15,9 +15,13 @@ spec: 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 }} \ No newline at end of file +{{- end }} diff --git a/values.yaml b/values.yaml index 29e22b7..55727a1 100644 --- a/values.yaml +++ b/values.yaml @@ -21,6 +21,7 @@ ingress: # kubernetes.io/tls-acme: "true" compute-full-forwarded-for: "true" use-forwarded-headers: "true" + hosts: - "test.jumpserver.org" tls: []