From 90e108e9dc6276fb5b9fde4ce7f26b4738d1b9ba Mon Sep 17 00:00:00 2001
From: David Hoese <david.hoese@ssec.wisc.edu>
Date: Sat, 9 Jan 2021 15:30:38 -0600
Subject: [PATCH] Convert GCP postgis to non-persistent

---
 ci_gcp/gitlab-ci.yaml      | 28 ++++++++++++++--------------
 ci_gcp/values-postgis.yaml |  8 ++++++--
 2 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/ci_gcp/gitlab-ci.yaml b/ci_gcp/gitlab-ci.yaml
index 3f14f67..235fff0 100644
--- a/ci_gcp/gitlab-ci.yaml
+++ b/ci_gcp/gitlab-ci.yaml
@@ -32,20 +32,20 @@ gcp create geotiff storage:
         - ci_gcp/geotiff-pvc.yaml
     - if: $CREATE_STORAGE
 
-gcp create postgres storage:
-  extends: .helm_based_job
-  stage: create storage
-  script:
-    - ns=$(./helpers/get_namespace.sh)
-    - ./helpers/create_pvc.sh "$ns" "ci_gcp/postgres-pvc.yaml" "geosphere-postgis"
-  # this job doesn't actually need any artifacts from previous jobs
-  dependencies: []
-  rules:
-    - if: $CI_COMMIT_TAG !~ /^gcp-r[0-9]+_[0-9]+/
-      when: never
-    - changes:
-        - ci_gcp/postgres-pvc.yaml
-    - if: $CREATE_STORAGE
+#gcp create postgres storage:
+#  extends: .helm_based_job
+#  stage: create storage
+#  script:
+#    - ns=$(./helpers/get_namespace.sh)
+#    - ./helpers/create_pvc.sh "$ns" "ci_gcp/postgres-pvc.yaml" "geosphere-postgis"
+#  # this job doesn't actually need any artifacts from previous jobs
+#  dependencies: []
+#  rules:
+#    - if: $CI_COMMIT_TAG !~ /^gcp-r[0-9]+_[0-9]+/
+#      when: never
+#    - changes:
+#        - ci_gcp/postgres-pvc.yaml
+#    - if: $CREATE_STORAGE
 
 gcp create shapefile storage:
   extends: .helm_based_job
diff --git a/ci_gcp/values-postgis.yaml b/ci_gcp/values-postgis.yaml
index 4ceb25f..61ff6dd 100644
--- a/ci_gcp/values-postgis.yaml
+++ b/ci_gcp/values-postgis.yaml
@@ -2,7 +2,11 @@ postgresqlDatabase: "postgres"
 postgresqlExtendedConf:
   sharedBuffers: "512MB"
 persistence:
-  enabled: true
-  existingClaim: "geosphere-postgis"
+  enabled: false
+#  existingClaim: "geosphere-postgis"
 metrics:
   enabled: false
+primary:
+  nodeSelector:
+    geosphere-node: database
+
-- 
GitLab