From f73d57c0c75c5a68cb64cc9eaeaf96abfdadba6a Mon Sep 17 00:00:00 2001 From: ansgarz Date: Wed, 8 Jun 2022 19:56:44 +0200 Subject: [PATCH] fix postgres size et al. --- src/main/cljc/dda/c4k_gitea/core.cljc | 6 +++--- src/main/cljc/dda/c4k_gitea/gitea.cljc | 8 +------- src/main/resources/gitea/appini-configmap.yaml | 10 +++++----- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/main/cljc/dda/c4k_gitea/core.cljc b/src/main/cljc/dda/c4k_gitea/core.cljc index c5dbabf..2c9890b 100644 --- a/src/main/cljc/dda/c4k_gitea/core.cljc +++ b/src/main/cljc/dda/c4k_gitea/core.cljc @@ -17,17 +17,17 @@ (let [storage-class (if (contains? config :postgres-data-volume-path) :manual :local-path)] (cm/concat-vec [(yaml/load-resource "gitea/volumes.yaml") - (yaml/load-resource "gitea/services.yaml")] + (yaml/load-resource "gitea/services.yaml") + (yaml/load-resource "gitea/appini-configmap.yaml")] (map yaml/to-string [(postgres/generate-config {:postgres-size :2gb :db-name "gitea"}) (postgres/generate-secret config) (when (contains? config :postgres-data-volume-path) (postgres/generate-persistent-volume (select-keys config [:postgres-data-volume-path :pv-storage-size-gb]))) - (postgres/generate-pvc {:pv-storage-size-gb 20 + (postgres/generate-pvc {:pv-storage-size-gb 10 :pvc-storage-class-name storage-class}) (postgres/generate-deployment {:postgres-image "postgres:14" :postgres-size :2gb}) (postgres/generate-service) - (gitea/generate-appini-configmap) (gitea/generate-deployment config) (gitea/generate-ingress config)])))) diff --git a/src/main/cljc/dda/c4k_gitea/gitea.cljc b/src/main/cljc/dda/c4k_gitea/gitea.cljc index 60dc75d..52759cc 100644 --- a/src/main/cljc/dda/c4k_gitea/gitea.cljc +++ b/src/main/cljc/dda/c4k_gitea/gitea.cljc @@ -13,7 +13,7 @@ #?(:cljs (defmethod yaml/load-resource :gitea [resource-name] (case resource-name - "gitea/secret.yaml" (rc/inline "gitea/secret.yaml") + ; todo "gitea/secret.yaml" (rc/inline "gitea/secret.yaml") "gitea/certificate.yaml" (rc/inline "gitea/certificate.yaml") "gitea/deployments.yaml" (rc/inline "gitea/deployments.yaml") "gitea/ingress.yaml" (rc/inline "gitea/ingress.yaml") @@ -26,9 +26,6 @@ (defmethod yaml/load-as-edn :gitea [resource-name] (yaml/from-string (yaml/load-resource resource-name)))) -(defn generate-appini-configmap [] - (yaml/load-as-edn "gitea/appini-configmap.yaml")) - (defn generate-deployment [config] (let [{:keys [postgres-db-user postgres-db-password]} config] (-> @@ -44,6 +41,3 @@ (yaml/load-as-edn "gitea/ingress.yaml") (assoc-in [:metadata :annotations :cert-manager.io/cluster-issuer] letsencrypt-issuer) (cm/replace-all-matching-values-by-new-value "FQDN" fqdn)))) - -(defn generate-volumes [] - (yaml/load-as-edn "gitea/volumes.yaml")) diff --git a/src/main/resources/gitea/appini-configmap.yaml b/src/main/resources/gitea/appini-configmap.yaml index 69728b0..ad2029e 100644 --- a/src/main/resources/gitea/appini-configmap.yaml +++ b/src/main/resources/gitea/appini-configmap.yaml @@ -5,7 +5,7 @@ metadata: namespace: default data: app.ini: | - APP_NAME = Gitea AZ2 + APP_NAME = Gitea meissa RUN_MODE = prod RUN_USER = git @@ -29,7 +29,7 @@ data: SSH_LISTEN_PORT = 22 LFS_START_SERVER = true LFS_CONTENT_PATH = /data/git/lfs - LFS_JWT_SECRET = 6x-yxhPA88_9SagCcu1b7E5SSZmeQOX_K32IUDdjknU + ;LFS_JWT_SECRET = OFFLINE_MODE = false [database] @@ -70,8 +70,8 @@ data: [security] INSTALL_LOCK = true - SECRET_KEY = UrTkoOE4Rw2BnMhqRSO7VqyCEYpmnI5YVDAnj0D0VSxEm1jiRSrUkJePj6al5j5D - INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE2NTM0MTEyMjB9.kUwwf2sNwOr0fJwUvXr57Krhj2OudhTmDEQCCchbnUo + ;SECRET_KEY = + ;INTERNAL_TOKEN = [service] DISABLE_REGISTRATION = true @@ -86,7 +86,7 @@ data: NO_REPLY_ADDRESS = noreply.localhost [oauth2] - JWT_SECRET = ZZWsXFEj1QpRO9LGGE8Z8XF46G_0LxlbQFUkacXvQjo + ;JWT_SECRET = [mailer] ENABLED = false