Merge "Simplify conditions in heat service templates"

This commit is contained in:
Zuul 2021-04-01 18:57:41 +00:00 committed by Gerrit Code Review
commit cc6cdfa754
4 changed files with 28 additions and 47 deletions

View File

@ -59,9 +59,8 @@ parameters:
type: string
conditions:
internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
heat_workers_zero: {equals : [{get_param: HeatWorkers}, 0]}
heat_workers_set:
not: {equals : [{get_param: HeatWorkers}, 0]}
resources:
@ -142,10 +141,8 @@ outputs:
"%{hiera('fqdn_$NETWORK')}"
params:
$NETWORK: {get_param: [ServiceNetMap, HeatApiCfnNetwork]}
-
if:
- heat_workers_zero
- {}
- heat_workers_set
- heat::wsgi::apache_api_cfn::workers: {get_param: HeatWorkers}
service_config_settings:
rsyslog:
@ -203,13 +200,9 @@ outputs:
- /var/lib/kolla/config_files/heat_api_cfn.json:/var/lib/kolla/config_files/config.json:ro
- /var/lib/config-data/puppet-generated/heat_api_cfn:/var/lib/kolla/config_files/src: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
- []
- {get_param: EnableInternalTLS}
- - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
- /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
environment:
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS
host_prep_tasks: {get_attr: [HeatApiCfnLogging, host_prep_tasks]}

View File

@ -77,9 +77,8 @@ parameters:
hidden: true
conditions:
internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
heat_workers_zero: {equals : [{get_param: HeatWorkers}, 0]}
heat_workers_set:
not: {equals : [{get_param: HeatWorkers}, 0]}
resources:
@ -172,11 +171,9 @@ outputs:
"%{hiera('fqdn_$NETWORK')}"
params:
$NETWORK: {get_param: [ServiceNetMap, HeatApiNetwork]}
-
if:
- heat_workers_zero
- {}
- heat::wsgi::apache_api::workers: {get_param: HeatWorkers}
- heat_workers_set
- heat::wsgi::apache_api::workers: {get_param: HeatWorkers}
service_config_settings:
rsyslog:
tripleo_logging_sources_heat_api:
@ -241,17 +238,12 @@ outputs:
- {get_attr: [ContainersCommon, volumes]}
- {get_attr: [HeatApiLogging, volumes]}
- {get_param: HeatApiOptVolumes}
-
- /var/lib/kolla/config_files/heat_api.json:/var/lib/kolla/config_files/config.json:ro
- - /var/lib/kolla/config_files/heat_api.json:/var/lib/kolla/config_files/config.json:ro
- /var/lib/config-data/puppet-generated/heat_api:/var/lib/kolla/config_files/src: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
- []
- {get_param: EnableInternalTLS}
- - /etc/pki/tls/certs/httpd:/etc/pki/tls/certs/httpd:ro
- /etc/pki/tls/private/httpd:/etc/pki/tls/private/httpd:ro
environment:
map_merge:
- {get_param: HeatApiOptEnvVars}

View File

@ -141,7 +141,8 @@ conditions:
and:
- {get_param: EnableCache}
- {get_param: MemcachedTLS}
cors_allowed_origin_unset: {equals : [{get_param: HeatCorsAllowedOrigin}, '']}
cors_allowed_origin_set:
not: {equals : [{get_param: HeatCorsAllowedOrigin}, '']}
outputs:
role_data:
@ -152,8 +153,7 @@ outputs:
map_merge:
-
if:
- cors_allowed_origin_unset
- {}
- cors_allowed_origin_set
- heat::cors::allowed_origin: {get_param: HeatCorsAllowedOrigin}
- heat::notification_driver: {get_param: NotificationDriver}
heat::logging::debug:

View File

@ -115,8 +115,8 @@ parameters:
description: Client retries for transient errors.
conditions:
heat_workers_unset: {equals : [{get_param: HeatWorkers}, 0]}
enable_sqlalchemy_collectd: {equals : [{get_param: EnableSQLAlchemyCollectd}, true]}
heat_workers_set:
not: {equals : [{get_param: HeatWorkers}, 0]}
resources:
@ -176,16 +176,14 @@ outputs:
path: /heat
query:
if:
- enable_sqlalchemy_collectd
-
read_default_file: /etc/my.cnf.d/tripleo.cnf
read_default_group: tripleo
plugin: collectd
collectd_program_name: heat
collectd_host: localhost
-
read_default_file: /etc/my.cnf.d/tripleo.cnf
read_default_group: tripleo
- {get_param: EnableSQLAlchemyCollectd}
- read_default_file: /etc/my.cnf.d/tripleo.cnf
read_default_group: tripleo
plugin: collectd
collectd_program_name: heat
collectd_host: localhost
- read_default_file: /etc/my.cnf.d/tripleo.cnf
read_default_group: tripleo
heat::keystone_ec2_uri:
list_join:
@ -195,10 +193,8 @@ outputs:
heat::keystone::domain::domain_password: {get_param: HeatStackDomainAdminPassword}
heat::engine::auth_encryption_key: {get_param: HeatAuthEncryptionKey}
heat::engine::plugin_dirs: {get_param: HeatEnginePluginDirs}
-
if:
- heat_workers_unset
- {}
- heat_workers_set
- heat::engine::num_engine_workers: {get_param: HeatWorkers}
service_config_settings:
rsyslog: