Bläddra i källkod

nextcloud: pre-migration actions (#2412)

* pre-mig-nextcloud

* nextcloud: bump version

* fix host

* keep version

* fmt

* dont change host

* fix
Stavros Kois 1 år sedan
förälder
incheckning
01d82f5d05

+ 1 - 1
library/ix-dev/charts/nextcloud/Chart.yaml

@@ -4,7 +4,7 @@ description: A file sharing server that puts the control and security of your ow
 annotations:
   title: Nextcloud
 type: application
-version: 1.6.60
+version: 1.6.61
 apiVersion: v2
 appVersion: 29.0.0
 kubeVersion: '>=1.16.0-0'

+ 22 - 3
library/ix-dev/charts/nextcloud/templates/deployment.yaml

@@ -1,9 +1,28 @@
 {{ include "common.storage.hostPathValidate" .Values }}
 {{ $postgres_values := (. | mustDeepCopy) }}
 {{ $_ := set $postgres_values "common" (dict "nameSuffix" "postgres") }}
-{{ include "common.deployment.common_config" . | nindent 0 }}
-spec: {{ include "common.deployment.common_spec" . | nindent 2 }}
-  template: {{ include "common.deployment.pod.metadata" . | nindent 4 }}
+
+apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }}
+kind: Deployment
+metadata:
+  name: {{ template "common.names.fullname" . }}-nc
+  labels:
+    app.kubernetes.io/name: {{ template "common.names.name" . }}
+    app.kubernetes.io/instance: {{ .Release.Name }}
+spec:
+  replicas: {{ (default 1 .Values.replicas) }}
+  strategy:
+    type: "Recreate"
+  selector:
+    matchLabels:
+      app.kubernetes.io/name: {{ template "common.names.name" . }}
+      app.kubernetes.io/instance: {{ .Release.Name }}
+  template:
+    metadata:
+      name: {{ template "common.names.fullname" . }}
+      labels:
+        {{- include "common.labels.selectorLabels" . | nindent 8 }}
+      annotations: {{ include "common.annotations" . | nindent 8 }}
     spec:
       initContainers:
         - name: init-postgresdb

+ 22 - 3
library/ix-dev/charts/nextcloud/templates/postgres-deployment.yaml

@@ -1,8 +1,27 @@
 {{ $values := (. | mustDeepCopy) }}
 {{ $_ := set $values "common" (dict "nameSuffix" "postgres") }}
-{{ include "common.deployment.common_config" $values | nindent 0 }}
-spec: {{ include "common.deployment.common_spec" $values | nindent 2 }}
-  template: {{ include "common.deployment.pod.metadata" $values | nindent 4 }}
+
+apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }}
+kind: Deployment
+metadata:
+  name: {{ template "common.names.fullname" . }}-postgres-nc
+  labels:
+    app.kubernetes.io/name: {{ template "common.names.name" . }}-postgres
+    app.kubernetes.io/instance: {{ .Release.Name }}-postgres
+spec:
+  strategy:
+    type: "Recreate"
+  selector:
+    matchLabels:
+      app.kubernetes.io/name: {{ template "common.names.name" . }}-postgres
+      app.kubernetes.io/instance: {{ .Release.Name }}-postgres
+  template:
+    metadata:
+      name: {{ template "common.names.fullname" . }}
+      labels:
+        app.kubernetes.io/name: {{ template "common.names.name" . }}-postgres
+        app.kubernetes.io/instance: {{ .Release.Name }}-postgres
+      annotations: {{ include "common.annotations" . | nindent 8 }}
     spec:
       containers:
       - name: {{ .Chart.Name }}-postgres

+ 4 - 0
library/ix-dev/charts/nextcloud/to_keep_versions.md

@@ -11,3 +11,7 @@ Latest 27.x.x version
 ## 1.6.59
 
 Latest 28.x.x version
+
+## 1.6.61
+
+Latest release before migration to 2.x.x

+ 1 - 0
library/ix-dev/charts/nextcloud/to_keep_versions.yaml

@@ -1,3 +1,4 @@
 - 1.6.29
 - 1.6.53
 - 1.6.59
+- 1.6.61