From 47f350bc3aa85a8bd406d95faf084df2abf74ae9 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sun, 18 Mar 2018 22:59:31 +0100 Subject: Second revision: includes hostpath mounts, gluster block storage, kaas apps, etc. --- setup/projects/adei/templates/01-secret.yml.j2 | 10 ++++++++++ setup/projects/adei/templates/60-adei.yml.j2 | 23 +++++++++++++++++++++++ 2 files changed, 33 insertions(+) (limited to 'setup/projects/adei/templates') diff --git a/setup/projects/adei/templates/01-secret.yml.j2 b/setup/projects/adei/templates/01-secret.yml.j2 index f310ec9..44d5914 100644 --- a/setup/projects/adei/templates/01-secret.yml.j2 +++ b/setup/projects/adei/templates/01-secret.yml.j2 @@ -12,10 +12,14 @@ objects: metadata: annotations: template.openshift.io/expose-adei_password: '{.data[''adei-password'']}' + template.openshift.io/expose-root_password: '{.data[''root-password'']}' + template.openshift.io/expose-service_password: '{.data[''service-password'']}' template.openshift.io/expose-pma_password: '{.data[''pma-password'']}' name: adei stringData: adei-password: "{{ kaas_project_config.adei_password }}" + root-password: "{{ kaas_project_config.adei_password }}" + service-password: "${SERVICE_PASSWORD}" pma-password: "${PMA_PASSWORD}" parameters: - description: Password for the PMA connection user. @@ -24,3 +28,9 @@ parameters: generate: expression name: PMA_PASSWORD required: true +- description: Password for the service users + displayName: Service Connection Password + from: '[a-zA-Z0-9]{16}' + generate: expression + name: SERVICE_PASSWORD + required: true diff --git a/setup/projects/adei/templates/60-adei.yml.j2 b/setup/projects/adei/templates/60-adei.yml.j2 index 22f4bb0..7eafd33 100644 --- a/setup/projects/adei/templates/60-adei.yml.j2 +++ b/setup/projects/adei/templates/60-adei.yml.j2 @@ -159,6 +159,29 @@ objects: {% endif %} env: {{ cfg.env | to_json }} volumeMounts: {{ cfg.mounts | to_json }} +{% if cfg.resources is defined %} + resources: +{% if cfg.resources.request is defined %} +{% set res = cfg.resources.request %} + requests: +{% if res.cpu %} + cpu: {{ res.cpu }} +{% endif %} +{% if res.cpu %} + memory: {{ res.mem }} +{% endif %} +{% endif %} +{% if cfg.resources.limit is defined %} +{% set res = cfg.resources.limit %} + limits: +{% if res.cpu %} + cpu: {{ res.cpu }} +{% endif %} +{% if res.cpu %} + memory: {{ res.mem }} +{% endif %} +{% endif %} +{% endif %} {% if (cfg.node is defined) %} livenessProbe: timeoutSeconds: 1 -- cgit v1.2.3