116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
# File 'modules/profile/manifests/services_proxy/envoy.pp', line 116
function profile::services_proxy::envoy::svc_name( Profile::Service_listener $listener ) >> String {
if $listener['upstream'] {
$address = $listener['upstream']
if $address =~ /^([^.]+)\.discovery\.wmnet$/ {
return $1
}
elsif $address =~ /^[^.]+\.svc\.([^.]+)\.wmnet$/ {
return "${listener['service']}_${1}"
}
elsif $address =~ /^[^.]+\.([^.]+)\.wikimedia\.org$/ {
return "${listener['service']}_${1}"
}
else {
return $listener['service']
}
} else {
return $listener['service']
}
}
|