Skip to content

The Unified and Autonomous Development Platform

chore: Update Helm chart to enhance SSH and ingress configurations

Robin Shen851e5cf761d1
diff --git a/server-product/helm/Chart.yaml b/server-product/helm/Chart.yaml
index ca0d04b586..eb26b70f98 100644
--- a/server-product/helm/Chart.yaml
+++ b/server-product/helm/Chart.yaml
@@ -12,6 +12,4 @@ home: https://onedev.io
maintainers:
- name: Robin Shen
- - name: Abdul Khaliq
appVersion: ${buildVersion}
diff --git a/server-product/helm/templates/NOTES.txt b/server-product/helm/templates/NOTES.txt
index 3f24e5bcbe..98be190b0d 100644
--- a/server-product/helm/templates/NOTES.txt
+++ b/server-product/helm/templates/NOTES.txt
@@ -3,10 +3,20 @@ CHART VERSION: {{ .Chart.Version }}
APP VERSION: {{ .Chart.AppVersion }}
{{- if and (not .Values.command) (not .Values.args) (eq .Values.image.name "1dev/server") }}
+{{- $sshEnabled := default false ((.Values.ssh | default dict).enabled) }}
** Please be patient while the chart is being deployed **
+{{- if and .Release.IsUpgrade (not $sshEnabled) }}
+
+WARNING: SSH access is disabled. If the existing installation exposes SSH through
+a LoadBalancer, nginx ingress controller, or another TCP proxy, retain SSH access
+by adding --set ssh.enabled=true --reuse-values to the Helm upgrade command.
+{{- end }}
+
{{- if .Values.ingress.enabled }}
+{{- $controller := include "ods.ingressController" . }}
+{{- $hosts := concat (list .Values.ingress.host) (.Values.ingress.additionalHosts | default (list)) }}
You can access OneDev at:
@@ -15,22 +25,20 @@ You can access OneDev at:
{{- else }}
http://{{ .Values.ingress.host }}
{{- end }}
-{{- if eq (include "ods.traefikEnabled" .) "true" }}
+Ingress controller: {{ $controller }}
+
+ host names: {{ join ", " $hosts }}
+ ssh: {{ ternary "enabled" "disabled" $sshEnabled }}
+{{- if eq $controller "traefik" }}
Traffic is routed by Traefik:
- http entry point: {{ default "websecure" .Values.ingress.traefik.entryPoint }}
- host names: {{ join ", " (.Values.ingress.traefik.hosts | default (list .Values.ingress.host)) }}
-{{- $sshEntryPoint := include "ods.traefikSshEntryPoint" . }}
-{{- if $sshEntryPoint }}
- ssh entry point: {{ $sshEntryPoint }}
+ http entry point: {{ ternary "websecure" "web" .Values.ingress.tls.enabled }}
+{{- if $sshEnabled }}
+ ssh entry point: gitssh
-Make sure entry point {{ $sshEntryPoint }} is declared in your Traefik installation, and update
+Make sure entry point gitssh is declared in your Traefik installation, and update
SSH root url as ssh://{{ .Values.ingress.host }} in menu Administration/System Setting
-{{- else }}
- ssh: not exposed via Traefik
-
-Set ingress.traefik.sshEntryPoint if you want ssh to be routed by Traefik as well
{{- end }}
{{- end }}
diff --git a/server-product/helm/templates/_helpers.tpl b/server-product/helm/templates/_helpers.tpl
index 962670d517..0664310a69 100644
--- a/server-product/helm/templates/_helpers.tpl
+++ b/server-product/helm/templates/_helpers.tpl
@@ -67,27 +67,14 @@ Return the ServiceAccount name
{{- end -}}
{{/*
-Return "true" when routing should be done with Traefik CRDs instead of a Kubernetes Ingress
+Return and validate the configured ingress controller
*/}}
-{{- define "ods.traefikEnabled" -}}
-{{- if (.Values.ingress.traefik | default dict).enabled -}}
-{{- print "true" -}}
-{{- end -}}
-{{- end -}}
-
-{{/*
-Return the Traefik entry point serving ssh traffic, or empty when ssh should not be exposed.
-An absent key means values were carried over from a chart predating this setting, as happens
-with "helm upgrade --reuse-values", in which case the chart default applies so that upgrading
-matches a fresh install. An explicit empty value disables the ssh route.
-*/}}
-{{- define "ods.traefikSshEntryPoint" -}}
-{{- $traefik := .Values.ingress.traefik | default dict -}}
-{{- if hasKey $traefik "sshEntryPoint" -}}
-{{- $traefik.sshEntryPoint | default "" -}}
-{{- else -}}
-{{- print "gitssh" -}}
+{{- define "ods.ingressController" -}}
+{{- $controller := default "nginx" .Values.ingress.controller -}}
+{{- if not (has $controller (list "nginx" "traefik")) -}}
+{{- fail (printf "unsupported ingress controller %q: expected nginx or traefik" $controller) -}}
{{- end -}}
+{{- $controller -}}
{{- end -}}
{{/*
diff --git a/server-product/helm/templates/certificate.yaml b/server-product/helm/templates/certificate.yaml
index 168e6778e3..499f753db8 100644
--- a/server-product/helm/templates/certificate.yaml
+++ b/server-product/helm/templates/certificate.yaml
@@ -1,9 +1,10 @@
-{{- $traefikEnabled := eq (include "ods.traefikEnabled" .) "true" -}}
-{{- if and .Values.ingress.enabled $traefikEnabled .Values.ingress.tls.enabled .Values.ingress.tls.acme.enabled }}
+{{- $controller := include "ods.ingressController" . -}}
+{{- if and .Values.ingress.enabled (eq $controller "traefik") .Values.ingress.tls.enabled .Values.ingress.tls.acme.enabled }}
+{{- $hosts := concat (list .Values.ingress.host) (.Values.ingress.additionalHosts | default (list)) }}
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
- name: {{ include "ods.fullname" . }}
+ name: {{ .Values.ingress.tls.secretName }}
namespace: {{ .Release.Namespace }}
spec:
secretName: {{ .Values.ingress.tls.secretName }}
@@ -11,7 +12,7 @@ spec:
name: {{ include "ods.fullname" . }}
kind: Issuer
dnsNames:
- {{- range .Values.ingress.traefik.hosts | default (list .Values.ingress.host) }}
+ {{- range $hosts }}
- {{ . | quote }}
{{- end }}
{{- end }}
diff --git a/server-product/helm/templates/ingress-nginx.yaml b/server-product/helm/templates/ingress-nginx.yaml
new file mode 100644
index 0000000000..373d772693
--- /dev/null
+++ b/server-product/helm/templates/ingress-nginx.yaml
@@ -0,0 +1,68 @@
+{{- $controller := include "ods.ingressController" . -}}
+{{- if and .Values.ingress.enabled (eq $controller "nginx") -}}
+{{- $annotations := dict }}
+{{- $hosts := concat (list .Values.ingress.host) (.Values.ingress.additionalHosts | default (list)) }}
+{{- if and .Values.ingress.tls.enabled .Values.ingress.tls.acme.enabled }}
+ {{- $_ := set $annotations "cert-manager.io/issuer" (include "ods.fullname" .) }}
+{{- end }}
+{{- with (.Values.ingress.nginx | default dict).annotations }}
+ {{- $annotations = mergeOverwrite $annotations . }}
+{{- end }}
+{{- with .Values.ingress.annotations }}
+ {{- $annotations = mergeOverwrite $annotations . }}
+{{- end }}
+{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
+ {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }}
+ {{- $_ := set $annotations "kubernetes.io/ingress.class" .Values.ingress.className }}
+ {{- end }}
+{{- end }}
+{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
+apiVersion: networking.k8s.io/v1
+{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
+apiVersion: networking.k8s.io/v1beta1
+{{- else -}}
+apiVersion: extensions/v1beta1
+{{- end }}
+kind: Ingress
+metadata:
+ name: {{ include "ods.fullname" . }}
+ namespace: {{ .Release.Namespace }}
+ labels:
+{{ include "ods.labels" . | indent 4 }}
+ {{- with $annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
+ ingressClassName: {{ .Values.ingress.className }}
+ {{- end }}
+ {{- if .Values.ingress.tls.enabled }}
+ tls:
+ - hosts:
+ {{- range $hosts }}
+ - {{ . | quote }}
+ {{- end }}
+ secretName: {{ .Values.ingress.tls.secretName }}
+ {{- end }}
+ rules:
+ {{- range $hosts }}
+ - host: {{ . | quote }}
+ http:
+ paths:
+ - path: "/"
+ {{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
+ pathType: ImplementationSpecific
+ {{- end }}
+ backend:
+ {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
+ service:
+ name: {{ include "ods.fullname" $ }}
+ port:
+ name: "http"
+ {{- else }}
+ serviceName: {{ include "ods.fullname" $ }}
+ servicePort: {{ default "80" $.Values.service.ports.http }}
+ {{- end }}
+ {{- end }}
+{{- end }}
diff --git a/server-product/helm/templates/ingress-traefik.yaml b/server-product/helm/templates/ingress-traefik.yaml
new file mode 100644
index 0000000000..29a85bf9be
--- /dev/null
+++ b/server-product/helm/templates/ingress-traefik.yaml
@@ -0,0 +1,77 @@
+{{- $controller := include "ods.ingressController" . -}}
+{{- if and .Values.ingress.enabled (eq $controller "traefik") -}}
+{{- $traefik := .Values.ingress.traefik }}
+{{- $middleware := $traefik.middleware | default dict }}
+{{- $ssh := .Values.ssh | default dict }}
+{{- $separateService := $ssh.separateService | default dict }}
+{{- $hosts := concat (list .Values.ingress.host) (.Values.ingress.additionalHosts | default (list)) }}
+{{- if $ssh.enabled }}
+apiVersion: traefik.io/v1alpha1
+kind: IngressRouteTCP
+metadata:
+ name: {{ include "ods.fullname" . }}-ssh
+ namespace: {{ .Release.Namespace }}
+ labels:
+{{ include "ods.labels" . | indent 4 }}
+spec:
+ entryPoints:
+ - gitssh
+ routes:
+ - match: HostSNI(`*`)
+ services:
+ {{- if $separateService.enabled }}
+ - name: {{ include "ods.fullname" . }}-ssh
+ port: {{ default "22" $ssh.port }}
+ {{- else }}
+ - name: {{ include "ods.fullname" . }}
+ port: {{ default "22" $ssh.port }}
+ {{- end }}
+---
+{{- end }}
+apiVersion: traefik.io/v1alpha1
+kind: IngressRoute
+metadata:
+ name: {{ include "ods.fullname" . }}
+ namespace: {{ .Release.Namespace }}
+ labels:
+{{ include "ods.labels" . | indent 4 }}
+spec:
+ entryPoints:
+ - {{ ternary "websecure" "web" .Values.ingress.tls.enabled }}
+ routes:
+ {{- $matchers := list }}
+ {{- range $hosts }}
+ {{- $matchers = append $matchers (printf "Host(`%s`)" .) }}
+ {{- end }}
+ - match: {{ join " || " $matchers }}
+ kind: Rule
+ middlewares:
+ - name: {{ include "ods.traefikMiddlewareName" . }}
+ namespace: {{ .Release.Namespace }}
+ {{- range $traefik.extraMiddlewares }}
+ - name: {{ .name }}
+ namespace: {{ default $.Release.Namespace .namespace }}
+ {{- end }}
+ services:
+ - name: {{ include "ods.fullname" . }}
+ port: {{ default "80" .Values.service.ports.http }}
+ sticky:
+ cookie:
+ httpOnly: true
+{{- if .Values.ingress.tls.enabled }}
+ tls:
+ secretName: {{ .Values.ingress.tls.secretName }}
+{{- end }}
+---
+apiVersion: traefik.io/v1alpha1
+kind: Middleware
+metadata:
+ name: {{ include "ods.traefikMiddlewareName" . }}
+ namespace: {{ .Release.Namespace }}
+ labels:
+{{ include "ods.labels" . | indent 4 }}
+spec:
+ buffering:
+ maxRequestBodyBytes: {{ int64 (default 1073741824 $middleware.maxRequestBodyBytes) }}
+ memRequestBodyBytes: {{ int64 (default 1073741824 $middleware.memRequestBodyBytes) }}
+{{- end }}
diff --git a/server-product/helm/templates/ingress.yaml b/server-product/helm/templates/ingress.yaml
deleted file mode 100644
index 40c3e66007..0000000000
--- a/server-product/helm/templates/ingress.yaml
+++ /dev/null
@@ -1,139 +0,0 @@
-{{- $traefikEnabled := eq (include "ods.traefikEnabled" .) "true" -}}
-{{- if .Values.ingress.enabled -}}
-{{- if not $traefikEnabled }}
-{{- $annotations := dict }}
-{{- if and .Values.ingress.tls.enabled .Values.ingress.tls.acme.enabled }}
- {{- $_ := set $annotations "cert-manager.io/issuer" (include "ods.fullname" .) }}
-{{- end }}
-{{- with (.Values.ingress.nginx | default dict).annotations }}
- {{- $annotations = mergeOverwrite $annotations . }}
-{{- end }}
-{{- with .Values.ingress.annotations }}
- {{- $annotations = mergeOverwrite $annotations . }}
-{{- end }}
-{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
- {{- if not (hasKey $annotations "kubernetes.io/ingress.class") }}
- {{- $_ := set $annotations "kubernetes.io/ingress.class" .Values.ingress.className }}
- {{- end }}
-{{- end }}
-{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
-apiVersion: networking.k8s.io/v1
-{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
-apiVersion: networking.k8s.io/v1beta1
-{{- else -}}
-apiVersion: extensions/v1beta1
-{{- end }}
-kind: Ingress
-metadata:
- name: {{ include "ods.fullname" . }}
- namespace: {{ .Release.Namespace }}
- labels:
-{{ include "ods.labels" . | indent 4 }}
- {{- with $annotations }}
- annotations:
- {{- toYaml . | nindent 4 }}
- {{- end }}
-spec:
- {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
- ingressClassName: {{ .Values.ingress.className }}
- {{- end }}
- {{- if .Values.ingress.tls.enabled }}
- tls:
- - hosts:
- - {{ .Values.ingress.host }}
- secretName: {{ .Values.ingress.tls.secretName }}
- {{- end }}
- rules:
- - host: {{ .Values.ingress.host | quote }}
- http:
- paths:
- - path: "/"
- {{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
- pathType: ImplementationSpecific
- {{- end }}
- backend:
- {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
- service:
- name: {{ include "ods.fullname" $ }}
- port:
- name: "http"
- {{- else }}
- serviceName: {{ include "ods.fullname" $ }}
- servicePort: {{ default "80" .Values.service.ports.http }}
- {{- end }}
-{{- end }}
-{{- if $traefikEnabled }}
-{{- $traefik := .Values.ingress.traefik }}
-{{- $middleware := $traefik.middleware | default dict }}
-{{- $sshEntryPoint := include "ods.traefikSshEntryPoint" . }}
-{{- if $sshEntryPoint }}
-apiVersion: traefik.io/v1alpha1
-kind: IngressRouteTCP
-metadata:
- name: {{ include "ods.fullname" . }}-ssh
- namespace: {{ .Release.Namespace }}
- labels:
-{{ include "ods.labels" . | indent 4 }}
-spec:
- entryPoints:
- - {{ $sshEntryPoint }}
- routes:
- - match: HostSNI(`*`)
- services:
- {{- if .Values.service.separateSSH.enabled }}
- - name: {{ include "ods.fullname" . }}-ssh
- port: {{ default "22" .Values.service.separateSSH.port }}
- {{- else }}
- - name: {{ include "ods.fullname" . }}
- port: {{ default "22" .Values.service.ports.ssh }}
- {{- end }}
----
-{{- end }}
-apiVersion: traefik.io/v1alpha1
-kind: IngressRoute
-metadata:
- name: {{ include "ods.fullname" . }}
- namespace: {{ .Release.Namespace }}
- labels:
-{{ include "ods.labels" . | indent 4 }}
-spec:
- entryPoints:
- - {{ default "websecure" $traefik.entryPoint }}
- routes:
- {{- $matchers := list }}
- {{- range $traefik.hosts | default (list .Values.ingress.host) }}
- {{- $matchers = append $matchers (printf "`%s`" .) }}
- {{- end }}
- - match: Host({{ join ", " $matchers }})
- kind: Rule
- middlewares:
- - name: {{ include "ods.traefikMiddlewareName" . }}
- namespace: {{ .Release.Namespace }}
- {{- range $traefik.extraMiddlewares }}
- - name: {{ .name }}
- namespace: {{ default $.Release.Namespace .namespace }}
- {{- end }}
- services:
- - name: {{ include "ods.fullname" . }}
- port: {{ default "80" .Values.service.ports.http }}
- sticky:
- cookie:
- httpOnly: true
-{{- if .Values.ingress.tls.enabled }}
- tls:
- secretName: {{ .Values.ingress.tls.secretName }}
-{{- end }}
----
-apiVersion: traefik.io/v1alpha1
-kind: Middleware
-metadata:
- name: {{ include "ods.traefikMiddlewareName" . }}
- namespace: {{ .Release.Namespace }}
- labels:
-{{ include "ods.labels" . | indent 4 }}
-spec:
- buffering:
- maxRequestBodyBytes: {{ int64 (default 1073741824 $middleware.maxRequestBodyBytes) }}
- memRequestBodyBytes: {{ int64 (default 1073741824 $middleware.memRequestBodyBytes) }}
-{{- end }}
-{{- end }}
diff --git a/server-product/helm/templates/service.yaml b/server-product/helm/templates/service.yaml
index ff74a553aa..0a0f15aa5f 100644
--- a/server-product/helm/templates/service.yaml
+++ b/server-product/helm/templates/service.yaml
@@ -1,3 +1,5 @@
+{{- $ssh := .Values.ssh | default dict -}}
+{{- $separateService := $ssh.separateService | default dict -}}
apiVersion: v1
kind: Service
metadata:
@@ -26,9 +28,9 @@ spec:
port: {{ default "80" .Values.service.ports.http }}
targetPort: http
protocol: TCP
-{{- if not .Values.service.separateSSH.enabled }}
+{{- if and $ssh.enabled (not $separateService.enabled) }}
- name: ssh
- port: {{ default "22" .Values.service.ports.ssh }}
+ port: {{ default "22" $ssh.port }}
targetPort: ssh
protocol: TCP
{{- end }}
@@ -41,57 +43,56 @@ spec:
{{- end }}
sessionAffinity: ClientIP
---
-{{ $ssh := .Values.service.separateSSH }}
-{{- if $ssh.enabled -}}
+{{- if and $ssh.enabled $separateService.enabled -}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "ods.fullname" . }}-ssh
namespace: {{ .Release.Namespace }}
labels: {{ include "ods.labels" . | nindent 4 }}
- {{- if $ssh.annotations }}
- annotations: {{ toYaml $ssh.annotations | nindent 4 }}
+ {{- if $separateService.annotations }}
+ annotations: {{ toYaml $separateService.annotations | nindent 4 }}
{{- end }}
spec:
- type: {{ $ssh.type }}
-{{- if eq $ssh.type "LoadBalancer" }}
-{{- if $ssh.loadBalancerIP }}
- loadBalancerIP: {{ $ssh.loadBalancerIP }}
+ type: {{ $separateService.type }}
+{{- if eq $separateService.type "LoadBalancer" }}
+{{- if $separateService.loadBalancerIP }}
+ loadBalancerIP: {{ $separateService.loadBalancerIP }}
{{- end -}}
-{{- if $ssh.loadBalancerSourceRanges }}
+{{- if $separateService.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
-{{- range $ssh.loadBalancerSourceRanges }}
+{{- range $separateService.loadBalancerSourceRanges }}
- {{ . }}
{{- end }}
{{- end }}
{{- end }}
-{{- if and $ssh.clusterIP (eq $ssh.type "ClusterIP") }}
- clusterIP: {{ $ssh.clusterIP }}
+{{- if and $separateService.clusterIP (eq $separateService.type "ClusterIP") }}
+ clusterIP: {{ $separateService.clusterIP }}
{{- end }}
-{{- if $ssh.externalIPs }}
+{{- if $separateService.externalIPs }}
externalIPs:
- {{- toYaml $ssh.externalIPs | nindent 4 }}
+ {{- toYaml $separateService.externalIPs | nindent 4 }}
{{- end }}
-{{- if $ssh.ipFamilyPolicy }}
- ipFamilyPolicy: {{ $ssh.ipFamilyPolicy }}
+{{- if $separateService.ipFamilyPolicy }}
+ ipFamilyPolicy: {{ $separateService.ipFamilyPolicy }}
{{- end }}
-{{- with $ssh.ipFamilies }}
+{{- with $separateService.ipFamilies }}
ipFamilies:
{{- toYaml . | nindent 4 }}
{{- end -}}
-{{- if $ssh.externalTrafficPolicy }}
- externalTrafficPolicy: {{ $ssh.externalTrafficPolicy }}
+{{- if $separateService.externalTrafficPolicy }}
+ externalTrafficPolicy: {{ $separateService.externalTrafficPolicy }}
{{- end }}
ports:
- name: ssh
port: {{ default "22" $ssh.port }}
targetPort: ssh
protocol: TCP
-{{- if $ssh.nodePort }}
- nodePort: {{ $ssh.nodePort }}
+{{- if $separateService.nodePort }}
+ nodePort: {{ $separateService.nodePort }}
{{- end }}
selector: {{ include "ods.template-labels" . | nindent 4 }}
-{{- if $ssh.topologyKeys }}
- topologyKeys: {{ toYaml $ssh.topologyKeys | nindent 4 }}
+{{- if $separateService.topologyKeys }}
+ topologyKeys: {{ toYaml $separateService.topologyKeys | nindent 4 }}
{{- end }}
{{- end -}}
\ No newline at end of file
diff --git a/server-product/helm/values.yaml b/server-product/helm/values.yaml
index 035f12b644..2061d219ac 100644
--- a/server-product/helm/values.yaml
+++ b/server-product/helm/values.yaml
@@ -162,6 +162,31 @@ affinity: {}
# [topology spread constraints](https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/).
topologySpreadConstraints: []
+# Configure Git access via SSH
+ssh:
+ # ssh.enabled -- If **true**, expose OneDev's SSH port through the Kubernetes Service and the
+ # configured ingress controller
+ enabled: false
+ # ssh.port -- Manually change the SSH Service port
+ port: ""
+ # Configure a separate Service for SSH
+ separateService:
+ # ssh.separateService.enabled -- If **true**, create a separate Service for SSH instead of
+ # adding the SSH port to the main Service
+ enabled: false
+ type: "ClusterIP"
+ clusterIP: ""
+ loadBalancerIP: ""
+ nodePort: ""
+ externalTrafficPolicy: ""
+ externalIPs: []
+ # - 4.2.2.1
+ ipFamilyPolicy: ""
+ ipFamilies: []
+ loadBalancerSourceRanges: []
+ annotations: {}
+ topologyKeys: []
+
service:
# service.type -- Specify the type for the Service. ClusterIP, LoadBalancer
type: "ClusterIP"
@@ -174,10 +199,9 @@ service:
# - "topology.kubernetes.io/zone"
# - "topology.kubernetes.io/region"
# - "*"
- # service.ports -- Manually change the ServicePorts
+ # service.ports -- Manually change the HTTP Service port
ports:
http: ""
- ssh: ""
# service.nodePort -- Specify a nodePort for servcie
nodePort: ""
# service.externalTrafficPolicy -- Specify the
@@ -192,39 +216,29 @@ service:
# service.ipFamilies -- Configure
# [IPv4/IPv6 dual-stack](https://kubernetes.io/docs/concepts/services-networking/dual-stack/).
ipFamilies: []
- # Configure sepearte SSH service
- separateSSH:
- # service.separateSSH.enabled -- If separate SSH is enabled, a separate service is created for SSH
- enabled: false
- type: "ClusterIP"
- port: ""
- clusterIP: ""
- loadBalancerIP: ""
- nodePort: ""
- externalTrafficPolicy: ""
- externalIPs: []
- # - 4.2.2.1
- ipFamilyPolicy: ""
- ipFamilies: []
- loadBalancerSourceRanges: []
- annotations: {}
- topologyKeys: []
-
-# Configure Ingress resource
+# Configure ingress
ingress:
- # ingress.enabled -- If **true**, create an Ingress resource.
+ # ingress.enabled -- If **true**, expose OneDev through the configured ingress controller
enabled: false
- # ingress.className -- Specify ingress class name. Requires Kubernetes >= 1.18.
+ # ingress.controller -- Specify ingress controller implementation. Supported values are nginx
+ # and traefik
+ controller: nginx
+ # ingress.className -- Specify ingress class name. Requires Kubernetes >= 1.18. This is used
+ # by the nginx Ingress and by cert-manager's http01 challenge Ingress for either controller
# Refer to https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress for details
className: ""
- # ingress.host -- Set the host name. This also determines the server url advertised by OneDev,
- # so it needs to be set even when additional host names are routed via ingress.traefik.hosts
+ # ingress.host -- Set the primary host name. This also determines the server url advertised by
+ # OneDev
host: onedev.example.com
- # ingress.annotations -- Specify additional annotations for the Ingress. These are merged on top
- # of ingress.nginx.annotations and take precedence over them
+ # ingress.additionalHosts -- Specify additional host names routed to OneDev. Certificates
+ # managed by the chart cover the primary host and these additional hosts
+ additionalHosts: []
+ # - code.int.example.com
+ # ingress.annotations -- Specify additional annotations for the nginx Ingress. These are merged
+ # on top of ingress.nginx.annotations and take precedence over them
annotations: {}
- # ingress.tls -- Configure TLS for the Ingress.
+ # ingress.tls -- Configure TLS for ingress
tls:
enabled: false
secretName: "onedev-tls"
@@ -255,23 +269,10 @@ ingress:
# Traefik configuration
traefik:
- # ingress.traefik.enabled -- If **true**, create Traefik IngressRoute resources instead of a
- # Kubernetes Ingress. Requires Traefik v3 with its Kubernetes CRD provider enabled. When
- # ingress.tls.acme.enabled is **true**, the http01 challenge is still solved through a
- # temporary Kubernetes Ingress, so ingress.className has to point at your Traefik ingress class
- # and Traefik's Kubernetes Ingress provider has to be enabled as well, otherwise the
- # certificate will never be issued
- enabled: false
- # ingress.traefik.entryPoint -- Traefik entry point serving http traffic
- entryPoint: websecure
- # ingress.traefik.sshEntryPoint -- Traefik entry point serving ssh traffic. The entry point
- # has to be declared in your Traefik installation. Set to an empty value to not route ssh
- # via Traefik
- sshEntryPoint: gitssh
- # ingress.traefik.hosts -- Host names to route to OneDev. Defaults to ingress.host if empty
- hosts: []
- # - code.example.com
- # - code.int.example.com
+ # Requires Traefik v3 with its Kubernetes CRD provider enabled. When ingress.tls.acme.enabled
+ # is **true**, the http01 challenge is still solved through a temporary Kubernetes Ingress, so
+ # ingress.className has to point at your Traefik ingress class and Traefik's Kubernetes Ingress
+ # provider has to be enabled as well, otherwise the certificate will never be issued
# ingress.traefik.middleware -- Specify the buffering middleware created for the route.
# Body size limits need to be large enough to accommodate your biggest git push
middleware:
diff --git a/server-product/system/incompatibilities/incompatibilities.md b/server-product/system/incompatibilities/incompatibilities.md
index 3c9ae767b7..0d987ca30e 100644
--- a/server-product/system/incompatibilities/incompatibilities.md
+++ b/server-product/system/incompatibilities/incompatibilities.md
@@ -1,3 +1,9 @@
+# 16.4.0
+
+### Helm Chart
+
+Git access via SSH is now disabled by default. Existing installations exposing SSH through a LoadBalancer, nginx ingress controller, or another TCP proxy should set `ssh.enabled=true` when upgrading; otherwise the SSH port is removed from OneDev's Kubernetes Service.
+
# 16.2.1
### RESTful API