Files
magnum/magnum/drivers/common/templates/lb_etcd.yaml
Jakub Darmach c671d8baf9 Missing load balancer health monitors fix
In api and etcd load balancer templates we define if Octavia
load balancer healthchecks should be enabled. Corrected
octavia_lb_healthcheck parameter value comparison.

Closes-bug: #2015393
Change-Id: Icee8be92ea3e3121934645049b81b79be9bd046a
(cherry picked from commit f2dc76823c)
2023-08-25 04:39:25 +00:00

96 lines
2.3 KiB
YAML

# etcd service load balancer doesn't have floating IP associated.
heat_template_version: queens
conditions:
allowed_cidrs_enabled:
not:
allowed_cidrs_disabled
allowed_cidrs_disabled:
equals:
- get_param: allowed_cidrs
- []
octavia_lb_healthcheck_enabled:
equals:
- get_param: octavia_lb_healthcheck
- True
parameters:
fixed_subnet:
type: string
protocol:
type: string
default: TCP
constraints:
- allowed_values: ["TCP", "HTTP"]
port:
type: number
allowed_cidrs:
type: comma_delimited_list
description: The allowed CIDR list for master load balancer
octavia_provider:
type: string
description: Octavia provider to use for load balancer
octavia_lb_algorithm:
type: string
description: Octavia load balancer algorithm to use
octavia_lb_healthcheck:
type: boolean
description: Octavia load balancer healthcheck
resources:
loadbalancer:
type: Magnum::Optional::Neutron::LBaaS::LoadBalancer
properties:
provider: {get_param: octavia_provider}
vip_subnet: {get_param: fixed_subnet}
listener:
condition: allowed_cidrs_disabled
type: Magnum::Optional::Neutron::LBaaS::Listener
properties:
loadbalancer: {get_resource: loadbalancer}
protocol: {get_param: protocol}
protocol_port: {get_param: port}
listener_with_allowed_cidrs:
condition: allowed_cidrs_enabled
type: Magnum::Optional::Neutron::LBaaS::Listener
properties:
loadbalancer: {get_resource: loadbalancer}
protocol: {get_param: protocol}
protocol_port: {get_param: port}
allowed_cidrs: {get_param: allowed_cidrs}
pool:
type: Magnum::Optional::Neutron::LBaaS::Pool
properties:
lb_algorithm: {get_param: octavia_lb_algorithm}
listener: {if: ["allowed_cidrs_enabled", {get_resource: listener_with_allowed_cidrs}, {get_resource: listener}]}
protocol: {get_param: protocol}
monitor:
condition: octavia_lb_healthcheck_enabled
type: Magnum::Optional::Neutron::LBaaS::HealthMonitor
properties:
type: TCP
delay: 5
max_retries: 5
timeout: 5
pool: { get_resource: pool }
outputs:
pool_id:
value: {get_resource: pool}
address:
value: {get_attr: [loadbalancer, vip_address]}