Merge "Validate NTP servers"
[apex-tripleo-heat-templates.git] / docker / services / gnocchi-api.yaml
index 3b05214..6cddcd5 100644 (file)
@@ -26,6 +26,13 @@ parameters:
   DefaultPasswords:
     default: {}
     type: json
+  EnableInternalTLS:
+    type: boolean
+    default: false
+
+conditions:
+
+  internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
 
 resources:
 
@@ -65,7 +72,7 @@ outputs:
           command: /usr/sbin/httpd -DFOREGROUND
       docker_config:
         step_3:
-          gnocchi-init-log:
+          gnocchi_init_log:
             start_order: 0
             image: *gnocchi_image
             user: root
@@ -88,7 +95,7 @@ outputs:
                     - logs:/var/log
             command: ["/usr/bin/gnocchi-upgrade", "--skip-storage"]
         step_4:
-          gnocchi-api:
+          gnocchi_api:
             image: *gnocchi_image
             net: host
             privileged: false
@@ -103,9 +110,21 @@ outputs:
                     - /var/lib/config-data/gnocchi/etc/gnocchi/:/etc/gnocchi/:ro
                     - /var/lib/config-data/gnocchi/etc/httpd/:/etc/httpd/:ro
                     - /var/lib/config-data/gnocchi/var/www/:/var/www/:ro
+                    -
+                      if:
+                        - internal_tls_enabled
+                        - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
+                        - ''
+                    -
+                      if:
+                        - internal_tls_enabled
+                        - /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
+                        - ''
             environment:
               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
       upgrade_tasks:
         - name: Stop and disable httpd service
           tags: step2
           service: name=httpd state=stopped enabled=no
+      metadata_settings:
+        get_attr: [GnocchiApiPuppetBase, role_data, metadata_settings]