From 3ca1dbbcbec7bb3e5f4814ea5921f1dd775ec4ce Mon Sep 17 00:00:00 2001
From: xeruf <27jf@pm.me>
Date: Fri, 1 Jul 2022 22:03:53 +0100
Subject: [PATCH] production: simplify health checks

According to https://fluxcd.io/docs/components/kustomize/kustomization/#recommended-settings
---
 .../production/gitea-kustomization.yaml       | 35 ++++++++++---------
 .../production/suitecrm-kustomization.yaml    | 27 +++++++-------
 .../production/vikunja-kustomization.yaml     | 29 +++++++--------
 3 files changed, 47 insertions(+), 44 deletions(-)

diff --git a/basic/clusters/production/gitea-kustomization.yaml b/basic/clusters/production/gitea-kustomization.yaml
index 64701a6..19ed631 100644
--- a/basic/clusters/production/gitea-kustomization.yaml
+++ b/basic/clusters/production/gitea-kustomization.yaml
@@ -6,6 +6,7 @@ metadata:
   namespace: flux-system
 spec:
   interval: 5m
+  wait: true
   timeout: 12h
   dependsOn:
     - name: single-sign-on
@@ -14,23 +15,23 @@ spec:
     name: stackspout
   path: ./basic/apps/dev
   prune: true
-  healthChecks:
-    - apiVersion: helm.toolkit.fluxcd.io/v2beta1
-      kind: HelmRelease
-      name: gitea
-      namespace: stackspout
-    - apiVersion: apps/v1
-      kind: Deployment
-      name: gitea-memcached
-      namespace: stackspout
-    - apiVersion: apps/v1
-      kind: StatefulSet
-      name: gitea-postgresql
-      namespace: stackspout
-    - apiVersion: apps/v1
-      kind: StatefulSet
-      name: gitea
-      namespace: stackspout
+  #healthChecks:
+  #  - apiVersion: helm.toolkit.fluxcd.io/v2beta1
+  #    kind: HelmRelease
+  #    name: gitea
+  #    namespace: stackspout
+  #  - apiVersion: apps/v1
+  #    kind: Deployment
+  #    name: gitea-memcached
+  #    namespace: stackspout
+  #  - apiVersion: apps/v1
+  #    kind: StatefulSet
+  #    name: gitea-postgresql
+  #    namespace: stackspout
+  #  - apiVersion: apps/v1
+  #    kind: StatefulSet
+  #    name: gitea
+  #    namespace: stackspout
   postBuild:
     substituteFrom:
       #- kind: Secret
diff --git a/basic/clusters/production/suitecrm-kustomization.yaml b/basic/clusters/production/suitecrm-kustomization.yaml
index 0fb71a0..b523583 100644
--- a/basic/clusters/production/suitecrm-kustomization.yaml
+++ b/basic/clusters/production/suitecrm-kustomization.yaml
@@ -6,6 +6,7 @@ metadata:
   namespace: flux-system
 spec:
   interval: 5m
+  wait: true
   timeout: 12h
   dependsOn:
     - name: single-sign-on
@@ -14,19 +15,19 @@ spec:
     name: stackspout
   path: ./basic/apps/people
   prune: true
-  healthChecks:
-    - apiVersion: helm.toolkit.fluxcd.io/v2beta1
-      kind: HelmRelease
-      name: suitecrm
-      namespace: stackspout
-    - apiVersion: apps/v1
-      kind: Deployment
-      name: suitecrm
-      namespace: stackspout
-    - apiVersion: apps/v1
-      kind: StatefulSet
-      name: suitecrm-mariadb
-      namespace: stackspout
+  #healthChecks:
+  #  - apiVersion: helm.toolkit.fluxcd.io/v2beta1
+  #    kind: HelmRelease
+  #    name: suitecrm
+  #    namespace: stackspout
+  #    #- apiVersion: apps/v1
+  #    #  kind: Deployment
+  #    #  name: suitecrm
+  #    #  namespace: stackspout
+  #  - apiVersion: apps/v1
+  #    kind: StatefulSet
+  #    name: suitecrm-mariadb
+  #    namespace: stackspout
   postBuild:
     substituteFrom:
       #- kind: Secret
diff --git a/basic/clusters/production/vikunja-kustomization.yaml b/basic/clusters/production/vikunja-kustomization.yaml
index 6357127..3493ad5 100644
--- a/basic/clusters/production/vikunja-kustomization.yaml
+++ b/basic/clusters/production/vikunja-kustomization.yaml
@@ -6,7 +6,8 @@ metadata:
   namespace: flux-system
 spec:
   interval: 5m
-  timeout: 12h
+  wait: true
+  timeout: 300m
   dependsOn:
     - name: single-sign-on
   sourceRef:
@@ -14,19 +15,19 @@ spec:
     name: stackspout
   path: ./basic/apps/do
   prune: true
-  healthChecks:
-    - apiVersion: helm.toolkit.fluxcd.io/v2beta1
-      kind: HelmRelease
-      name: vikunja
-      namespace: stackspout
-    - apiVersion: apps/v1
-      kind: Deployment
-      name: vikunja
-      namespace: stackspout
-    - apiVersion: apps/v1
-      kind: StatefulSet
-      name: gitea
-      namespace: stackspout
+  #healthChecks:
+  #  - apiVersion: helm.toolkit.fluxcd.io/v2beta1
+  #    kind: HelmRelease
+  #    name: vikunja
+  #    namespace: stackspout
+  #  - apiVersion: apps/v1
+  #    kind: Deployment
+  #    name: vikunja
+  #    namespace: stackspout
+  #  - apiVersion: apps/v1
+  #    kind: StatefulSet
+  #    name: gitea
+  #    namespace: stackspout
   postBuild:
     substituteFrom:
       #- kind: Secret
-- 
GitLab