Passing data only through unit relation data
[osm/devops.git] / installers / charm / nbi / src / pod_spec.py
index 77fff3e..b6291d4 100644 (file)
@@ -101,7 +101,7 @@ def _validate_data(
         "database_commonkey": lambda value, _: isinstance(value, str)
         and len(value) > 1,
         "log_level": lambda value, _: isinstance(value, str)
-        and (value == "INFO" or value == "DEBUG"),
+        and value in ("INFO", "DEBUG"),
         "auth_backend": lambda value, _: isinstance(value, str)
         and (value == "internal" or value == "keystone"),
         "site_url": lambda value, _: isinstance(value, str)
@@ -270,7 +270,7 @@ def _make_pod_ingress_resources(
 
     annotations = {
         "nginx.ingress.kubernetes.io/proxy-body-size": "{}".format(
-            max_file_size + "m" if max_file_size > 0 else max_file_size
+            str(max_file_size) + "m" if max_file_size > 0 else max_file_size
         ),
         "nginx.ingress.kubernetes.io/backend-protocol": "HTTPS",
     }