Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm Chart Breaking Changes from 0.1.0 to 0.3.0 #304

Closed
mmattel opened this issue Jun 7, 2023 · 8 comments · Fixed by #319
Closed

Helm Chart Breaking Changes from 0.1.0 to 0.3.0 #304

mmattel opened this issue Jun 7, 2023 · 8 comments · Fixed by #319
Assignees

Comments

@mmattel
Copy link
Contributor

mmattel commented Jun 7, 2023

Are there any breaking changes in the Helm Chart between version 0.1.0 and 0.3.0, see: Breaking Changes. Note that 0.2.0 was an intermediate release necessary for 3.0.alpha

If not, we just need to mention that,
if yes, we need to provide the changes.

Note that there will most likely be a 0.4.0 release soon so we can do the work only once...

@wkloucek
Copy link
Contributor

wkloucek commented Jun 7, 2023

I updated the release notes for the 0.3.0 release: https://github.com/owncloud/ocis-charts/releases/tag/v0.3.0

It now includes: "Upgrading from version 0.1.0 is not supported and will result in data loss, depending on your PersistentVolume deletion policies."

This is not because of a breaking change between 0.2.0 and 0.3.0, but because of a breaking change between 0.1.0 and 0.2.0, that wasn't mentioned in the 0.2.0 release notes (https://github.com/owncloud/ocis-charts/releases/tag/v0.2.0).

When I upgrade from 0.1.0 to 0.2.0 I see this among other things:

ocis, storage-system-data, PersistentVolumeClaim (v1) has been removed:
- # Source: ocis/templates/storage-system/pvc.yaml
- apiVersion: v1
- kind: PersistentVolumeClaim
- metadata:
-   name: storage-system-data
-   namespace: ocis
-   labels:
-     helm.sh/chart: ocis-0.1.0
-     app.kubernetes.io/name: ocis
-     app.kubernetes.io/instance: ocis
-     app.kubernetes.io/version: "2.0.0"
-     app.kubernetes.io/managed-by: Helm
-   finalizers:
-     - kubernetes.io/pvc-protection
- spec:
-   accessModes:
-     - "ReadWriteMany"
-   resources:
-     requests:
-       storage: "5Gi"

ocis, storage-users-data, PersistentVolumeClaim (v1) has been removed:
- # Source: ocis/templates/storage-users/pvc.yaml
- apiVersion: v1
- kind: PersistentVolumeClaim
- metadata:
-   name: storage-users-data
-   namespace: ocis
-   labels:
-     helm.sh/chart: ocis-0.1.0
-     app.kubernetes.io/name: ocis
-     app.kubernetes.io/instance: ocis
-     app.kubernetes.io/version: "2.0.0"
-     app.kubernetes.io/managed-by: Helm
-   finalizers:
-     - kubernetes.io/pvc-protection
- spec:
-   accessModes:
-     - "ReadWriteMany"
-   resources:
-     requests:
-       storage: "50Gi"

ocis, storagesystem-data, PersistentVolumeClaim (v1) has been added:
- 
+ # Source: ocis/templates/storagesystem/pvc.yaml
+ apiVersion: v1
+ kind: PersistentVolumeClaim
+ metadata:
+   name: storagesystem-data
+   namespace: ocis
+   labels:
+     helm.sh/chart: ocis-0.2.0
+     app.kubernetes.io/name: ocis
+     app.kubernetes.io/instance: ocis
+     app.kubernetes.io/version: "3.0.0-alpha.1"
+     app.kubernetes.io/managed-by: Helm
+   finalizers:
+     - kubernetes.io/pvc-protection
+ spec:
+   accessModes:
+     - "ReadWriteMany"
+   resources:
+     requests:
+       storage: "5Gi"

