From 589e0310e1bd96a40df8964a3b146a00d61160b6 Mon Sep 17 00:00:00 2001
From: Maarten de Waard <maarten@greenhost.nl>
Date: Tue, 7 Dec 2021 16:34:53 +0100
Subject: [PATCH] use Nextcloud helmrepository

---
 flux2/apps/nextcloud/release.yaml      |  6 +++---
 flux2/core/base/sources/nextcloud.yaml | 10 ++--------
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/flux2/apps/nextcloud/release.yaml b/flux2/apps/nextcloud/release.yaml
index 85601730d..dcb239d50 100644
--- a/flux2/apps/nextcloud/release.yaml
+++ b/flux2/apps/nextcloud/release.yaml
@@ -8,10 +8,10 @@ spec:
   releaseName: nc
   chart:
     spec:
-      chart: .
-      # NOTE: Change the GitRepository yaml file if you want a different version
+      chart: nextcloud-onlyoffice
+      version: 0.5.3
       sourceRef:
-        kind: GitRepository
+        kind: HelmRepository
         name: nextcloud
         namespace: flux-system
   interval: 1h
diff --git a/flux2/core/base/sources/nextcloud.yaml b/flux2/core/base/sources/nextcloud.yaml
index 95c54e09f..fc4f46a05 100644
--- a/flux2/core/base/sources/nextcloud.yaml
+++ b/flux2/core/base/sources/nextcloud.yaml
@@ -1,6 +1,6 @@
 ---
 apiVersion: source.toolkit.fluxcd.io/v1beta1
-kind: GitRepository
+kind: HelmRepository
 metadata:
   name: nextcloud
   namespace: flux-system
@@ -8,10 +8,4 @@ spec:
   # The interval at which to check the upstream for updates
   interval: 1h
   # The repository URL, can be a HTTP/S or SSH address
-  url: https://open.greenhost.net/stackspin/nextcloud
-  # The Git reference to checkout and monitor for changes
-  # (defaults to master)
-  # For all available options, see:
-  # https://toolkit.fluxcd.io/components/source/api/#source.toolkit.fluxcd.io/v1beta1.GitRepositoryRef
-  ref:
-    tag: 0.5.1
+  url: https://open.greenhost.net/api/v4/projects/1/packages/helm/stable
-- 
GitLab