Skip to content

The Unified and Autonomous Development Platform

chore: change oneDevServer section to onedev

Khaliqf53e2b594d31
diff --git a/server-product/helm/templates/NOTES.txt b/server-product/helm/templates/NOTES.txt
index c0724efdb9..0cc0b167b7 100644
--- a/server-product/helm/templates/NOTES.txt
+++ b/server-product/helm/templates/NOTES.txt
@@ -37,5 +37,5 @@ APP VERSION: {{ .Chart.AppVersion }}
2. Login with the following credentials:
- Username: {{ .Values.oneDevServer.initSettings.user }}
+ Username: {{ .Values.onedev.initSettings.user }}
echo Password: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "ods.fullname" . }}-secrets -o jsonpath="{.data.password}" | base64 -d)
diff --git a/server-product/helm/templates/_pod.tpl b/server-product/helm/templates/_pod.tpl
index 99038765e6..9a34cea1ac 100644
--- a/server-product/helm/templates/_pod.tpl
+++ b/server-product/helm/templates/_pod.tpl
@@ -31,7 +31,7 @@ containers:
{{- end }}
image: "{{ .Values.image.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
-{{- if .Values.oneDevServer.maintenance }}
+{{- if .Values.onedev.maintenance }}
command: ["/root/bin/idle.sh"]
{{- end }}
env:
@@ -43,13 +43,13 @@ containers:
name: {{ include "ods.fullname" . }}-secrets
key: password
- name: initial_user
- value: {{ .Values.oneDevServer.initSettings.user }}
+ value: {{ .Values.onedev.initSettings.user }}
- name: initial_email
- value: {{ .Values.oneDevServer.initSettings.email }}
+ value: {{ .Values.onedev.initSettings.email }}
- name: initial_server_url
- value: {{ .Values.oneDevServer.initSettings.serverUrl }}
+ value: {{ .Values.onedev.initSettings.serverUrl }}
- name: ingress_tls
- value: {{ .Values.oneDevServer.enableSSL | quote }}
+ value: {{ .Values.onedev.enableSSL | quote }}
{{- if .Values.ingress.enabled }}
- name: ingress_host
value: {{ include "ingressHost" . }}
@@ -97,7 +97,7 @@ containers:
volumeMounts:
- name: data
mountPath: "/opt/onedev"
-{{- if .Values.oneDevServer.trustCerts.enabled }}
+{{- if .Values.onedev.trustCerts.enabled }}
- name: trust-certs
mountPath: "/opt/onedev/conf/trust-certs"
{{- end }}
@@ -121,10 +121,10 @@ tolerations: {{ toYaml .Values.tolerations | nindent 2 }}
topologySpreadConstraints: {{ toYaml .Values.topologySpreadConstraints | nindent 2 }}
{{- end }}
volumes:
-{{- if .Values.oneDevServer.trustCerts.enabled }}
+{{- if .Values.onedev.trustCerts.enabled }}
- name: trust-certs
secret:
- secretName: {{ if .Values.oneDevServer.trustCerts.existingSecret }}{{ .Values.oneDevServer.trustCerts.existingSecret }}{{- else }}{{ include "ods.fullname" . }}-certs{{- end }}
+ secretName: {{ if .Values.onedev.trustCerts.existingSecret }}{{ .Values.onedev.trustCerts.existingSecret }}{{- else }}{{ include "ods.fullname" . }}-certs{{- end }}
{{- end }}
{{- if .Values.persistence.enabled }}
{{- if .Values.persistence.existingClaim }}
diff --git a/server-product/helm/templates/cert-secret.yaml b/server-product/helm/templates/cert-secret.yaml
index c1b5065214..97f07e1d93 100644
--- a/server-product/helm/templates/cert-secret.yaml
+++ b/server-product/helm/templates/cert-secret.yaml
@@ -1,4 +1,4 @@
-{{- if and .Values.oneDevServer.trustCerts.enabled (not .Values.oneDevServer.trustCerts.existingConfigmapName) }}
+{{- if and .Values.onedev.trustCerts.enabled (not .Values.onedev.trustCerts.existingConfigmapName) }}
apiVersion: v1
kind: Secret
type: Opaque
@@ -7,7 +7,7 @@ metadata:
namespace: {{ .Release.Namespace }}
labels: {{ include "ods.labels" . | nindent 4 }}
annotations:
- checksum/secret: {{ tpl (toYaml .Values.oneDevServer.trustCerts.path) . | sha256sum }}
+ checksum/secret: {{ tpl (toYaml .Values.onedev.trustCerts.path) . | sha256sum }}
data:
- cert.pem: {{ .Values.oneDevServer.trustCerts.path | b64enc }}
+ cert.pem: {{ .Values.onedev.trustCerts.path | b64enc }}
{{- end }}
diff --git a/server-product/helm/templates/dep-sts.yaml b/server-product/helm/templates/dep-sts.yaml
index ff148dc6a2..5c7ec03efa 100644
--- a/server-product/helm/templates/dep-sts.yaml
+++ b/server-product/helm/templates/dep-sts.yaml
@@ -1,5 +1,5 @@
-apiVersion: {{ if .Values.oneDevServer.useStatefulSet }}{{ include "ods.statefulset.apiVersion" . }}{{- else }}{{ include "ods.deployment.apiVersion" . }}{{- end }}
-kind: {{ if .Values.oneDevServer.useStatefulSet }}StatefulSet{{- else }}Deployment{{- end }}
+apiVersion: {{ if .Values.onedev.useStatefulSet }}{{ include "ods.statefulset.apiVersion" . }}{{- else }}{{ include "ods.deployment.apiVersion" . }}{{- end }}
+kind: {{ if .Values.onedev.useStatefulSet }}StatefulSet{{- else }}Deployment{{- end }}
metadata:
name: {{ include "ods.fullname" . }}
namespace: {{ .Release.Namespace }}
@@ -9,16 +9,16 @@ spec:
selector:
matchLabels:
{{- include "ods.template-labels" . | nindent 6 }}
- {{- if .Values.oneDevServer.useStatefulSet }}
+ {{- if .Values.onedev.useStatefulSet }}
serviceName: {{ template "ods.fullname" . }}
{{- end }}
- {{- if .Values.oneDevServer.updateStrategy}}
- {{- if .Values.oneDevServer.useStatefulSet }}
+ {{- if .Values.onedev.updateStrategy}}
+ {{- if .Values.onedev.useStatefulSet }}
updateStrategy:
{{- else }}
strategy:
{{- end }}
- {{- toYaml .Values.oneDevServer.updateStrategy | nindent 4 }}
+ {{- toYaml .Values.onedev.updateStrategy | nindent 4 }}
{{- end}}
template:
metadata:
@@ -26,15 +26,15 @@ spec:
{{- if .Values.podLabels }}
{{ toYaml .Values.podLabels | indent 8 }}
{{- end }}
-{{- if .Values.oneDevServer.trustCerts.enabled }}
+{{- if .Values.onedev.trustCerts.enabled }}
annotations:
- checksum/secret: {{ tpl (toYaml .Values.oneDevServer.trustCerts.path) . | sha256sum }}
+ checksum/secret: {{ tpl (toYaml .Values.onedev.trustCerts.path) . | sha256sum }}
{{- end }}
{{- if .Values.podAnnotations }}
{{ tpl (toYaml .Values.podAnnotations) . | indent 8 }}
{{- end }}
spec: {{ include "ods.pod" . | nindent 6 }}
-{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) (not .Values.oneDevServer.useStatefulSet) }}
+{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) (not .Values.onedev.useStatefulSet) }}
- name: data
persistentVolumeClaim:
claimName: {{ include "ods.fullname" . }}
diff --git a/server-product/helm/templates/pvc.yaml b/server-product/helm/templates/pvc.yaml
index 532a532aca..8fbf2a95bf 100644
--- a/server-product/helm/templates/pvc.yaml
+++ b/server-product/helm/templates/pvc.yaml
@@ -1,4 +1,4 @@
-{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) (not .Values.oneDevServer.useStatefulSet) }}
+{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) (not .Values.onedev.useStatefulSet) }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
diff --git a/server-product/helm/templates/secrets.yaml b/server-product/helm/templates/secrets.yaml
index c9a4dc0e3e..c4ce325fd8 100644
--- a/server-product/helm/templates/secrets.yaml
+++ b/server-product/helm/templates/secrets.yaml
@@ -1,4 +1,4 @@
-{{- if .Values.oneDevServer.initSettings.enabled -}}
+{{- if .Values.onedev.initSettings.enabled -}}
{{- $randomValue := randAlphaNum 16 -}}
apiVersion: v1
@@ -9,8 +9,8 @@ metadata:
labels: {{ include "ods.labels" . | nindent 4 }}
type: Opaque
data:
- password: {{ default $randomValue .Values.oneDevServer.initSettings.password | b64enc }}
- user: {{ .Values.oneDevServer.initSettings.user | b64enc }}
+ password: {{ default $randomValue .Values.onedev.initSettings.password | b64enc }}
+ user: {{ .Values.onedev.initSettings.user | b64enc }}
dbPassword: {{ .Values.database.dbPassword | b64enc }}
{{- end }}
\ No newline at end of file
diff --git a/server-product/helm/values.yaml b/server-product/helm/values.yaml
index 991ce8dd99..15602bf839 100644
--- a/server-product/helm/values.yaml
+++ b/server-product/helm/values.yaml
@@ -8,39 +8,39 @@ global:
commonLabels: {}
# dept_name: platform
-oneDevServer:
- # oneDevServer.useStatefulSet -- Set to true to use a StatefulSet instead of a Deployment
+onedev:
+ # onedev.useStatefulSet -- Set to true to use a StatefulSet instead of a Deployment
useStatefulSet: false
- # oneDevServer.updateStrategy -- valid options for statefulset `RollingUpdate`, `OnDelete` / Deployment: `RollingUpdate`, `Recreate`
+ # onedev.updateStrategy -- valid options for statefulset `RollingUpdate`, `OnDelete` / Deployment: `RollingUpdate`, `Recreate`
updateStrategy:
type: RollingUpdate
- # oneDevServer.enableSSL -- This configuration determines whether SSL should be enabled on the server.
+ # onedev.enableSSL -- This configuration determines whether SSL should be enabled on the server.
enableSSL: false
# trustCerts -- Specify a local directory containing certificates to be trusted in PEM format.
trustCerts:
- # oneDevServer.trustCerts.enabled -- Set to **true** to provide trust certs
+ # onedev.trustCerts.enabled -- Set to **true** to provide trust certs
enabled: false
- # oneDevServer.trustCerts.path -- Path of cert file on disk
+ # onedev.trustCerts.path -- Path of cert file on disk
path: ""
- # oneDevServer.trustCerts.existingSecret -- Existing secret name containing the cert file
+ # onedev.trustCerts.existingSecret -- Existing secret name containing the cert file
## - can be created with `kubectl create secret generic trustCerts --from-file=_local/cert.pem`
existingSecret: ""
- # oneDevServer.maintenance -- Set this as **true** to stop OneDev server and perform various maintenance tasks such as backup, restore.
+ # onedev.maintenance -- Set this as **true** to stop OneDev server and perform various maintenance tasks such as backup, restore.
# [Check Docs](https://code.onedev.io/onedev/manual/~files/main/pages/backup-restore.md) for more details
maintenance: false
# Specify OneDev Server initial settings to avoid manual setup
initSettings:
- # oneDevServer.initSettings.enabled -- Enables initial settings for deployment
+ # onedev.initSettings.enabled -- Enables initial settings for deployment
enabled: true
- # oneDevServer.initSettings.user -- Admin username
+ # onedev.initSettings.user -- Admin username
user: "admin"
- # oneDevServer.initSettings.password -- admin Password, if not specified a random password will be generated automatically
+ # onedev.initSettings.password -- admin Password, if not specified a random password will be generated automatically
password: "password"
- # oneDevServer.initSettings.email -- admin Email address
+ # onedev.initSettings.email -- admin Email address
- # oneDevServer.initSettings.serverUrl -- Server url will be ignored if ingress.host is specified
+ # onedev.initSettings.serverUrl -- Server url will be ignored if ingress.host is specified
serverUrl: ""
sshRootUrl: ""