ocis, storageusers-data, PersistentVolumeClaim (v1) has been added:
- 
+ # Source: ocis/templates/storageusers/pvc.yaml
+ apiVersion: v1
+ kind: PersistentVolumeClaim
+ metadata:
+   name: storageusers-data
+   namespace: ocis
+   labels:
+     helm.sh/chart: ocis-0.2.0
+     app.kubernetes.io/name: ocis
+     app.kubernetes.io/instance: ocis
+     app.kubernetes.io/version: "3.0.0-alpha.1"
+     app.kubernetes.io/managed-by: Helm
+   finalizers:
+     - kubernetes.io/pvc-protection
+ spec:
+   accessModes:
+     - "ReadWriteMany"
+   resources:
+     requests:
+       storage: "50Gi"

If the PeristentVolume policy is set to reclaim (via the StorageClass), this upgrade could lead to data loss. The same applies to an upgrade 0.1.0 -> 0.3.0

@wkloucek
Copy link
Contributor

wkloucek commented Jun 7, 2023

One can not just remove the Helm related tags from the PVCs and reference it via the existingClaims options, because Helmm will still remove the PVCs.

@wkloucek
Copy link
Contributor

wkloucek commented Jun 7, 2023

after #305 this patch would be possible to be compatible to 0.1.0:

diff --git a/charts/ocis/templates/_common/_tplvalues.tpl b/charts/ocis/templates/_common/_tplvalues.tpl
index d225154..f84fbf3 100644
--- a/charts/ocis/templates/_common/_tplvalues.tpl
+++ b/charts/ocis/templates/_common/_tplvalues.tpl
@@ -264,7 +264,14 @@ automountServiceAccountToken: true
 oCIS persistence dataVolumeName
 */}}
 {{- define "ocis.persistence.dataVolumeName" -}}
-{{ printf "%s-data" .appName }}
+{{ $appName := .appName -}}
+{{- if eq $appName "storageusers" -}}
+{{ $appName = "storage-users" -}}
+{{- end -}}
+{{- if eq $appName "storagesystem" -}}
+{{ $appName = "storage-system" -}}
+{{- end -}}
+{{ printf "%s-data" $appName }}
 {{- end -}}
 

@wkloucek
Copy link
Contributor

wkloucek commented Jun 7, 2023

#306 (in combination with #305) introduces a way to allow an upgrade from 0.1.0 to 0.3.0:

one has to set this values for the 0.3.0 installation:

  • services.storagesystem.persistence.claimName = storage-system-data
  • services.storageusers.persistence.claimName = storage-users-data

@wkloucek
Copy link
Contributor

wkloucek commented Jun 7, 2023

Other changes:

  • services.storageusers.storageBackend.driverConfig.s3ng.secretKey and services.storageusers.storageBackend.driverConfig.s3ng.accessKey have been deprecated. Please set them via the secretRefs.s3CredentialsSecretRef secret instead.
  • If you had set services.web.config.disableFeedbackLink = true, then you need to replace it by services.web.config.feedbackLink.enabled = false
  • In order to persist the instance logo, that can changed via Web UI, services.web.persistence.enabled must be set to true. In prior releases Web didn't have any persistence.

@mmattel
Copy link
Contributor Author

mmattel commented Jun 7, 2023

  • Are you going to make a 0.3.1 post merging 305/306 ? (or dump 0.3.0 and recreate it)
  • I would care about 030->031 in docs
  • I will add the above to the breaking changes list

@mmattel
Copy link
Contributor Author

mmattel commented Jun 7, 2023

In order to persist the instance logo, that can changed via Web UI, services.web.persistence.enabled must be set to false.

According the values yaml description of 0.3.0
Enables persistence. Is recommended to be enabled on production installations.

It defaults to false according to the values yaml description and sounds conflicting with the statements given. I also do not get it why this is a breaking change.

@mmattel
Copy link
Contributor Author

mmattel commented Jun 7, 2023

Noticeable change to be mentioned: Add secret generation to main helm chart.

@mmattel mmattel changed the title Helm Chart Breaking Changes from 0.2.0 to 0.3.0 Helm Chart Breaking Changes from 0.1.0 to 0.3.0 Jun 14, 2023
@wkloucek wkloucek mentioned this issue Jun 16, 2023
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants