1
0
Fork 0

Added lookup_label parameter

This commit is contained in:
Joao M 2022-08-11 17:00:38 -05:00 committed by GitHub
parent 3bea967273
commit 2ef8dfecb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View file

@ -35,7 +35,7 @@ class DockerLabelHandler:
class HaproxyConfigGenerator:
def __init__(self, mapping, ssl_cert_folder="/etc/haproxy/certs"):
self.mapping = mapping
self.label = DockerLabelHandler("easyhaproxy")
self.label = DockerLabelHandler(mapping['lookup_label'] if 'lookup_label' in mapping else "easyhaproxy")
self.ssl_cert_folder = ssl_cert_folder
self.ssl_cert_increment = 0
os.makedirs(self.ssl_cert_folder, exist_ok=True)