1
0
Fork 0

Merge branch '4.4.0' into 4.3.1

This commit is contained in:
Joao M 2023-06-26 22:34:09 -05:00 committed by GitHub
commit 38c2440145
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 147 additions and 60 deletions

View file

@ -203,9 +203,9 @@ class Kubernetes(ProcessorInterface):
self.cert_cache = {}
super().__init__()
def _check_annotation(self, annotations, key):
def _check_annotation(self, annotations, key, default = None):
if key not in annotations:
return None
return default
return annotations[key]
def inspect_network(self):
@ -273,6 +273,8 @@ class Kubernetes(ProcessorInterface):
rule_data["%s.redirect" % (definition)] = redirect
if mode is not None:
rule_data["%s.mode" % (definition)] = mode
rule_data["%s.balance" % (definition)] = self._check_annotation(ingress.metadata.annotations, "easyhaproxy.balance", "roundrobin")
service_name = rule.http.paths[0].backend.service.name
try: