[extensions-web] openshift: added environment variables for CronJobs



commit e1fffb735fa30417757334d4ec9ab44969e92965
Author: Yuri Konotopov <ykonotopov gnome org>
Date:   Sat Dec 15 10:58:31 2018 +0400

    openshift: added environment variables for CronJobs

 openshift/templates/extensions-web-nginx.json | 94 ++++++++++++++++++++++++++-
 1 file changed, 93 insertions(+), 1 deletion(-)
---
diff --git a/openshift/templates/extensions-web-nginx.json b/openshift/templates/extensions-web-nginx.json
index 9b7fea3..9a70134 100644
--- a/openshift/templates/extensions-web-nginx.json
+++ b/openshift/templates/extensions-web-nginx.json
@@ -462,7 +462,53 @@
                   {
                     "name": "update-popularity",
                     "image": "${NAME}:latest",
-                    "command": ["/extensions-web/app/bin/sweettooth-cron-update"]
+                    "command": ["/extensions-web/app/bin/sweettooth-cron-update"],
+                    "env": [
+                      {
+                        "name": "EGO_DATABASE_URL",
+                        "valueFrom": {
+                          "secretKeyRef" : {
+                            "name" : "${NAME}",
+                            "key" : "database-url"
+                          }
+                        }
+                      },
+                      {
+                        "name": "EGO_SECRET_KEY",
+                        "valueFrom": {
+                          "secretKeyRef" : {
+                            "name" : "${NAME}",
+                            "key" : "secret-key"
+                          }
+                        }
+                      },
+                      {
+                        "name": "EGO_MEDIA_ROOT",
+                        "valueFrom": {
+                            "configMapKeyRef": {
+                              "name": "extensions-web",
+                              "key": "media-root"
+                            }
+                        }
+                      },
+                      {
+                        "name": "EGO_STATIC_ROOT",
+                        "valueFrom": {
+                          "configMapKeyRef": {
+                            "name": "extensions-web",
+                            "key": "static-root"
+                          }
+                        }
+                      },
+                      {
+                        "name": "EGO_ALLOWED_HOST",
+                        "value": "${APPLICATION_DOMAIN}"
+                      },
+                      {
+                        "name": "EGO_XAPIAN_DB",
+                        "value": "${EGO_XAPIAN_DB}"
+                      }
+                    ]
                   }
                 ],
                 "restartPolicy": "Never"
@@ -497,6 +543,52 @@
                     "name": "update-software",
                     "image": "${NAME}:latest",
                     "command": ["/extensions-web/app/bin/sweettooth-cron-software"],
+                    "env": [
+                      {
+                        "name": "EGO_DATABASE_URL",
+                        "valueFrom": {
+                          "secretKeyRef" : {
+                            "name" : "${NAME}",
+                            "key" : "database-url"
+                          }
+                        }
+                      },
+                      {
+                        "name": "EGO_SECRET_KEY",
+                        "valueFrom": {
+                          "secretKeyRef" : {
+                            "name" : "${NAME}",
+                            "key" : "secret-key"
+                          }
+                        }
+                      },
+                      {
+                        "name": "EGO_MEDIA_ROOT",
+                        "valueFrom": {
+                            "configMapKeyRef": {
+                              "name": "extensions-web",
+                              "key": "media-root"
+                            }
+                        }
+                      },
+                      {
+                        "name": "EGO_STATIC_ROOT",
+                        "valueFrom": {
+                          "configMapKeyRef": {
+                            "name": "extensions-web",
+                            "key": "static-root"
+                          }
+                        }
+                      },
+                      {
+                        "name": "EGO_ALLOWED_HOST",
+                        "value": "${APPLICATION_DOMAIN}"
+                      },
+                      {
+                        "name": "EGO_XAPIAN_DB",
+                        "value": "${EGO_XAPIAN_DB}"
+                      }
+                    ],
                     "volumeMounts": [
                       {
                         "name": "data-volume",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]